Commit f977bd31 by 墨竹

Merge remote-tracking branch 'origin/developer' into developer

parents 118b1f63 670edf5e
......@@ -258,16 +258,22 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
if (null != fwStore) {
log.info("处理服务门店逻辑");
List<String> clerkIdList = new ArrayList<>() ;
if (fwStore.getZs() == 1 && StringUtils.isNotBlank(mainClerkId)) {
hm = this.getHmFromClerk(mainClerkId, wxEnterpriseId);
if(StringUtils.isNotBlank(mainClerkId)) {
clerkIdList.add(mainClerkId);
if (fwStore.getZs() == 1) {
hm = this.getHmFromClerk(mainClerkId, wxEnterpriseId);
if(null != hm) {
log.info("获取服务导购活码,mainClerkId={}",mainClerkId);
remarkMap.put("sm", "主门店-服务导购");
}
}
}
if (null == hm && StringUtils.isNotBlank(mainStoreId)) {
hm = this.getHmFormStore(wxEnterpriseId, mainStoreId, fwStore.getDz(), fwStore.getDy(),
clerkIdList);
}
if (null != hm) {
remarkMap.put("sm", "会员主门店活码");
if (null != hm) {
remarkMap.put("sm", "主门店-店长-店员");
}
}
}
// 协管门店
......@@ -287,6 +293,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
}
hm = this.getHmFromClerk(clerkId, wxEnterpriseId);
if (null != hm) {
remarkMap.put("sm", "协管活码-主导购");
storeIdList = null;
break;
}
......@@ -298,6 +305,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
for (String storeId : storeIdList) {
hm = this.getHmFormStore(wxEnterpriseId, storeId, 1, 0, clerkIdList);
if (null != hm) {
remarkMap.put("sm", "协管活码-店长");
break;
}
}
......@@ -307,13 +315,11 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
for (String storeId : storeIdList) {
hm = this.getHmFormStore(wxEnterpriseId, storeId, 0, 1, clerkIdList);
if (null != hm) {
remarkMap.put("sm", "协管活码-店员");
break;
}
}
}
if (null != hm) {
remarkMap.put("sm", "会员协管活码");
}
}
}
}
......@@ -492,7 +498,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
if (dz == 1) {
hm = this.getHmFromClerk(dzClerk.getClerkId(), wxEnterpriseId);
if (null != hm) {
log.info("选择门店后,获取到店长活码,clerkId={},inStoreId={}", hm.getClerkId(), inStoreId);
log.info("获取到店长活码,clerkId={},inStoreId={}", hm.getClerkId(), inStoreId);
}
}
} else {
......@@ -506,10 +512,10 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
list = list.stream().filter(dto -> !clerkIdList.contains(dto.getClerkId())).collect(Collectors.toList());
}
if (CollectionUtils.isNotEmpty(list)) {
log.info("选择门店下{},导购数={}", inStoreId, list.size());
log.info("门店下{},导购数={}", inStoreId, list.size());
hm = list.get(new Random().nextInt(list.size()));
if (null != hm) {
log.info("选择门店后,获取到店员活码,clerkId={},inStoreId={}", hm.getClerkId(), inStoreId);
log.info("获取到店员活码,clerkId={},inStoreId={}", hm.getClerkId(), inStoreId);
}
}
}
......
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