Commit 830cf3ae by guojuxing

门店列表查询接口调整

parent a7d60955
......@@ -178,13 +178,7 @@ public class StoreController extends DownloadUtils {
Integer userId = UserDetailUtils.getUserDetail().getUserId();
storeSearchDTO.setEnterpriseId(enterpriseId);
List<Integer> storeResourceList = new ArrayList<>();
if (UserDetailUtils.getUserDetail().getStoreResourceId() != null) {
storeResourceList.add(UserDetailUtils.getUserDetail().getStoreResourceId().intValue());
}
if (storeSearchDTO.getStoreResource() != null) {
storeResourceList.add(storeSearchDTO.getStoreResource().intValue());
}
setStoreWidgetId(storeSearchDTO);
//门店标签
ServiceResponse<StoreTagDTO> storeTagResult = storeTagApiService.getByStoreTagId(storeSearchDTO.getStoreTagId());
......@@ -475,6 +469,8 @@ public class StoreController extends DownloadUtils {
@RequestMapping("export-store-list")
public RestResponse exportStoreList(HttpServletRequest request, @RequestBody StoreExportQO storeExportQO){
setStoreWidgetId(storeExportQO);
storeExportQO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
ServiceResponse<Long> response = this.storeApiService.queryStoreCountFromEs(storeExportQO);
if(response.isSuccess() && response.getResult() > 0){
......@@ -557,6 +553,8 @@ public class StoreController extends DownloadUtils {
@RequestMapping("store-qrcode-download")
public RestResponse storeQrcodeDownload(@RequestBody QrcodeQO qrcodeQO){
setStoreWidgetId(qrcodeQO.getStoreSearchDTO());
int total = 0;
if(qrcodeQO.getIsAll() == 1){
StoreSearchDTO storeSearchDTO = qrcodeQO.getStoreSearchDTO();
......@@ -962,5 +960,18 @@ public class StoreController extends DownloadUtils {
return clerkDTO;
}
private void setStoreWidgetId(StoreSearchDTO storeSearchDTO) {
List<Integer> storeResourceList = new ArrayList<>();
if (UserDetailUtils.getUserDetail().getStoreResourceId() != null) {
storeResourceList.add(UserDetailUtils.getUserDetail().getStoreResourceId().intValue());
}
if (storeSearchDTO.getStoreResource() != null) {
storeResourceList.add(storeSearchDTO.getStoreResource().intValue());
}
if (CollectionUtils.isNotEmpty(storeResourceList)) {
storeSearchDTO.setStoreResourceList(storeResourceList);
}
}
}
\ No newline at end of file
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