Commit 2400ef70 by guojuxing

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

parents 2318b7f7 ac0ce295
......@@ -147,6 +147,7 @@ public class DataAuthUtils {
MbrVo vo = new MbrVo();
vo.setMbrAreaId(dto.getAreaId().toString());
vo.setMbrAreaName(dto.getName());
vo.setOwnType(dto.getOwnerFlag());
return vo;
}).collect(Collectors.toList());
}
......
......@@ -62,8 +62,8 @@ public class IndexController {
@RequestMapping("index-mbr")
public RestResponse indexMbr(Integer enterpriseId, Integer userId){
//List<MbrVo> mbrArea = this.dataAuthUtils.getMbrArea(userId, enterpriseId);
return RestResponse.success();
List<MbrVo> mbrArea = this.dataAuthUtils.getMbrArea(userId, enterpriseId);
return RestResponse.success(mbrArea);
}
@RequestMapping("index-sales")
......@@ -91,10 +91,10 @@ public class IndexController {
list.add(-1);
onLine.add("-1");
}
//List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
ServiceResponse<IndexMemberDTO> indexMember = this.indexSalesApiService.getIndexMember(enterpriseId, list, onLine,
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null,
null, dateTypeQo.getType(), dateTypeQo.getDate());
mbrAreaIdList, dateTypeQo.getType(), dateTypeQo.getDate());
return RestResponse.success(indexMember.getResult());
}
......
......@@ -88,14 +88,6 @@ public class StoreSearchUtils {
return list;
}
List<Integer> resultList = new ArrayList<>();
TempStoreConditionDTO tempStoreConditionDTO = this.tempStoreConditionApiService.getTempStoreCondition(enterpriseId).getResult();
List<Integer> tempStoreIdList = new ArrayList<>();
if(tempStoreConditionDTO != null) {
Integer tempStoreId = tempStoreConditionDTO.getStoreWidgetId();
tempStoreIdList = this.storeWidgetApiService.listStoreInfoIdByStoreWidgetId(enterpriseId, tempStoreId).getResult();
}
final List<Integer> tempStoreIdListf = tempStoreIdList;
log.info("tempStoreIdList:{}", JSON.toJSONString(tempStoreIdListf));
if(StringUtils.isNotBlank(searchJson)){
JSONObject json = JSON.parseObject(searchJson);
StoreSearchQo storeSearchQo = json.getObject(StoreChannelEnum.OFFLINE.getChannel().toString(), StoreSearchQo.class);
......@@ -111,6 +103,7 @@ public class StoreSearchUtils {
storeSearchDTO.setStoreStatuss(StringUtils.isBlank(storeSearchQo.getStoreStatus()) ? null :storeSearchQo.getStoreStatus().replaceAll(",", " "));
storeSearchDTO.setRealStatuss(StringUtils.isBlank(storeSearchQo.getErpStatus()) ? null :storeSearchQo.getErpStatus().replaceAll(",", " "));
storeSearchDTO.setStoreTags(StringUtils.isBlank(storeSearchQo.getStoreTag()) ? null :storeSearchQo.getStoreTag().replaceAll(",", " "));
storeSearchDTO.setStoreBrandIds(StringUtils.isBlank(storeSearchQo.getStoreBrand()) ? null :storeSearchQo.getStoreBrand().replaceAll(",", " "));
if(storeSearchQo.getAttentionStore() == 1){
List<AttentionStoreDTO> result = this.storeAttentionApiService.pageStoreAttention(userId, enterpriseId, 1, Integer.MAX_VALUE).getResult().getResult();
List<Integer> list = result.stream().filter(t -> {
......@@ -123,11 +116,6 @@ public class StoreSearchUtils {
String storeInfoIds = StringUtils.join(list, " ");
storeSearchDTO.setStoreInfoIds(StringUtils.isNotBlank(storeSearchDTO.getStoreInfoIds()) ? storeSearchDTO.getStoreInfoIds()+" "+ storeInfoIds : storeInfoIds);
}
if(storeSearchQo.getTmpStore() == 0){
if(CollectionUtils.isNotEmpty(tempStoreIdList)){
storeSearchDTO.setStoreInfoIdsOfNot(StringUtils.join(tempStoreIdList, " "));
}
}
ServiceResponse<Page<StoreDTO>> pageServiceResponse = this.storeApiService.listStore(storeSearchDTO, 1, 20000);
log.info("storeResule:{}", JSON.toJSONString(pageServiceResponse));
if(pageServiceResponse.isSuccess() && pageServiceResponse.getResult() != null && CollectionUtils.isNotEmpty(pageServiceResponse.getResult().getResult())){
......@@ -142,11 +130,11 @@ public class StoreSearchUtils {
}
return false;
}).collect(Collectors.toList());
} else {
resultList = storeInfoIdList;
}
}
}
} else {
resultList = storeSearchJsonWhenNull(storeAuth, tempStoreIdListf);
}
if(CollectionUtils.isNotEmpty(resultList)){
RedisUtil.setCache(key, 1, 10L, TimeUnit.MINUTES);
......@@ -157,23 +145,6 @@ public class StoreSearchUtils {
return resultList;
}
private List<Integer> storeSearchJsonWhenNull(StoreAuth storeAuth, final List<Integer> tempStoreIdListf) {
if(CollectionUtils.isNotEmpty(storeAuth.getStoreInfoIdList())){
return storeAuth.getStoreInfoIdList().stream().filter(s -> {
if(CollectionUtils.isNotEmpty(tempStoreIdListf)){
if(tempStoreIdListf.contains(s)){
return false;
}else {
return true;
}
} else {
return true;
}
}).collect(Collectors.toList());
}
return new ArrayList<>();
}
public List<String> onLineStoreSearch(Integer userId, Integer enterpriseId, String searchJson){
OnLineAuth onlineStoreAuth = this.dataAuthUtils.getOnlineStore(userId, enterpriseId);
log.info("onlineStoreAuth:{}", JSON.toJSONString(onlineStoreAuth));
......
......@@ -28,6 +28,10 @@ public class StoreSearchQo {
*/
private Integer hasWgs = 0;
private String storeBrand;
private String resourceType;
public Integer getAll() {
return all;
}
......@@ -115,4 +119,20 @@ public class StoreSearchQo {
public void setHasWgs(Integer hasWgs) {
this.hasWgs = hasWgs;
}
public String getStoreBrand() {
return storeBrand;
}
public void setStoreBrand(String storeBrand) {
this.storeBrand = storeBrand;
}
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
}
......@@ -9,6 +9,7 @@ package com.gic.cloud.web.vo;
public class MbrVo {
private String mbrAreaId;
private String mbrAreaName;
private Integer ownType;
public String getMbrAreaId() {
return mbrAreaId;
......@@ -25,4 +26,12 @@ public class MbrVo {
public void setMbrAreaName(String mbrAreaName) {
this.mbrAreaName = mbrAreaName;
}
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
}
......@@ -12,6 +12,7 @@ public class OnLineStoreVo {
private String idChain;
private String nameChain;
private Integer hasChildren = 0;
private Integer ownType;
public Integer getHasChildren() {
......@@ -53,4 +54,12 @@ public class OnLineStoreVo {
public void setNameChain(String nameChain) {
this.nameChain = nameChain;
}
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
}
......@@ -14,6 +14,10 @@ public class StoreGroupItemsVo {
private Integer isStore = 0;
private Integer hasChildren = 0;
private Integer hasAttention = 0;
/**
* 1自有 2共享
*/
private Integer ownType;
public Integer getId() {
return id;
......@@ -70,4 +74,12 @@ public class StoreGroupItemsVo {
public void setHasAttention(Integer hasAttention) {
this.hasAttention = hasAttention;
}
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
}
......@@ -15,6 +15,10 @@ public class StoreSearchVo {
private Integer channel;
private Integer hasAttention = 0;
private Integer hasChildren = 0;
/**
* 1自有 2共享
*/
private Integer ownType;
public String getId() {
return id;
......@@ -79,4 +83,12 @@ public class StoreSearchVo {
public void setHasChildren(Integer hasChildren) {
this.hasChildren = hasChildren;
}
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
}
......@@ -9,6 +9,10 @@ package com.gic.cloud.web.vo;
public class StoreTypeVo {
private String id;
private String name;
/**
* 1自有 2共享
*/
private Integer ownType;
public String getId() {
return id;
......@@ -25,4 +29,12 @@ public class StoreTypeVo {
public void setName(String name) {
this.name = name;
}
public Integer getOwnType() {
return ownType;
}
public void setOwnType(Integer ownType) {
this.ownType = ownType;
}
}
......@@ -15,6 +15,10 @@ public class StoreWidgetIndexVo {
private Integer attentionCount = 0;
private Integer singleRegion = 0;
private Integer hasWgs = 0;
/**
* 是否显示资源类型 1是 0否
*/
private Integer resourceType=0;
public Integer getType() {
return type;
......@@ -55,4 +59,12 @@ public class StoreWidgetIndexVo {
public void setHasWgs(Integer hasWgs) {
this.hasWgs = hasWgs;
}
public Integer getResourceType() {
return resourceType;
}
public void setResourceType(Integer resourceType) {
this.resourceType = resourceType;
}
}
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