Commit c08dc7c4 by jinxin

员工可能修改userId,需要拿到openUserId再去查询一次

parent 8526c083
package com.gic.haoban.manage.service.service.out.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.clerk.api.dto.ClerkDTO;
......@@ -229,16 +230,15 @@ public class MessageApiServiceImpl implements MessageApiService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
if (qwDTO != null && (qwDTO.getWxSecurityType() == 1 || qwDTO.getWxSecurityType() == 3)){
String openUserid = getOpenUserid(userid, qwDTO);
oldStaff = this.staffService.selectByUserIdAndEnterpriseId(openUserid, wxEnterpriseId);
if (oldStaff == null){
log.error("成员同步更新失败,无历史员工数据:userid:{},wxEnterpriseId:{}", userid, wxEnterpriseId);
return;
if (StringUtils.isNotBlank(openUserid)){
oldStaff = this.staffService.selectByUserIdAndEnterpriseId(openUserid, wxEnterpriseId);
}
}else {
log.error("成员同步更新失败,无历史员工数据:userid:{},wxEnterpriseId:{}", userid, wxEnterpriseId);
return;
}
}
if (oldStaff == null){
log.error("成员同步更新失败,无历史员工数据:userid:{},wxEnterpriseId:{}", userid, wxEnterpriseId);
return;
}
TabHaobanStaff staff = new TabHaobanStaff();
staff.setStaffId(oldStaff.getStaffId());
staff.setPhoneNumber(qywxCallBackDTO.getMobile());
......
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