From 182bfe798d7f9d485d94368d9005daee64cdd1fa Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 2 Feb 2021 16:22:19 +0800 Subject: [PATCH] =?UTF-8?q?sso=E9=99=8C=E7=94=9F=E4=BA=BA=E5=AF=BC?= =?UTF-8?q?=E8=A7=88=E7=BD=91=E6=A0=BC=E5=88=97=E8=A1=A8=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0customerId=E6=A0=A1=E9=AA=8C=20=E4=BB=8Etoken=E4=B8=AD?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StrangerResiGuideController.java | 2 +- .../service/StrangerAccessRecordService.java | 2 +- .../impl/StrangerAccessRecordServiceImpl.java | 26 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java index c50414fdb6..a19e255130 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java @@ -89,7 +89,7 @@ public class StrangerResiGuideController { * @date 2021.01.18 16:39 */ @PostMapping("sso/publiclocationgridlist") - Result> locationGridList(@LoginUser TokenDto dto,@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ + Result> locationGridList(@LoginUser TokenDto dto,@RequestBody CustomerGridListFormDTO customerGridListFormDTO){ ValidatorUtils.validateEntity(customerGridListFormDTO); if(null == dto || StringUtils.isEmpty(dto.getCustomerId())) throw new ValidateException("无法获取客户Id"); return strangerAccessRecordService.listCustomerGridH5(customerGridListFormDTO,dto.getCustomerId()); diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java index f357cb3440..de23a80d7d 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java @@ -128,6 +128,6 @@ public interface StrangerAccessRecordService extends BaseService> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId); + Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId); } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java index a8aa3569c0..271e59d954 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java @@ -312,26 +312,24 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId) { - - ListCustomerGridFormDTO listCustomerGridFormDTO = new ListCustomerGridFormDTO(); - listCustomerGridFormDTO.setAreaCode(StringUtils.isBlank(customerGridListFormDTO.getSelectedAreaCode()) ? - customerGridListFormDTO.getAreaCode() : customerGridListFormDTO.getSelectedAreaCode()); - - listCustomerGridFormDTO.setPageNo(null == customerGridListFormDTO.getPageNo() ? ModuleConstant.MIN_CURRENT_PAGE_NO : customerGridListFormDTO.getPageNo()); - listCustomerGridFormDTO.setPageSize(customerGridListFormDTO.getPageSize()); - listCustomerGridFormDTO.setCustomerId(customerId); - - Result> queryResult = + public Result> listCustomerGridH5(CustomerGridListFormDTO customerGridListFormDTO,String customerId) { + ThirdCustomerGridListFormDTO gridParam = new ThirdCustomerGridListFormDTO(); + gridParam.setAreaCode(StringUtils.isBlank(customerGridListFormDTO.getSelectedAreaCode()) ? + customerGridListFormDTO.getAreaCode() : customerGridListFormDTO.getSelectedAreaCode()); + + gridParam.setPageNo(null == customerGridListFormDTO.getPageNo() ? ModuleConstant.MIN_CURRENT_PAGE_NO : customerGridListFormDTO.getPageNo()); + gridParam.setPageSize(customerGridListFormDTO.getPageSize()); + gridParam.setCustomerId(customerId); + Result> queryResult = govOrgFeignClient - .queryGridListByAreaCode(listCustomerGridFormDTO); + .queryCustomerGridList(gridParam); //Feign调用成功 if (queryResult.success()) { - List queryList = queryResult.getData(); + List queryList = queryResult.getData(); if (null != queryResult && queryList.size() > 0) { StrangerAccessRecordEntity strangerTrance = new StrangerAccessRecordEntity(); - strangerTrance.setLocationAreaCode(listCustomerGridFormDTO.getAreaCode()); + strangerTrance.setLocationAreaCode(gridParam.getAreaCode()); strangerTrance.setIsAuthorized(customerGridListFormDTO.getIsAuthorized()); strangerTrance.setGridNumber(queryList.size()); strangerTrance.setVisitTime(new Date());