Commit 0d73e11f by 徐高华

log

parent 0d621fc3
......@@ -187,9 +187,13 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 直接返回门店的导购活码,如果没有返回错误
if (null == hm && StringUtils.isNotBlank(inStoreId)) {
String customRuleJson = link.getCustomRuleJson();
log.info("自定义规则={}", customRuleJson);
log.info("选门店后,whitchStore={},自定义规则={}", whitchStore,customRuleJson);
JSONObject storeRuleObj = JSONObject.parseObject(customRuleJson);
int openFlag = storeRuleObj.getIntValue("open");
// whitchStore 1推荐门店 2附件门店 3省市区门店
if(null == whitchStore) {
whitchStore = 1 ;
}
if (openFlag == 1) {
int dz = 0, dy = 0;
// 1推荐门店 2附件门店 3省市区门店
......@@ -199,8 +203,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
HmLinkStoreSettingDTO cityStore = storeRuleObj.getObject("city_store", HmLinkStoreSettingDTO.class);
dz = cityStore.getDz();
dy = cityStore.getDy();
}
if (whitchStore == 1 || whitchStore == 2) {
}else if (whitchStore == 1 || whitchStore == 2) {
HmLinkStoreSettingDTO store = storeRuleObj.getObject("store", HmLinkStoreSettingDTO.class);
if (whitchStore == 2 || (storeType == 1 && whitchStore == 1)) {
// 附近门店 或者 推荐门店
......@@ -471,6 +474,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
ClerkDTO dzClerk = this.clerkService.getClerkLeaderByStoreId(inStoreId);
if (null != dzClerk) {
hm = this.getHmFromClerk(dzClerk.getClerkId(), wxEnterpriseId);
if(null != hm) {
log.info("选择门店后,获取到店长活码,clerkId={},inStoreId={}",hm.getClerkId(),inStoreId);
}
} else {
log.info("店长不存在,storeId={}", inStoreId);
}
......@@ -478,7 +484,11 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
if (null == hm && dy == 1) {
List<HmQrcodeBO> list = this.hmQrcodeService.listByStoreId(wxEnterpriseId, inStoreId, 0);
if (CollectionUtils.isNotEmpty(list)) {
log.info("选择门店下{},导购数={}",inStoreId,list.size());
hm = list.get(new Random().nextInt(list.size()));
if(null != hm) {
log.info("选择门店后,获取到店员活码,clerkId={},inStoreId={}",hm.getClerkId(),inStoreId);
}
}
}
return hm;
......
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