Commit 33e49908 by 徐高华

Merge branch 'feature/自建应用验证' into 'developer'

Feature/自建应用验证

See merge request !1195
parents 34f45e1e 9362d993
package com.gic.haoban.manage.service.service.out.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
......@@ -68,12 +67,10 @@ import com.gic.haoban.manage.api.service.hm.HmQrcodeApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper;
import com.gic.haoban.manage.service.dao.mapper.WxApplicationMapper;
import com.gic.haoban.manage.service.entity.TabExternalMemberLog;
import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated;
import com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanWxApplication;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
import com.gic.haoban.manage.service.exception.WxApiLimitException;
......@@ -112,7 +109,6 @@ import com.gic.member.tag.api.dto.outapi.MemberTagSingleDTO;
import com.gic.member.tag.api.service.MemberTagOpenApiService;
import com.gic.mq.sdk.GicMQClient;
import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.dto.qywx.QywxNewExternalUseridDTO;
import com.gic.wechat.api.dto.qywx.UnionidToExternalUseridDTO;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -163,8 +159,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
@Autowired
private CustomerApiService customerApiService;
@Autowired
private WxApplicationMapper wxApplicationMapper;
@Autowired
private MemberApiService memberApiService;
@Autowired
private TabHaobanExternalClerkRelatedMapper externalClerkRelatedMapper;
......@@ -1151,7 +1145,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if (qwDTO == null) {
return null;
}
return qywxSuiteApiService.resultExternalMessage(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), wxMessageId , qwDTO.isSelf());
return qywxSuiteApiService.resultExternalMessage(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), wxMessageId , qwDTO.isSelf(),qwDTO.getUrlHost());
}
@Override
......
......@@ -94,7 +94,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger.info("企业标签所在企业不存在");
return;
}
QywxGetCorpTagListDTO corpTagListResp = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), null, -1 , qwDTO.isSelf());
QywxGetCorpTagListDTO corpTagListResp = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), null, -1 , qwDTO.isSelf(),qwDTO.getUrlHost());
if (corpTagListResp.getErrcode() != 0) {
logger.info("企业微信标签有问题:{}", wxEnterpriseId);
return;
......@@ -205,7 +205,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
if(qwDTO.isSelf()) {
secret = qwDTO.getSelfSecret() ;
}
return qywxSuiteApiService.saveCorpTag(corpid, secret, qywxTagGroupDTO , qwDTO.isSelf());
return qywxSuiteApiService.saveCorpTag(corpid, secret, qywxTagGroupDTO , qwDTO.isSelf(),qwDTO.getUrlHost());
}
@Override
......@@ -225,7 +225,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
if(qwDTO.isSelf()) {
secret = qwDTO.getSelfSecret() ;
}
QywxResponseDTO responseDTO = qywxSuiteApiService.delCorpTag(qwDTO.getThirdCorpid(), secret, delIds, 0,qwDTO.isSelf());
QywxResponseDTO responseDTO = qywxSuiteApiService.delCorpTag(qwDTO.getThirdCorpid(), secret, delIds, 0,qwDTO.isSelf(),qwDTO.getUrlHost());
logger.info("关闭同步:{}", JSONObject.toJSONString(responseDTO));
if (responseDTO.getErrcode() != 0) {
resp.setMessage(responseDTO.getErrmsg());
......@@ -253,7 +253,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
if(qwDTO.isSelf()) {
secret = qwDTO.getSelfSecret() ;
}
QywxResponseDTO responseDTO = qywxSuiteApiService.delCorpTag(qwDTO.getThirdCorpid(), secret, delIds, 1,qwDTO.isSelf());
QywxResponseDTO responseDTO = qywxSuiteApiService.delCorpTag(qwDTO.getThirdCorpid(), secret, delIds, 1,qwDTO.isSelf(),qwDTO.getUrlHost());
logger.info("删除标签项:{}", JSONObject.toJSONString(responseDTO));
if (responseDTO.getErrcode() != 0) {
resp.setMessage(responseDTO.getErrmsg());
......@@ -297,7 +297,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger.info("新增标签组无需操作:{}", callbackDTO.getTagId());
List<String> ids = new ArrayList<>();
ids.add(callbackDTO.getTagId());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_GROUP.getType() , qwDTO.isSelf());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_GROUP.getType() , qwDTO.isSelf(),qwDTO.getUrlHost());
if (tagDetail.getErrcode() != 0) {
logger.info("没有关联,无需操作:{}", JSONObject.toJSONString(tagDetail));
return;
......@@ -310,7 +310,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//查找对应的标签组 如果标签组关联了
List<String> ids = new ArrayList<>();
ids.add(callbackDTO.getTagId());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_ITEM.getType() , qwDTO.isSelf());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_ITEM.getType() , qwDTO.isSelf(),qwDTO.getUrlHost());
if (tagDetail.getErrcode() != 0) {
logger.info("查询失败,无需操作:{}", JSONObject.toJSONString(tagDetail));
return;
......@@ -417,7 +417,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO.setId(callbackDTO.getTagId());
qywxTagDTO.setName(qywxGroupKey.getQywxGroupName());
qywxTagDTO.setOrder(qywxGroupKey.getOrder());
qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO , qwDTO.isSelf());
qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO , qwDTO.isSelf(),qwDTO.getUrlHost());
//标签项
} else if (Objects.equals(relationTypeEnum.getTagType(), QywxTagRelationTypeEnum.TAG_ITEM.getTagType())) {
......@@ -437,7 +437,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO.setId(callbackDTO.getTagId());
qywxTagDTO.setName(qywxTagItem.getQywxTagName());
qywxTagDTO.setOrder(qywxTagItem.getOrder());
qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO,qwDTO.isSelf());
qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO,qwDTO.isSelf(),qwDTO.getUrlHost());
}
}
......@@ -776,7 +776,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO.setId(renameQywxKey);
qywxTagDTO.setName(name);
qywxTagDTO.setOrder(order);
QywxResponseDTO responseDTO = qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO , qwDTO.isSelf());
QywxResponseDTO responseDTO = qywxSuiteApiService.editCorpTagNameOrOrder(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), qywxTagDTO , qwDTO.isSelf(),qwDTO.getUrlHost());
logger.info("同步名称:{}", JSONObject.toJSONString(responseDTO));
if (responseDTO.getErrcode() != 0) {
resp.setMessage(responseDTO.getErrmsg());
......@@ -859,7 +859,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relation.getWxEnterpriseId()) ;
List<String> ids = new ArrayList<>();
ids.add(tabQywxTag.getQywxGroupKey());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_GROUP.getType() , qwDTO.isSelf());
QywxGetCorpTagListDTO tagDetail = qywxSuiteApiService.getCorpTagList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), ids, QywxTagRelationTypeEnum.TAG_GROUP.getType() , qwDTO.isSelf(),qwDTO.getUrlHost());
if (tagDetail.getErrcode() != 0) {
logger.info("查询失败,无需操作:{}", JSONObject.toJSONString(tagDetail));
ret.put("描述", "查询失败:" + tagDetail.getErrmsg());
......
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