Browse Source

过滤已离职员工数据

syh 4 years ago
parent
commit
db7813ad6b

+ 1 - 0
src/main/java/cn/com/ctop/okr/mapper/xml/QYWxUserInfoMapper.xml

@@ -118,6 +118,7 @@
         FROM
 	        wx_user_info user
         LEFT JOIN wx_user_depart_map depart ON user.userid = depart.userid
+        where user.status = 1
     </select>
 
 </mapper>

+ 0 - 3
src/main/java/cn/com/ctop/okr/service/impl/QYWxServiceImpl.java

@@ -83,10 +83,8 @@ public class QYWxServiceImpl extends ServiceImpl<CorpUserInfoMapper, CorpUserInf
     public void queryUserInfo(String token) throws Exception {
         JSONObject resultJson = DepartUserProvider.getUserDetailInfoByDepartId(1,token);
         Integer errcode = resultJson.getInteger("errcode");
-
         if(errcode == 0){
             JSONArray userArray = resultJson.getJSONArray("userlist");
-
             if(userArray == null){
                 throw new Exception("获取员工明细失败,返回值:" + JSON.toJSONString(resultJson));
             }
@@ -96,7 +94,6 @@ public class QYWxServiceImpl extends ServiceImpl<CorpUserInfoMapper, CorpUserInf
                 JSONObject json = userArray.getJSONObject(j);
                 QYWxUserInfo userInfo = new QYWxUserInfo();
                 String userid = json.getString("userid");
-
                 userInfo.setMobile(json.getString("mobile"));
                 userInfo.setAvatar(json.getString("avatar"));
                 userInfo.setMainDepartment(json.getLong("main_department"));