Commit 0b8823f9 by 徐高华

test

parent 29e72320
......@@ -376,17 +376,34 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
String unionid = dto.getUnionid();
String state = dto.getState();
boolean isHmUnionid = false;
String mobile = "";
String staffId = dto.getStaffId();
StaffClerkRelationDTO staffClerkRelationDTO = null;
//活码处理 "DT" "HM"
WxUserAddLogQDTO wxUserAddLogQDTO = new WxUserAddLogQDTO();
boolean isHmUnionid = false;
String mobile = "";
String memberLabelId = "";
StaffClerkRelationDTO staffClerkRelationDTO = null;
boolean needMainStore = true ;
if (StringUtils.isNotBlank(state) && (state.startsWith(Manage3Constants.HM) || state.startsWith(Manage3Constants.DT))) {
needMainStore = false ;
String id = state.substring(2);
Long hmId = null;
HmQrcodeDTO hmQrcodeDTO = null;
if(state.startsWith(Manage3Constants.DT)) {
KeyDataLinkBO dataForHmLink = keyDataService.getDataForHmLink(id);
if(null == dataForHmLink) {
log.error("活码keyDate查询不到,id={}", id);
return ;
}
Long linkId = dataForHmLink.getLinkId();
hmId = dataForHmLink.getHmId();
mobile = dataForHmLink.getMobile();
unionid = dataForHmLink.getUnionid();
log.info("动态活码hmId={},linkId={},unionid={},mobile={}", hmId, linkId, unionid,mobile);
}
if (state.contains(Manage3Constants.HM)) {
hmId = Convert.toLong(id);
log.info("普通活码={}", hmId);
......@@ -420,11 +437,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
} else if (state.contains(Manage3Constants.DT)) {
KeyDataLinkBO dataForHmLink = keyDataService.getDataForHmLink(id);
if(null == dataForHmLink) {
log.error("活码keyDate查询不到,id={}", id);
return ;
}
Long linkId = dataForHmLink.getLinkId();
hmId = dataForHmLink.getHmId();
mobile = dataForHmLink.getMobile();
unionid = dataForHmLink.getUnionid();
log.info("动态活码hmId={},linkId={},unionid={}", hmId, linkId, unionid);
log.info("动态活码hmId={},linkId={},unionid={},mobile={}", hmId, linkId, unionid,mobile);
isHmUnionid = true;
wxUserAddLogQDTO.setLinkId(linkId);
wxUserAddLogQDTO.setHmId(hmId);
......@@ -438,33 +459,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if (hmLinkBO != null) {
memberLabelId = hmLinkBO.getMemberLabelId();
}
} else {
//不是我们的活码
TabHaobanClerkMainStoreRelated mainStoreRelated = clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId);
if (mainStoreRelated == null) {
log.info("【新增外部联系人】主门店为空:{}", staffId);
// 无主门店仅发送欢迎语
sendWelcome(dto, qwDTO, null, staffId, null);
return;
}
staffClerkRelationDTO = staffClerkRelationService.getOneBindByStoreId(staffId, mainStoreRelated.getStoreId());
}
if (hmId != null && hmQrcodeDTO != null) {
log.info("计算活码的上限和加好友数量:{}", hmId);
hmQrcodeApiService.updateAddNumById(hmId, hmQrcodeDTO.getClerkId());
}
} else {
}
this.hmQrcodeApiService.updateAddNumById(hmId, hmQrcodeDTO.getClerkId());
}
if(needMainStore) {
TabHaobanClerkMainStoreRelated mainStoreRelated = clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId);
if (mainStoreRelated == null) {
log.info("【新增外部联系人】主门店为空:staffId={}", staffId);
// 无主门店仅发送欢迎语
sendWelcome(dto, qwDTO, null, staffId, null);
this.sendWelcome(dto, qwDTO, null, staffId, null);
return;
}
staffClerkRelationDTO = staffClerkRelationService.getOneBindByStoreId(staffId, mainStoreRelated.getStoreId());
}
if (staffClerkRelationDTO == null) {
log.info("【新增外部联系人】无关联导购");
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