nidapeng
2024-04-23 5072f33b5c54142f00991d0dafc9ea75af696b81
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
package com.doumee.dao.system;
 
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.doumee.dao.system.dto.QuerySystemUserDTO;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.system.vo.SystemUserListVO;
import com.doumee.dao.web.response.MeetingListResponse;
import com.doumee.dao.web.response.UserResponse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
/**
 * @author T14
 */
public interface SystemUserMapper extends BaseMapper<SystemUser> {
 
    /**
     * 查询用户列表
     * @author Eva.Caesar Liu
     * @date 2023/03/21 14:49
     */
    List<SystemUserListVO> selectManageList(@Param("dto") QuerySystemUserDTO dto, @Param("orderByClause") String orderByClause);
 
 
    @Select(" select c.id , c.type , c.REALNAME as realName , c.userName as userName , c.avatar , c.wechat_name as wechatName , c.mobile , c.sex , c.birthday  , c.avatar   ,  e.`NAME` as departmentName  " +
            " from system_user c   " +
            " INNER JOIN system_department_user d on c.id = d.USER_ID  " +
            "  INNER JOIN system_department e on d.DEPARTMENT_ID = e.ID  " +
            " ${ew.customSqlSegment} ")
    IPage<UserResponse> getUserPage(IPage<UserResponse> page, @Param(Constants.WRAPPER) Wrapper wrapper);
 
 
    @Select(" select c.id , c.type , c.REALNAME as realName , c.userName as userName , c.avatar , c.wechat_name as wechatName , c.mobile , c.sex , c.birthday  , c.avatar   ,  e.`NAME` as departmentName  " +
            " from system_user c   " +
            " INNER JOIN system_department_user d on c.id = d.USER_ID  and d.DELETED = 0  " +
            "  INNER JOIN system_department e on d.DEPARTMENT_ID = e.ID  " +
            " ${ew.customSqlSegment} ")
    List<UserResponse> getUserList(@Param(Constants.WRAPPER) Wrapper wrapper);
 
 
    @Select(" select c.id , c.type , c.REALNAME as realname , c.userName as userName , c.avatar , c.wechat_name as wechatName , c.mobile , c.sex , c.birthday  , c.avatar   ,  e.`NAME` as departmentName  " +
            " from system_user c   " +
            " INNER JOIN system_department_user d on c.id = d.USER_ID and d.DELETED = 0  " +
            "  INNER JOIN system_department e on d.DEPARTMENT_ID = e.ID and e.DELETED = 0   " +
            "  where c.id = #{id} ")
    UserResponse getUserInfo(@Param("id") Integer id);
}