Commit 7d561d40 by 墨竹

fix:好办-登录好友查询更改为从第三方查询

parent ef8b3201
......@@ -553,7 +553,11 @@ public class StaffApiServiceImpl implements StaffApiService {
logger.info("企业不存在:{}:{}", wxEnterpriseId, wxOpenUserId);
return;
}
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseId, SecretTypeEnum.HAOBAN_HELP.getVal());
if (null == secretSetting || secretSetting.getCheckFlag() == 0) {
logger.info("没有配置secret:{}", JSONObject.toJSONString(enterpriseDTO));
return;
}
String corpid = enterpriseDTO.getCorpid();
UserDTO user = qywxUserApiService.getWorkWxUser(corpid, config.getWxSuiteid(), wxOpenUserId);
if (null == user) {
......@@ -570,7 +574,8 @@ public class StaffApiServiceImpl implements StaffApiService {
staffService.delOtherStaffByWxUserId(staff.getWxUserId(), staff.getStaffId(), wxEnterpriseId);
}
staff = (staff == null ? new TabHaobanStaff() : staff);
String userid = qywxUserApiService.getUseridBymobile(corpid, config.getWxSuiteid(), phoneNumber);
String userid = qywxUserApiService.getSelfWxUserIdByPhonenumber(corpid, secretSetting.getSecretVal(), phoneNumber);
logger.info("获取到的userid:{}", userid);
staff.setWxUserId(userid);
staff.setWxOpenUseId(wxOpenUserId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment