|
|
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ydtech.core.page.PageResult;
|
|
|
-import com.ydtech.modules.admin.model.QuOrders;
|
|
|
-import com.ydtech.modules.admin.model.QuTeamNum;
|
|
|
-import com.ydtech.modules.admin.model.SysDept;
|
|
|
-import com.ydtech.modules.admin.model.SysUser;
|
|
|
+import com.ydtech.modules.admin.model.*;
|
|
|
import com.ydtech.modules.admin.model.dto.QuTeamNumDto;
|
|
|
+import com.ydtech.modules.admin.model.dto.QuUserNumDto;
|
|
|
import com.ydtech.modules.admin.model.dto.SysUserDto;
|
|
|
import com.ydtech.modules.admin.model.vo.SysUserBaseVO;
|
|
|
import com.ydtech.modules.admin.model.vo.SysUserVO;
|
|
|
@@ -54,8 +52,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
",sd.id as deptId,sd.name as deptName" +
|
|
|
",psd.id as pDeptId,psd.name as pDeptName" +
|
|
|
",t4.id as roleId" +
|
|
|
- ",t4.name as roleName"
|
|
|
- ;
|
|
|
+ ",t4.name as roleName";
|
|
|
|
|
|
|
|
|
String selectUserFromSql = " from sys_user su " +
|
|
|
@@ -66,8 +63,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
" left join sys_role t4 on t3.role_id=t4.id " +
|
|
|
" where 1=1 " +
|
|
|
" AND sd.id <> '' "
|
|
|
- + ""
|
|
|
- ;
|
|
|
+ + "";
|
|
|
|
|
|
String selectUserFromWhereSql = " " +
|
|
|
// "<if test='page.columnFilters.usertype !=null and page.columnFilters.usertype.value!=\"\" and page.columnFilters.usertype.value!=null '>" +
|
|
|
@@ -77,24 +73,24 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
// " and su.approval_status = #{page.columnFilters.approvalStatus.value}" +
|
|
|
// "</if> " +
|
|
|
"<if test='page.dto !=null '> " +
|
|
|
- "<if test='page.dto.status !=null and page.dto.status!=\"\" '> " +
|
|
|
- " and su.status = #{page.dto.status}" +
|
|
|
- "</if> " +
|
|
|
- "<if test='page.dto.name !=null and page.dto.name!=\"\" '> " +
|
|
|
- " and su.name like concat('%',#{page.dto.name},'%')" +
|
|
|
- "</if> " +
|
|
|
- "<if test='page.dto.userId !=null and page.dto.userId!=\"\" '>" +
|
|
|
- " and su.id = #{page.dto.userId}" +
|
|
|
- "</if> " +
|
|
|
- "<if test='page.dto.mobile !=null and page.dto.mobile!=\"\" '>" +
|
|
|
- " and su.mobile = #{page.dto.mobile}" +
|
|
|
- "</if> " +
|
|
|
- "<if test='page.dto.deptId !=null and page.dto.deptId!=\"\" '>" +
|
|
|
- " and su.dept_id like concat('%',#{page.dto.deptId},'%')" +
|
|
|
- "</if> " +
|
|
|
- "<if test='page.dto.roleId !=null and page.dto.roleId!=\"\" '>" +
|
|
|
- " and t3.role_id = #{page.dto.roleId}" +
|
|
|
- "</if> " +
|
|
|
+ "<if test='page.dto.status !=null and page.dto.status!=\"\" '> " +
|
|
|
+ " and su.status = #{page.dto.status}" +
|
|
|
+ "</if> " +
|
|
|
+ "<if test='page.dto.name !=null and page.dto.name!=\"\" '> " +
|
|
|
+ " and su.name like concat('%',#{page.dto.name},'%')" +
|
|
|
+ "</if> " +
|
|
|
+ "<if test='page.dto.userId !=null and page.dto.userId!=\"\" '>" +
|
|
|
+ " and su.id = #{page.dto.userId}" +
|
|
|
+ "</if> " +
|
|
|
+ "<if test='page.dto.mobile !=null and page.dto.mobile!=\"\" '>" +
|
|
|
+ " and su.mobile = #{page.dto.mobile}" +
|
|
|
+ "</if> " +
|
|
|
+ "<if test='page.dto.deptId !=null and page.dto.deptId!=\"\" '>" +
|
|
|
+ " and su.dept_id like concat('%',#{page.dto.deptId},'%')" +
|
|
|
+ "</if> " +
|
|
|
+ "<if test='page.dto.roleId !=null and page.dto.roleId!=\"\" '>" +
|
|
|
+ " and t3.role_id = #{page.dto.roleId}" +
|
|
|
+ "</if> " +
|
|
|
"</if> " +
|
|
|
"";
|
|
|
|
|
|
@@ -120,13 +116,19 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
"LEFT JOIN sys_role r ON r.id = sur.role_id WHERE r.id IN ('21') and u.status=1 and u.dept_id=#{deptId}")
|
|
|
List<SysUserVO> findByReferrerId(@Param("deptId") String deptId);
|
|
|
|
|
|
+
|
|
|
+ @Select("SELECT u.id,u.name FROM sys_user u " +
|
|
|
+ "LEFT JOIN sys_user_role sur ON sur.user_id = u.id " +
|
|
|
+ "LEFT JOIN sys_role r ON r.id = sur.role_id WHERE r.id IN ('22') and u.status=1 and u.id NOT LIKE '%M%'")
|
|
|
+ List<SysUser> findBackListByDeptId(@Param("deptId") String deptId);
|
|
|
+
|
|
|
List<SysUserVO> findListByDeptId(@Param("sysUser") SysUser sysUser);
|
|
|
|
|
|
- Page<SysUserBaseVO> gainUserBaseInfo(@Param("page") Page page,@Param("user") SysUserDto user);
|
|
|
+ Page<SysUserBaseVO> gainUserBaseInfo(@Param("page") Page page, @Param("user") SysUserDto user);
|
|
|
|
|
|
- IPage<SysUserBaseVO> findUserList(@Param("page") Page page,@Param("user") SysUserDto user);
|
|
|
+ IPage<SysUserBaseVO> findUserList(@Param("page") Page page, @Param("user") SysUserDto user);
|
|
|
|
|
|
- IPage<SysUserBaseVO> findBackUserList(@Param("page") Page page,@Param("user") SysUserDto user);
|
|
|
+ IPage<SysUserBaseVO> findBackUserList(@Param("page") Page page, @Param("user") SysUserDto user);
|
|
|
|
|
|
/**
|
|
|
* 获取用户列表
|
|
|
@@ -135,7 +137,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
* @param containsSubDept 是否包含下级机构
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage<SysUser> selectUserPage(Page page, @Param("sysUser")SysUser sysUser,@Param("containsSubDept")String containsSubDept);
|
|
|
+ public IPage<SysUser> selectUserPage(Page page, @Param("sysUser") SysUser sysUser, @Param("containsSubDept") String containsSubDept);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -163,6 +165,10 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|
|
|
|
|
List<QuTeamNum> getUser(@Param("quTeamNumDto")QuTeamNumDto quTeamNumDto);
|
|
|
|
|
|
+ List<QuUserNum> getUserNum(@Param("quUserNumDto") QuUserNumDto quUserNumDto);
|
|
|
+
|
|
|
+ List<QuUserNum> getUserByCompany(@Param("quUserNumDto") QuUserNumDto quUserNumDto);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|