Commit fdcff98f by zhiwj

Merge branch 'developer' into 'master'

Developer

See merge request !42
parents 2a569516 a1d05f46
......@@ -1593,14 +1593,22 @@ public class StoreApiServiceImpl implements StoreApiService {
if(StringUtils.isNotBlank(storeSearchDTO.getStoreTags())){
String[] arr = storeSearchDTO.getStoreTags().split(",");
List<TabStoreTag> storeTags = this.storeTagService.listByEnterprise(storeSearchDTO.getEnterpriseId());
storeTags.stream().filter(tag -> {
List<Integer> storeWidgetList = storeTags.stream().filter(tag -> {
for (String s : arr) {
if (tag.getStoreTagId().intValue() == Integer.valueOf(s)) {
if (tag.getStoreTagId() == Integer.parseInt(s)) {
return true;
}
}
return false;
}).map(tag -> storeSearchDTO.getStoreResourceList().add(tag.getStoreTagId()));
}).map(TabStoreTag::getStoreWidgetId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(storeWidgetList)){
List<JSONObject> jsonObjectOrList = new ArrayList<>();
for (Integer storeResource : storeWidgetList) {
String s = this.buildStoreWidgetJson(storeResource, json, jsonObjectOrList);
}
JSONObject object = QueryConditionAssemblyUtil.createListQueryNode(jsonObjectOrList, OperateEnum.OPERATE_OR);
jsonObjectList.add(object);
}
}
String storeWidgetJson = this.buildStoreWidgetJson(storeSearchDTO.getStoreResource() == null ? null : storeSearchDTO.getStoreResource().intValue(), json, jsonObjectList);
/*****如果存在没有门店权限的门店控件id,直接返回*****/
......
......@@ -17,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
*
......@@ -160,7 +162,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return EnterpriseServiceResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
List<StoreDTO> list = serviceResponse.getResult().getResult();
List<Integer> brandIdList = new ArrayList<>();
Set<Integer> brandIdList = new HashSet<>();
List<StoreBrandDTO> brandList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
for (StoreDTO storeDTO : list) {
......@@ -168,7 +170,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
brandIdList.addAll(storeDTO.getStoreBrandIdList());
}
}
List<TabStoreBrand> tabStoreBrands = storeBrandService.listStoreBrandByIds(brandIdList);
List<TabStoreBrand> tabStoreBrands = storeBrandService.listStoreBrandByIds(new ArrayList<>(brandIdList));
brandList = EntityUtil.changeEntityListByJSON(StoreBrandDTO.class, tabStoreBrands);
}
return EnterpriseServiceResponse.success(brandList);
......
package com.gic.store.strategy.impl;
import com.alibaba.fastjson.JSONObject;
import com.gic.member.config.api.dto.UserOwnerDefaultDTO;
import com.gic.member.config.api.service.CardAscriptionConfigService;
import com.gic.spark.api.service.SparkJobApiService;
......@@ -112,10 +113,14 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
storeSearchDbDTO.setStoreInfoIdList(storeInfoIdHasNotClerkMsgList);
String msg = storeService.listStore(storeSearchDbDTO, 1, Integer.MAX_VALUE).stream().map(StoreDTO::getStoreName).collect(Collectors.joining(","));
return String.format("共选中%d家门店,%d家成功启用,%s下无可用导购,无法启用门店,请在门店下至少新建或启用一个导购",
String format = String.format("共选中%d家门店,%d家成功启用,%s下无可用导购,无法启用门店,请在门店下至少新建或启用一个导购",
storeInfoIdList.size(),
CollectionUtils.isNotEmpty(storeInfoIdListNew) ? storeInfoIdListNew.size() : 0,
msg
);
JSONObject object = new JSONObject();
object.put("msg", format);
object.put("json", this.storeService.listStoredByStoreInfoList(storeInfoIdHasNotClerkMsgList, enterpriseId));
return object.toJSONString();
}
}
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