Commit c91a005e by 徐高华

活码

parent 402fdfe8
......@@ -41,5 +41,5 @@ public interface WxEnterpriseRelatedService {
public WxEnterpriseRelationBO getHeadEnterprise(String enterpriseId) ;
public boolean getAddByWelcomeFlag(TabHaobanWxEnterpriseRelated wxEnterpriseRelated , String unionid) ;
public boolean getAddByWelcomeFlag(TabHaobanWxEnterpriseRelated wxEnterpriseRelated , String unionid , boolean isHmUnionid) ;
}
......@@ -89,9 +89,13 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
@Override
public boolean getAddByWelcomeFlag(TabHaobanWxEnterpriseRelated wxEnterpriseRelated, String unionid) {
public boolean getAddByWelcomeFlag(TabHaobanWxEnterpriseRelated wxEnterpriseRelated, String unionid , boolean isHmUnionid) {
int openCardFlag = wxEnterpriseRelated.getMemberOpenCardFlag() ;
int wxEnterpriseType = wxEnterpriseRelated.getWxEnterpriseType() ;
// 活码
if(StringUtils.isNotBlank(unionid) && isHmUnionid) {
return false ;
}
// unionid存在,并且在同一开放平台,可以创建客户
if(StringUtils.isNotBlank(unionid) && openCardFlag==0) {
return false ;
......
......@@ -496,7 +496,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return;
}
String memberId = null;
boolean addByWelcome = this.wxEnterpriseRelatedService.getAddByWelcomeFlag(wxEnterpriseRelated,unionid) ;
boolean addByWelcome = this.wxEnterpriseRelatedService.getAddByWelcomeFlag(wxEnterpriseRelated,unionid,isHmUnionid) ;
log.info("新增外部联系人,是否通过欢迎语={},wxEnterpriseId:{},enterpriseId={},unionid={}",addByWelcome,wxEnterpriseId,enterpriseId,unionid);
if(addByWelcome) {
unionid = null ;
......
......@@ -187,7 +187,7 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
externalUserDTO.setWxUserId(wxUserId);
externalUserDTO.setStaffId(staffId);
boolean addByWelcome = this.wxEnterpriseRelatedService.getAddByWelcomeFlag(wxEnterpriseRelated,externalUserDTO.getUnionId()) ;
boolean addByWelcome = this.wxEnterpriseRelatedService.getAddByWelcomeFlag(wxEnterpriseRelated,externalUserDTO.getUnionId(),false) ;
if (addByWelcome) {
logger.info("好友不同开平:{}", JSONObject.toJSONString(externalUserDTO));
return memberUnionidRelatedApiService.addExternal(externalUserDTO);
......
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