Commit 02d221a6 by 徐高华

门店是否达上线

parent 0bc38cf9
......@@ -416,7 +416,8 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 过滤到达上线的门店
List<String> okStoreIdList = this.hmQrcodeService.getHmStoreForWxa(wxEnterpriseId, enterpriseId) ;
log.info("storeId={}",okStoreIdList);
List<String> storeIdList = storeList.stream().filter(dto->okStoreIdList.contains(dto.getStoreId())).map(dto -> dto.getStoreId()).collect(Collectors.toList());
storeList = storeList.stream().filter(dto->okStoreIdList.contains(dto.getStoreId())).collect(Collectors.toList()) ;
List<String> storeIdList = storeList.stream().map(dto -> dto.getStoreId()).collect(Collectors.toList());
String[] storeIds = new String[storeIdList.size()];
for (int i = 0; i < storeIdList.size(); i++) {
storeIds[i] = storeIdList.get(i);
......@@ -429,9 +430,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
item.setStoreAddress(map.get(item.getStoreId()).getStoreAddress());
}
});
storeList = storeList.stream().filter(dto->okStoreIdList.contains(dto.getStoreId())).collect(Collectors.toList()) ;
}
return storeList ;
}
......
......@@ -41,6 +41,7 @@ import com.gic.haoban.manage.api.dto.statistics.StatisticsDTO;
import com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO;
import com.gic.haoban.manage.api.service.hm.HmLinkApiService;
import com.gic.haoban.manage.api.service.hm.HmPageApiService;
import com.gic.haoban.manage.api.service.hm.HmQrcodeApiService;
import com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService;
import com.gic.haoban.manage.api.service.out.WelcomeApiService;
import com.gic.haoban.manage.api.util.DataHttpUtil;
......@@ -84,6 +85,8 @@ public class HmLinkController {
private MemberTagApiService memberTagApiService;
@Autowired
private WxUserAddLogApiService wxUserAddLogApiService;
@Autowired
private HmQrcodeApiService hmQrcodeApiService ;
@RequestMapping("add")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.HUOMA, optType = GicLogRecordOptTypeEnum.HM_LINK_ADD, userFunc = LogRecordUserServiceImpl.class, optPage = "引流链接-新建链接")
......@@ -604,6 +607,16 @@ public class HmLinkController {
HmLinkDTO link = linkResp.getResult();
Map<String, Object> retMap = new HashMap<>();
HmLinkVO linkVO = EntityUtil.changeEntityByJSON(HmLinkVO.class, link);
//是否达上线
List<String> storeIdList = this.hmQrcodeApiService.getHmStoreForWxa(wxEnterpriseId, enterpriseId) ;
linkVO.getStoreList().forEach(item->{
if(storeIdList.contains(item.getStoreId())) {
item.setIsOver(0);
}else {
item.setIsOver(1);
}
});
String memberLabelId = link.getMemberLabelId();
if (StringUtils.isNotBlank(memberLabelId)) {
MemberTagItemDTO tagItem = this.memberTagApiService.findMemberTagItem(memberLabelId);
......
......@@ -19,6 +19,15 @@ public class HmLinkStoreVO implements Serializable {
private String storeCode;
private String storeName;
private String storeAddress;
private Integer isOver;
public Integer getIsOver() {
return isOver;
}
public void setIsOver(Integer isOver) {
this.isOver = isOver;
}
public String getStoreAddress() {
return storeAddress;
......
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