Commit ac3c4ab5 by 墨竹

fix:会员删除导购bug修改

parent 20972d03
......@@ -180,16 +180,28 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
DealQywxExternalUserPojo externalUserPojo = JSONObject.parseObject(params, DealQywxExternalUserPojo.class);
QwFrientNoticeDTO qwFrientNoticeDTO = externalUserPojo.getData();
int type = externalUserPojo.getType();
String wxUserId = qwFrientNoticeDTO.getWxUserId();
MemberUnionidRelatedDTO memberUnionidRelatedDTO = EntityUtil.changeEntityByJSON(MemberUnionidRelatedDTO.class, qwFrientNoticeDTO);
if (type == DealQywxExternalUserPojo.DealType.add.getType()) {
this.addMemberUnionidRelatedNew(memberUnionidRelatedDTO, qwFrientNoticeDTO.getWxUserId());
this.addMemberUnionidRelatedNew(memberUnionidRelatedDTO, wxUserId);
} else if (type == DealQywxExternalUserPojo.DealType.edit.getType()) {
this.editMemberUnionidRelatedProcess(memberUnionidRelatedDTO, qwFrientNoticeDTO.getWxUserId());
this.editMemberUnionidRelatedProcess(memberUnionidRelatedDTO, wxUserId);
} else if (type == DealQywxExternalUserPojo.DealType.del.getType()) {
String changeType = qwFrientNoticeDTO.getChangeType();
//欧泊莱定制
if ("del_follow_user".equals(changeType)) {
log.info("会员删除导购:{}", JSON.toJSONString(memberUnionidRelatedDTO));
log.info("会员删除导购");
String corpId = memberUnionidRelatedDTO.getCorpid();
TabHaobanWxApplication tabHaobanWxApplication = wxApplicationMapper.selectByCorpId(corpId, null);
if (tabHaobanWxApplication == null) {
log.info("查询tab_haoban_wx_application为空:{}", corpId);
return;
}
String wxEnterpriseId = tabHaobanWxApplication.getWxEnterpriseId();
memberUnionidRelatedDTO.setWxEnterpriseId(wxEnterpriseId);
TabHaobanStaff staff = this.staffMapper.selectByUserIdAndEnterpriseId(wxUserId, wxEnterpriseId);
String staffId = staff.getStaffId();
memberUnionidRelatedDTO.setStaffId(staffId);
List<TabHaobanExternalClerkRelated> tabHaobanExternalClerkRelatedList = externalClerkRelatedService.listByExTernalUseridAndWxUserId(memberUnionidRelatedDTO.getExternalUserid(), memberUnionidRelatedDTO.getStaffId());
if (CollectionUtils.isEmpty(tabHaobanExternalClerkRelatedList)) {
log.error("无好友记录");
......@@ -197,7 +209,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
TabHaobanExternalClerkRelated related = tabHaobanExternalClerkRelatedList.get(0);
String enterpriseId = related.getEnterpriseId();
String wxEnterpriseId = related.getWxEnterpriseId();
//添加日志
WxUserAddLogQDTO wxUserAddLogQDTO = new WxUserAddLogQDTO();
wxUserAddLogQDTO.setWxEnterpriseId(wxEnterpriseId);
......@@ -213,7 +224,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
addDelFriendEvent(related.getUnionid(), related.getClerkId(), wxEnterpriseId,enterpriseId, related.getMemberId(), related.getStoreId(), 0);
return;
}
this.delMemberUnionidRelatedProcess(memberUnionidRelatedDTO, qwFrientNoticeDTO.getWxUserId());
log.info("导购删除好友");
this.delMemberUnionidRelatedProcess(memberUnionidRelatedDTO, wxUserId);
}
}
......
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