Commit 8775ca73 by 徐高华

test

parent 2eb54fde
......@@ -33,6 +33,7 @@ import com.gic.wechat.api.service.qywx.QywxExternalUserService;
public class QwFriendApiServiceImpl implements QwFriendApiService {
private static final Logger log = LogManager.getLogger(QwFriendApiService.class);
private static final int subjectType = 1 ;
@Autowired
private EnterpriseUseForbidService enterpriseUseForbidService;
......@@ -44,6 +45,7 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
private WxEnterpriseService wxEnterpriseService;
@Autowired
private Config config;
@Override
public ServiceResponse<Map<String, String>> pendingIdCheck(String enterpriseId, String unionid, String openid,
......@@ -56,9 +58,10 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
WxEnterpriseQwDTO qwDTO = corpidResp.getResult();
String corpid = qwDTO.getThirdCorpid();
ServiceResponse<PendingIdDTO> wxResp = this.qywxExternalUserService.unionidToExternalUserid(corpid, suiteid,
unionid, openid, 0);
unionid, openid, subjectType);
Map<String, String> retMap = new HashMap<>();
StringBuilder sb = new StringBuilder();
String url ="https://open.work.weixin.qq.com/devtool/query?e=" ;
String result = "";
String wxCode = "0";
String wxaCode = "0";
......@@ -66,17 +69,17 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
result = "ok";
} else {
result = wxResp.getCode();
wxCode = result;
wxaCode = url+result;
}
retMap.put("wxCode", wxCode);
sb.append("服务号-").append(result).append(",");
ServiceResponse<PendingIdDTO> wxaResp = this.qywxExternalUserService.unionidToExternalUserid(corpid, suiteid,
unionid, wxaOpenid, 0);
unionid, wxaOpenid, subjectType);
if (wxaResp.isSuccess()) {
result = "ok";
} else {
result = wxResp.getCode();
wxaCode = result;
wxaCode = url+result;
}
sb.append("小程序-").append(result);
retMap.put("remark", sb.toString());
......@@ -100,7 +103,7 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
}
String corpid = qwDTO.getThirdCorpid();
ServiceResponse<PendingIdDTO> qwResp = this.qywxExternalUserService.unionidToExternalUserid(corpid, suiteid,
unionid, openid, 0);
unionid, openid, subjectType);
QwTimesUtils.addTimes(wxEnterpriseId, QwInterfaceLimitEnum.GET_PENDING_ID);
log.info("Unionid获取pendingid,参数={},{},返回={}", unionid, openid, JSON.toJSONString(qwResp));
if (!qwResp.isSuccess()) {
......
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