Commit 9f9c2c18 by qwmqiuwenmin

fix

parent 058e2153
......@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.dto.GicMessageDTO;
import com.gic.haoban.manage.api.dto.QywxCallBackDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.dto.WxApplicationDTO;
import com.gic.haoban.manage.api.enums.GicDataType;
import com.gic.haoban.manage.api.enums.GicEditType;
import com.gic.haoban.manage.api.enums.WxEditType;
......@@ -50,6 +51,8 @@ public class MessageApiServiceImpl implements MessageApiService {
private StaffDepartmentRelatedService staffDepartmentRelatedService;
@Autowired
private StaffApiService staffApiService;
@Autowired
private WxApplicationService wxApplicationService;
@Override
public void gicMessageReceive(GicMessageDTO gicMessageDTO) {
......@@ -124,12 +127,22 @@ public class MessageApiServiceImpl implements MessageApiService {
@Override
public void dealWxMessage(String param) {
log.info("【处理微信回调】dto={}",JSON.toJSONString(dto));
QywxCallBackDTO dto = JSON.parseObject(param, QywxCallBackDTO.class);
log.info("【处理微信回调】dto={}",JSON.toJSONString(dto));
if(dto.getChangeType().endsWith("party")){
this.dealDepartment(dto);
}else {
this.dealUser(dto);
if(dto != null){
String siteId = dto.getSuiteId();
String corpId = dto.getAuthCorpId();
TabHaobanWxEnterprise enterprise = this.enterpriseService.getEnterpriseBycorpId(corpId);
if(enterprise != null){
TabHaobanWxApplication application = wxApplicationService.selectBySiteIdAndWxEnterpriseId(siteId, enterprise.getWxEnterpriseId());
if(application != null && application.getApplicationType() == 1){
if(dto.getChangeType().endsWith("party")){
this.dealDepartment(dto);
}else {
this.dealUser(dto);
}
}
}
}
}
......@@ -264,7 +277,7 @@ public class MessageApiServiceImpl implements MessageApiService {
}
StaffDTO staffDTO = EntityUtil.changeEntityByJSON(StaffDTO.class, staff);
staffDTO.setWeixinPush(true);
// staffApiService.staffEdit(staffDTO, departmentIds);
staffApiService.staffEdit(staffDTO, departmentIds);
}else {
this.addUser(qywxCallBackDTO, staff);
......
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