|
@@ -146,7 +146,8 @@ public class WeiXinCorpController {
|
|
|
public LocalDateTime expireTime = null;
|
|
|
}
|
|
|
public static Map<String, AgentItem> agentCorpTicketMap = new HashMap<String,AgentItem>();
|
|
|
-
|
|
|
+ @Value("${configEnv.isDev}")
|
|
|
+ boolean isDev;
|
|
|
@Resource
|
|
|
SysConfigMapper sysConfigMapper;
|
|
|
@Resource
|
|
@@ -1700,7 +1701,7 @@ public class WeiXinCorpController {
|
|
|
}
|
|
|
if (!userItem.getName().equals(oldUser.getName())) {
|
|
|
changeUser.setId(oldUser.getId());
|
|
|
- changeUser.setName(oldUser.getName());
|
|
|
+ changeUser.setName(userItem.getName());
|
|
|
}
|
|
|
if (!userItem.getCorpwxDeptid().equals(oldUser.getCorpwxDeptid())) {
|
|
|
changeUser.setId(oldUser.getId());
|
|
@@ -1721,6 +1722,8 @@ public class WeiXinCorpController {
|
|
|
//有变动
|
|
|
finalUpdateUserList.add(changeUser);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ System.out.println("没找到用户:"+userItem.getName()+", "+userItem.getCorpwxUserid());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2107,7 +2110,7 @@ public class WeiXinCorpController {
|
|
|
return msg;
|
|
|
}
|
|
|
int companyId = company.getId();
|
|
|
- //获取公司根部门人员,也就是没有分配部门的人员
|
|
|
+ //获取公司根部门人员,属于公司这个组织下面的人员
|
|
|
int companyRootDeptId = 1;
|
|
|
JSONArray unAssignedUserList = getDeptUserInfo(curCorpAccessToken, companyRootDeptId);
|
|
|
SysRole defaultRole = sysRoleMapper.selectOne(
|
|
@@ -2478,6 +2481,24 @@ public class WeiXinCorpController {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping("/updateSuiteTicket")
|
|
|
+ public HttpRespMsg updateSuiteTicket(String suiteTicket) {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+ String remoteHost = request.getRemoteHost();
|
|
|
+ System.out.println("请求来自:"+remoteHost);
|
|
|
+ if ("47.100.37.243".equals(remoteHost) && isDev) {
|
|
|
+ SysConfig config = sysConfigMapper.selectOne(new QueryWrapper<SysConfig>().eq("param_key", "wx_suite_ticket"));
|
|
|
+ if (config != null) {
|
|
|
+ config.setParamValue(suiteTicket);
|
|
|
+ config.setIndate(LocalDateTime.now());
|
|
|
+ sysConfigMapper.updateById(config);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//将部门id转换为部门层级
|
|
|
private String convertDepartmentIdToCascade(Integer id, List<Department> allDeptList) {
|
|
|
StringBuilder cascade = new StringBuilder();
|