Commit 9834e78d by 墨竹

feat:会员登录bug修改

parent ae38c343
...@@ -1283,8 +1283,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1283,8 +1283,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
public void cleanNoExsitFriend(String wxEnterpriseId, String wxUserId, String wxRes) { public void cleanNoExsitFriend(String wxEnterpriseId, String wxUserId, String wxRes) {
log.info("【清除不存在的好友】wxEnterpriseId={},wxUserId={}", wxEnterpriseId, wxUserId); log.info("【清除不存在的好友】wxEnterpriseId={},wxUserId={}", wxEnterpriseId, wxUserId);
WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId); WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId);
//String wxRes = qywxUserApiService.listExternalUserid(enterprise.getCorpid(), config.getWxSuiteid(), wxUserId);
List<MemberUnionidRelatedDTO> list = this.getByWxUserIdAndWxEnterpriseId(wxUserId, wxEnterpriseId); List<MemberUnionidRelatedDTO> list = this.getByWxUserIdAndWxEnterpriseId(wxUserId, wxEnterpriseId);
List<String> externalUserIdList = list.stream().map(external -> external.getExternalUserid()) List<String> externalUserIdList = list.stream().map(external -> external.getExternalUserid())
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -1345,8 +1343,18 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1345,8 +1343,18 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
public List<String> listExterialList(String wxEnterpriseId, String wxUserId) { public List<String> listExterialList(String wxEnterpriseId, String wxUserId) {
log.info("【获取第三方应用好友】wxEnterpriseId={},wxUserId={}", wxEnterpriseId, wxUserId); log.info("【获取第三方应用好友】wxEnterpriseId={},wxUserId={}", wxEnterpriseId, wxUserId);
WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId); WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId);
// String wxRes = qywxUserApiService.listExternalUserid(enterprise.getCorpid(), "wwb3ef71aa8c6d9c06", wxUserId); String corpid = enterprise.getCorpid();
String wxRes = qywxUserApiService.listExternalUserid(enterprise.getCorpid(), config.getWxSuiteid(), wxUserId); String userId = "";
if (wxUserId.length() > 20) {
TabHaobanStaff staff = staffService.selectByUserIdAndEnterpriseId(wxUserId, wxEnterpriseId);
if (staff != null) {
userId = staff.getWxOpenUseId();
}
} else {
userId = wxUserId;
}
log.info("【获取第三方应用好友】wxEnterpriseId={},userId={}", wxEnterpriseId, userId);
String wxRes = qywxUserApiService.listExternalUserid(corpid, config.getWxSuiteid(), userId);
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
log.info("【查询第三方应用】res={}", wxRes); log.info("【查询第三方应用】res={}", wxRes);
if (wxRes != null && wxRes.equals("1")) { if (wxRes != null && wxRes.equals("1")) {
......
...@@ -55,7 +55,7 @@ public class FriendClerkSyncNewOperation implements BaseSyncOperation { ...@@ -55,7 +55,7 @@ public class FriendClerkSyncNewOperation implements BaseSyncOperation {
//获取所有外部联系人的外部联系人ids //获取所有外部联系人的外部联系人ids
List<String> selfUserIdList = memberUnionidRelatedApiService.listSelfExterialList(wxEnterpriseId, wxUserId); List<String> selfUserIdList = memberUnionidRelatedApiService.listSelfExterialList(wxEnterpriseId, wxUserId);
logger.info("selfUserIdList={}", JSONObject.toJSONString(selfUserIdList)); logger.info("selfUserIdList={}", JSONObject.toJSONString(selfUserIdList));
if (null == selfUserIdList) { if (CollectionUtils.isEmpty(selfUserIdList)) {
logger.info("自建应用调用第三方接口进入重试"); logger.info("自建应用调用第三方接口进入重试");
dealFlag = tryAgainToMq(dataPre); dealFlag = tryAgainToMq(dataPre);
reason = "重试次数过多"; reason = "重试次数过多";
...@@ -69,7 +69,7 @@ public class FriendClerkSyncNewOperation implements BaseSyncOperation { ...@@ -69,7 +69,7 @@ public class FriendClerkSyncNewOperation implements BaseSyncOperation {
} }
//第三方服务商的外部联系人 //第三方服务商的外部联系人
List<String> userIdList = memberUnionidRelatedApiService.listExterialList(wxEnterpriseId, wxUserId); List<String> userIdList = memberUnionidRelatedApiService.listExterialList(wxEnterpriseId, wxUserId);
if (null == selfUserIdList) { if (CollectionUtils.isEmpty(selfUserIdList)) {
dealFlag = tryAgainToMq(dataPre); dealFlag = tryAgainToMq(dataPre);
reason = "重试次数过多"; reason = "重试次数过多";
logger.info("第三方服务商外部联系人调用失败进入重试:{}", dataPre.getDataId()); logger.info("第三方服务商外部联系人调用失败进入重试:{}", dataPre.getDataId());
......
...@@ -269,13 +269,14 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -269,13 +269,14 @@ public class WxEnterpriseInfoController extends WebBaseController {
if (user == null) { if (user == null) {
return resultResponse(HaoBanErrCode.ERR_6); return resultResponse(HaoBanErrCode.ERR_6);
} }
if (!user.getCorpId().equals(enterpriseDTO.getCorpid())) { WxApplicationDTO wxApplicationDTO = wxApplicationApiService.selectByCorpid(user.getCorpId());
WxApplicationDTO wxApplicationDTO = wxApplicationApiService.selectByCorpid(user.getCorpId()); WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxApplicationDTO.getWxEnterpriseId());
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxApplicationDTO.getWxEnterpriseId()); if (wxEnterpriseDTO == null) {
if (wxEnterpriseDTO == null) { logger.info("该企业不存在:{}", qo.getGicEnterpriseId());
logger.info("该企业不存在:{}", qo.getGicEnterpriseId()); return resultResponse(HaoBanErrCode.ERR_400002);
return resultResponse(HaoBanErrCode.ERR_400002); }
} if (!wxEnterpriseDTO.getCorpid().equals(enterpriseDTO.getCorpid())) {
return resultResponse(HaoBanErrCode.ERR_500003, wxEnterpriseDTO.getCorpid());
} }
} else { } else {
user.setUserId(qo.getUserId()); user.setUserId(qo.getUserId());
......
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