1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.dy.pipIrrBase.user;
 
 
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoBa.BaUserMapper;
import com.dy.pipIrrGlobal.pojoBa.BaUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Slf4j
@Service
//public class UserSv extends MPJBaseServiceImpl<BaUserMapper, BaUser> {
public class UserSv {
 
    private BaUserMapper dao;
 
    @Autowired
    private void setDao(BaUserMapper dao){
        this.dao = dao;
    }
 
    /**
     * 得到一个片区
     * @param id 片区ID
     * @return 片区实体
     */
    public BaUser selectById(Long id){
        return this.dao.selectById(id) ;
 
    }
 
    /**
     * 得到一个片区
     * @param vo 查询条件值对象
     * @return 片区实体
     */
    public QueryResultVo<List<BaUser>> selectSome(QueryVo vo){
//        MPJLambdaWrapper<BaUser> wrapper = new MPJLambdaWrapper<BaUser>()
//                .selectAll(BaUser.class)//查询user表全部字段
//                .select(BaRole::getId, BaRole::getName)
//                .leftJoin(BaUserRole.class, BaUserRole::getUserId, BaUser::getId)
//                .leftJoin(BaRole.class, BaRole::getId, BaUserRole::getRoleId);
//
//        wrapper.like(StringUtils.isNotEmpty(vo.name), "t.name", vo.name) ;
//        wrapper.eq(StringUtils.isNotEmpty(vo.name), "t.phone", vo.phone) ;
//        wrapper.eq(!Objects.isNull(vo.roleId), "t1.id", vo.roleId) ;
//
//        Page<BaUser> page = new Page<>(vo.pageCurr, vo.pageSize) ;
//
//        IPage<BaUser> iPage = this.dao.selectJoinPage(page, BaUser.class, wrapper) ;
//
//        List<BaUser> list = iPage.getRecords() ;
//
//        return (QueryResultVo.<List<BaUser>>builder().content(list)).build() ;
        return null ;
    }
 
}