Selaa lähdekoodia

查询我的企微员工列表

三七 2 viikkoa sitten
vanhempi
commit
bfb85044cb

+ 17 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwUserController.java

@@ -116,6 +116,23 @@ public class QwUserController extends BaseController
         return getDataTable(list);
     }
 
+
+    /**
+     * 查询我的企微员工列表
+     */
+    @PreAuthorize("@ss.hasPermi('qw:user:myStaffList')")
+    @GetMapping("/myStaffList")
+    public TableDataInfo myStaffList(QwUserListParam qwUser) {
+        startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        qwUser.setCompanyId(loginUser.getCompany().getCompanyId());
+        qwUser.setCompanyUserId(loginUser.getUser().getUserId());
+        List<QwUserVO> list = qwUserService.selectQwUserListStaffVO(qwUser);
+        return getDataTable(list);
+    }
+
+
+
     /**
      * 查询我的部门 企业微信员工列表
      */

+ 8 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwUserMapper.java

@@ -156,13 +156,21 @@ public interface QwUserMapper extends BaseMapper<QwUser>
             "            <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_name like concat('%', #{qwUserName}, '%') </if> " +
             "            <if test=\"corpId != null \"> and qu.corp_id = #{corpId}</if>\n" +
+            "            <if test=\"companyUserId != null \"> and qu.company_user_id = #{companyUserId}</if>\n" +
             "            <if test=\"companyId != null \"> and qu.company_id = #{companyId}</if>\n " +
+            "            <if test=\"isDel != null \"> and qu.is_del = #{isDel}</if>\n "+
             "            <if test=\"cuDeptIdList != null and !cuDeptIdList.isEmpty() and  userType != '00' \">" +
             "               AND cu.dept_id IN " +
             "                   <foreach collection='cuDeptIdList' item='item' open='(' separator=',' close=')'> " +
             "                       #{item} " +
             "                   </foreach> " +
             "            </if>" +
+            "            <if test=\"qwDeptIdList != null and !qwDeptIdList.isEmpty() \">" +
+            "               AND qd.dept_id IN " +
+            "                   <foreach collection='qwDeptIdList' item='item' open='(' separator=',' close=')'> " +
+            "                       #{item} " +
+            "                   </foreach> " +
+            "            </if>" +
             "ORDER BY  qu.login_status asc,qu.tool_status desc " +
             "</script>"})
     List<QwUserVO> selectQwUserListStaffVO(QwUserListParam qwUser);

+ 5 - 0
fs-service/src/main/java/com/fs/qw/param/QwUserListParam.java

@@ -57,6 +57,11 @@ public class QwUserListParam {
      */
     private List<Long> cuDeptIdList;
 
+    /**
+     * 企微部门
+     */
+    private List<Long> qwDeptIdList;
+
     /**
      * 部门类型 00 管理员 01 员工
      */