Commit fe110048 by zhiwj

修改导购查询bug

parent d2e7cdc0
package com.gic.store.service.outer.impl;
import java.util.*;
import java.util.stream.Collectors;
import com.gic.enterprise.constants.Constants;
import com.gic.enterprise.dto.EnterpriseDTO;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.store.entity.TabStoreRegion;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.CollectionUtil;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.constants.Constants;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.response.EnterpriseServiceResponse;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.store.constant.ClerkLogReasonEnum;
import com.gic.store.constant.ImportClerkBatchResultEnum;
import com.gic.store.constant.StoreLogTypeEnum;
......@@ -29,7 +17,17 @@ import com.gic.store.dto.*;
import com.gic.store.dto.clerk.ProcessBatchClerkDTO;
import com.gic.store.entity.TabClerk;
import com.gic.store.entity.TabStoreGroup;
import com.gic.store.entity.TabStoreRegion;
import com.gic.store.service.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author zhiwj
......@@ -181,7 +179,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
if (CollectionUtils.isEmpty(groupIds) || CollectionUtils.isEmpty(storeInfoIdsBySearch)) {
return ServiceResponse.success(new Page<>());
}
storeIdByClerkSearch = getStoreIdByStoreInfoIds(storeInfoIdsBySearch);
storeIdByClerkSearch = getStoreIdByStoreInfoIds(storeInfoIdsBySearch, clerkSearchDTO.getSearch());
} else {
storeIdByClerkSearch = "";
}
......@@ -243,7 +241,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
if (CollectionUtils.isEmpty(groupIds) || CollectionUtils.isEmpty(storeInfoIdsBySearch)) {
return ServiceResponse.success();
}
storeIdByClerkSearch = getStoreIdByStoreInfoIds(storeInfoIdsBySearch);
storeIdByClerkSearch = getStoreIdByStoreInfoIds(storeInfoIdsBySearch, clerkSearchDTO.getSearch());
} else {
storeIdByClerkSearch = "";
}
......@@ -261,9 +259,11 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return ServiceResponse.success(totalClerk);
}
private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch) {
private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch, String search) {
StoreSearchDBDTO storeSearchDBDTO = new StoreSearchDBDTO();
storeSearchDBDTO.setStoreInfoIdList(storeInfoIdsBySearch);
storeSearchDBDTO.setStoreName(search);
storeSearchDBDTO.setStoreCode(search);
List<StoreDTO> dtos = storeService.listStore(storeSearchDBDTO, 1, Integer.MAX_VALUE);
return Optional.ofNullable(dtos).orElse(Collections.emptyList()).stream().map(e -> e.getStoreId().toString())
.reduce((x, y) -> x + " " + y).orElse("");
......
......@@ -63,5 +63,4 @@
<dubbo:service interface="com.gic.store.service.StoreTagApiService" ref="storeTagApiService" timeout="6000" />
<dubbo:service interface="com.gic.store.service.StoreTagTmpApiService" ref="storeTagTmpApiService" timeout="6000" />
<dubbo:service interface="com.gic.store.service.StoreOpenApiService" ref="storeOpenApiService" timeout="6000" />
<dubbo:reference interface="com.gic.marketing.process.api.service.tmpl.WxTemplateRouterApiService" id="wxTemplateRouterApiService" timeout="60000" />
</beans>
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