Browse Source

修改企业微信扫码登录时部门若为309则更换为adminorg的值

lwx_dev
erdanergou 3 years ago
parent
commit
1e1b131df4
  1. 6
      src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java

6
src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java

@ -270,10 +270,16 @@ public class QyWxOperationController {
// 如果成功获取userid
Map<String, Object> portInfo = PublicConfig.findUserByQyWxUserId(userId);
UserByPort userByPort = (UserByPort) portInfo.get("user");
String key = (String) portInfo.get("key");
String token = (String) portInfo.get("token");
if (userByPort != null) {
// 如果数据库中存在该用户
// 获取当前用户所在主部门
int maindeparment = userByPort.getMaindeparment();
if(maindeparment == 309){
userByPort.setMaindeparment(userByPort.getAdminorg());
}
// 设置放入时间
userByPort.setInstant(Instant.now());
AuthenticationTokenPool.addUserToken(token, userByPort);

Loading…
Cancel
Save