Commit b9e0ccae by 墨竹

feat:代码优化

parent 94fd0295
......@@ -1497,6 +1497,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
exsitDTO.setWxEnterpriseId(wxEnterpriseId);
exsitDTO.setWxUserId(wxUserId);
exsitDTO.setUnionid(unionId);
exsitDTO.setMemberId(memberId);
exsitDTO.setEnterpriseId(enterpriseId);
uuid = memberUnionRelatedService.addMemberUnionidRelated(exsitDTO);
} else {
uuid = exsitDTO.getMemberUnionidRelatedId();
......@@ -1510,7 +1512,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
exsitDTO.setEnterpriseId(enterpriseId);
memberUnionRelatedService.update(exsitDTO);
}
String relationKey = SecureUtil.md5(staffId + externalUserId);
List<TabHaobanExternalClerkRelated> clerkRelateds = externalClerkRelatedService.listByExTernalUseridAndWxUserIdAllStatus(wxEnterpriseId, externalUserId, wxUserId);
if (CollectionUtils.isEmpty(clerkRelateds)) {
TabHaobanExternalClerkRelated related = new TabHaobanExternalClerkRelated();
......@@ -1522,6 +1524,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
related.setStaffId(staffId);
related.setMemberUnionidRelatedId(uuid);
related.setStoreId(storeId);
related.setRelationKey(relationKey);
related.setUnionid(unionId);
related.setWxEnterpriseId(wxEnterpriseId);
related.setWxUserId(wxUserId);
......@@ -1536,6 +1539,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
external.setMemberUnionidRelatedId(uuid);
external.setExternalUserId(externalUserId);
external.setExternalName(name);
external.setRelationKey(relationKey);
external.setUnionid(unionId);
external.setStoreId(storeId);
external.setEnterpriseId(enterpriseId);
......@@ -1548,7 +1552,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
//同步标签
pushTagSync(memberId, wxEnterpriseId, enterpriseId);
return "";
}
......
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