Commit 435e4fc6 by 陶光胜

门店导出修改

parent eefd960f
......@@ -627,16 +627,13 @@ public class StoreApiServiceImpl implements StoreApiService {
@Override
public ServiceResponse<StoreDTO> getStoreByStoreCode(Integer enterpriseId, Integer regionId, String storeCode) {
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setStoreCode(storeCode);
storeSearchDTO.setRegionId(regionId);
ServiceResponse<Page<StoreDTO>> response = this.listStore(storeSearchDTO, 1, 1);
if(response.isSuccess() && response.getResult() != null){
List<StoreDTO> result = response.getResult().getResult();
if(CollectionUtils.isNotEmpty(result)){
return ServiceResponse.success(result.get(0));
}
StoreSearchDBDTO storeSearchDBDTO = new StoreSearchDBDTO();
storeSearchDBDTO.setEnterpriseId(enterpriseId);
storeSearchDBDTO.setStoreCode(storeCode);
storeSearchDBDTO.setRegionId(regionId);
com.github.pagehelper.Page<StoreDTO> page = this.storeService.listStore(storeSearchDBDTO, 1, 1);
if(page != null && CollectionUtils.isNotEmpty(page.getResult())){
return ServiceResponse.success(page.getResult().get(0));
}
return ServiceResponse.success();
}
......
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