Commit acc7b536 by 徐高华

群活码-链接调整

parent 4c938e64
...@@ -25,7 +25,7 @@ public class HmLinkWxaDTO implements Serializable { ...@@ -25,7 +25,7 @@ public class HmLinkWxaDTO implements Serializable {
// 二维码 // 二维码
private String hmQrcode; private String hmQrcode;
// 自定义门店规则1推荐门店 2附近门店 // 自定义门店规则1推荐门店 2附近门店 3:获取群活码需要传入经纬度
private int storeType; private int storeType;
// 是否展示省市区门店查询 // 是否展示省市区门店查询
private int selectStoreFlag; private int selectStoreFlag;
......
...@@ -19,6 +19,19 @@ public class LinkHmFromWxaQDTO implements Serializable { ...@@ -19,6 +19,19 @@ public class LinkHmFromWxaQDTO implements Serializable {
*/ */
private String districtCode; private String districtCode;
/**
* 小程序是否需要位置信息的查询
*/
private Integer justLocationFlag ;
public Integer getJustLocationFlag() {
return justLocationFlag;
}
public void setJustLocationFlag(Integer justLocationFlag) {
this.justLocationFlag = justLocationFlag;
}
public String getLatitude() { public String getLatitude() {
return latitude; return latitude;
} }
......
...@@ -335,6 +335,23 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -335,6 +335,23 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 如果是社群链接 // 如果是社群链接
if (link.getLinkType() == HmLinkTypeEnum.CHAT_HM_LINK_TYPE.getLinkType()) { if (link.getLinkType() == HmLinkTypeEnum.CHAT_HM_LINK_TYPE.getLinkType()) {
log.info("群链接,linkId={}", link.getLinkId()); log.info("群链接,linkId={}", link.getLinkId());
if(null != qdto.getJustLocationFlag() && qdto.getJustLocationFlag()==1) {
JSONArray arr = JSONArray.parseArray(link.getCustomRuleJson()) ;
boolean flag = false ;
for(int i=0;i< arr.size();i++) {
JSONObject json = arr.getJSONObject(i) ;
int open = json.getIntValue("open") ;
int type = json.getIntValue("type") ;
if(open == 1 && type==3) {
flag = true ;
break;
}
}
if(flag) {
retDTO.setStoreType(3);
return ServiceResponse.success(retDTO) ;
}
}
ServiceResponse<HmLinkWxaDTO> resp = this.getLinkChatHmFromWxa(wxEnterpriseId, enterpriseId, mixPhone, unionid, memberId, link, retDTO,qdto); ServiceResponse<HmLinkWxaDTO> resp = this.getLinkChatHmFromWxa(wxEnterpriseId, enterpriseId, mixPhone, unionid, memberId, link, retDTO,qdto);
if(null != resp.getResult()) { if(null != resp.getResult()) {
resp.getResult().setGroupChatHm(true); resp.getResult().setGroupChatHm(true);
......
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