Commit 920f1f56 by xugaojun

修改一个查询问题

parent 6399923d
......@@ -91,6 +91,9 @@ public class MessageApiServiceImpl implements MessageApiService {
@Autowired
private SecretSettingService secretSettingService;
@Autowired
private WxApplicationService wxApplicationService;
@Override
public void gicMessageReceive(GicMessageDTO gicMessageDTO) {
if (true) {
......@@ -135,30 +138,30 @@ public class MessageApiServiceImpl implements MessageApiService {
public void dealWxMessage(String param) {
QywxCallBackDTO dto = JSON.parseObject(param, QywxCallBackDTO.class);
log.info("【处理微信回调】dto={}", JSON.toJSONString(param));
TabHaobanWxEnterprise enterprise = enterpriseService.getEnterpriseBycorpId(dto.getAuthCorpId());
if (Objects.isNull(enterprise)) {
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(dto.getAuthCorpId());
if (Objects.isNull(wxApplication)) {
log.info("通过corpId:【{}】未查询到授权企业,无法处理", dto.getAuthCorpId());
return;
}
// 校验适用企业-定制
boolean suitWxEnterpriseIid = checkSuitEnterpriseId(enterprise.getWxEnterpriseId());
boolean suitWxEnterpriseIid = checkSuitEnterpriseId(wxApplication.getWxEnterpriseId());
if (!suitWxEnterpriseIid) {
log.info("微信企业id:{}, 不适用", enterprise.getWxEnterpriseId());
log.info("微信企业id:{}, 不适用", wxApplication.getWxEnterpriseId());
return;
}
List<TabHaobanWxEnterpriseRelated> relatedList = wxEnterpriseRelatedService.getByWxEnterpriseId(enterprise.getWxEnterpriseId());
List<TabHaobanWxEnterpriseRelated> relatedList = wxEnterpriseRelatedService.getByWxEnterpriseId(wxApplication.getWxEnterpriseId());
if (CollectionUtils.isEmpty(relatedList)) {
log.info("未查询到企业关联企业 wxEnt");
return;
}
ServiceResponse response = staffApiService.getWxSaveNew(dto.getUserid(), enterprise.getWxEnterpriseId());
ServiceResponse response = staffApiService.getWxSaveNew(dto.getUserid(), wxApplication.getWxEnterpriseId());
if (response.getCode() != 1) {
log.info("添加企业员工失败:{}", response.getMessage());
return;
}
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(enterprise.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal());
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxApplication.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal());
if (null == secretSetting || secretSetting.getCheckFlag() == 0) {
log.info("没有配置secret:{}", JSONObject.toJSONString(enterprise));
log.info("没有配置secret:{}", JSONObject.toJSONString(wxApplication));
return;
}
// 这里将员工姓名改一下, 代开发返回的 id 和 name 一样
......
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