|
@@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
|
-import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import me.chanjar.weixin.cp.bean.WxCpUser;
|
|
|
|
|
|
@Service
|
|
@@ -43,6 +42,8 @@ public class WxUserService extends BaseService {
|
|
|
wxUser.setSecondDepartName(departs.get(1).getName());
|
|
|
wxUser.setSecondDepartId(departs.get(1).getId());
|
|
|
}
|
|
|
+ wxUser.setPosition(user.getPosition());
|
|
|
+ wxUser.setDepartIds(user.getDepartIds().toString().replace("[", ",").replace("]", ",").replace(" ", ""));
|
|
|
dbUser = selectById(userId);
|
|
|
if (dbUser == null) {
|
|
|
save("WxUserMapper.save", wxUser);
|
|
@@ -52,7 +53,7 @@ public class WxUserService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public WxUser selectById(String userId) throws Exception {
|
|
|
return (WxUser) findObject("WxUserMapper.selectById", userId);
|
|
|
}
|
|
@@ -68,12 +69,4 @@ public class WxUserService extends BaseService {
|
|
|
public List<String> selectAllUserIds() throws Exception {
|
|
|
return (List<String>) findList("WxUserMapper.selectAllUserIds", null);
|
|
|
}
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- try {
|
|
|
- System.out.println(WXCpUserUtil.listAllUser().size());
|
|
|
- } catch (WxErrorException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
}
|