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