|
|
@@ -200,7 +200,6 @@ public interface QwUserMapper extends BaseMapper<QwUser>
|
|
|
QwFsServerBindParam selectQwServerBindParam(@Param("appKey") String appKey);
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 查询企微用户绑定了的列表
|
|
|
*/
|
|
|
@@ -212,10 +211,11 @@ public interface QwUserMapper extends BaseMapper<QwUser>
|
|
|
" <if test=\"qwUserId != null and qwUserId != ''\"> and qu.qw_user_id = #{qwUserId}</if>\n" +
|
|
|
" <if test=\"companyId != null \"> and qu.company_id = #{companyId}</if>\n" +
|
|
|
" <if test=\"nickName != null and nickName != ''\"> and cu.nick_name like concat('%', #{nickName}, '%') </if>\n" +
|
|
|
- " <if test=\"qwUserName != null and qwUserName != ''\"> and qu.qw_user_uame like concat( #{qwUserName}, '%') </if>\n" +
|
|
|
+ " <if test=\"qwUserName != null and qwUserName != ''\"> and qu.qw_user_name like concat('%', #{qwUserName}, '%') </if>\n" +
|
|
|
" <if test=\"companyUserId != null \"> and qu.company_user_id = #{companyUserId}</if>\n" +
|
|
|
" <if test=\"corpId != null \"> and qu.corp_id = #{corpId}</if>\n" +
|
|
|
" <if test=\"deptId != null \"> and qd.dept_id = #{deptId}</if>\n" +
|
|
|
+ " <if test=\"deptName != null \"> and qd.dept_name like concat('%', #{deptName}, '%') </if>\n" +
|
|
|
" <if test=\"status != null \"> and qu.status = #{status}</if>\n" +
|
|
|
" <if test=\"type != null and sendType !=null and type==2 and (sendType==2 or sendType==4 or sendType==11) \"> and qu.app_key IS NOT NULL </if>\n" +
|
|
|
"</script>"})
|
|
|
@@ -432,6 +432,25 @@ public interface QwUserMapper extends BaseMapper<QwUser>
|
|
|
"</script>")
|
|
|
List<Long> selectQwUserListByCuDeptIdList(@Param("map") QwSop qwSop);
|
|
|
|
|
|
+
|
|
|
+ @Select("<script>" +
|
|
|
+ "select qu.id,qu.qw_user_id,qu.qw_user_name,qu.department,qu.corp_id,qu.company_id,qu.company_user_id, " +
|
|
|
+ "cu.nick_name, cu.user_name, qd.dept_name as departmentName from qw_user qu " +
|
|
|
+ "LEFT JOIN company_user cu ON cu.user_id=qu.company_user_id " +
|
|
|
+ "RIGHT JOIN qw_dept qd on qu.department=qd.dept_id and qd.corp_id=qu.corp_id " +
|
|
|
+ "where qu.is_del=0 and qu.company_user_id is not null "+
|
|
|
+ " <if test=\"map.corpId != null \"> and qu.corp_id = #{map.corpId}</if>\n" +
|
|
|
+ " <if test=\"map.companyId != null \"> and qu.company_id = #{map.companyId}</if>\n" +
|
|
|
+ " <if test=\"map.deptIds != null and !map.deptIds.isEmpty() \">" +
|
|
|
+ " AND qu.department IN " +
|
|
|
+ " <foreach collection='map.deptIds' item='item' open='(' separator=',' close=')'> " +
|
|
|
+ " #{item} " +
|
|
|
+ " </foreach> " +
|
|
|
+ " </if>" +
|
|
|
+ "</script>")
|
|
|
+ List<QwUserVO> selectQwUserByDeptList(@Param("map") QwUserByDeptParam deptParam);
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 根据外部联系人的fsUserId查询关联的企微员工信息
|
|
|
* @param fsUserId 会员id
|