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 a15f26739d..37e8471cfc 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 @@ -24,7 +24,6 @@ import com.epmet.dto.form.StrangerFormDTO; import com.epmet.dto.result.CustomerGridForStrangerResultDTO; import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.service.StrangerAccessRecordService; -import com.epmet.service.StrangerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -43,9 +42,6 @@ import java.util.List; @RequestMapping("stranger") public class StrangerResiGuideController { - @Autowired - private StrangerService strangerService; - @Autowired private StrangerAccessRecordService strangerAccessRecordService; @@ -57,7 +53,7 @@ public class StrangerResiGuideController { **/ @PostMapping("getgridhome") public Result getValidCustomerList(@RequestBody StrangerFormDTO formDTO) throws Exception { - return strangerService.getgridhome(formDTO); + return strangerAccessRecordService.getgridhome(formDTO); } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java deleted file mode 100644 index affa495fd1..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/dao/StrangerDao.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.StrangerEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author sun - */ -@Mapper -public interface StrangerDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java deleted file mode 100644 index 9ee71678a8..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/entity/StrangerEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("stranger") -public class StrangerEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - -} 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 48602670fa..e793afd026 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 @@ -5,7 +5,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StrangerAccessRecordDTO; import com.epmet.dto.form.CustomerGridListFormDTO; +import com.epmet.dto.form.StrangerFormDTO; import com.epmet.dto.result.CustomerGridForStrangerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.entity.StrangerAccessRecordEntity; import java.util.List; @@ -96,4 +98,12 @@ public interface StrangerAccessRecordService extends BaseService> listCustomerGrid(CustomerGridListFormDTO customerGridListFormDTO); + + /** + * 居民端-网格链接获取客户首页配置 + * @param + * @return void + * @author sun + */ + Result getgridhome(StrangerFormDTO formDTO); } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java deleted file mode 100644 index f2107ccc13..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerService.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.form.StrangerFormDTO; -import com.epmet.dto.result.HomeDesignByCustomerResultDTO; -import com.epmet.entity.StrangerEntity; - -public interface StrangerService extends BaseService { - - /** - * 居民端-网格链接获取客户首页配置 - * @param - * @return void - * @author sun - */ - Result getgridhome(StrangerFormDTO formDTO); -} 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 f955d837ff..4a8a67221d 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 @@ -7,11 +7,13 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.StrangerAccessRecordDao; import com.epmet.dto.StrangerAccessRecordDTO; -import com.epmet.dto.form.CustomerGridListFormDTO; -import com.epmet.dto.form.ListCustomerGridFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerGridForStrangerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.entity.StrangerAccessRecordEntity; +import com.epmet.feign.EpmetUserFeignClient; import com.epmet.feign.GovOrgFeignClient; +import com.epmet.feign.OperCustomizeFeignClient; import com.epmet.service.StrangerAccessRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -39,6 +41,10 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl getgridhome(StrangerFormDTO formDTO) { + //token里边有所属端 userId这些参数 前台传递customerID和gridId + //1:调用epmet-user服务查询数据 新建网格记录数据 + VisitedFormDTO vi = new VisitedFormDTO(); + vi.setGridId(formDTO.getGridId()); + vi.setCustomerId(formDTO.getCustomerId()); + //vi.setUserId(token获取); + epmetUserFeignClient.saveLatestAndVisited(vi); + + //2:调用ope-customize服务 获取首页发布数据 + Result res = getCustomerHomeData(formDTO.getCustomerId()); + return res; + + } + + /** + * 调用oper-customize服务 获取首页发布数据 + * @param customerId + * @return + * @author sun + */ + public Result getCustomerHomeData(String customerId){ + CustomerHomeFormDTO dto = new CustomerHomeFormDTO(); + dto.setCustomerId(customerId); + //dto.setClientType(token中获取);//居民端 + return operCustomizeFeignClient.getHomeReleaseByCustomer(dto); + } + } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java deleted file mode 100644 index 49d22d716b..0000000000 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerServiceImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.service.impl; - -import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.StrangerDao; -import com.epmet.dto.form.CustomerHomeFormDTO; -import com.epmet.dto.form.StrangerFormDTO; -import com.epmet.dto.form.VisitedFormDTO; -import com.epmet.dto.result.HomeDesignByCustomerResultDTO; -import com.epmet.entity.StrangerEntity; -import com.epmet.feign.EpmetUserFeignClient; -import com.epmet.feign.OperCustomizeFeignClient; -import com.epmet.service.StrangerService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * 居民端-陌生人导览 - * - * @author sun - * @since v1.0.0 2020-03-11 - */ -@Service -public class StrangerServiceImpl extends BaseServiceImpl implements StrangerService { - - @Autowired - private EpmetUserFeignClient epmetUserFeignClient; - @Autowired - private OperCustomizeFeignClient operCustomizeFeignClient; - - /** - * 居民端-网格链接获取客户首页配置 - * @return void - * @author sun - */ - @Override - public Result getgridhome(StrangerFormDTO formDTO) { - //token里边有所属端 userId这些参数 前台传递customerID和gridId - //1:调用epmet-user服务查询数据 新建网格记录数据 - VisitedFormDTO vi = new VisitedFormDTO(); - vi.setGridId(formDTO.getGridId()); - vi.setCustomerId(formDTO.getCustomerId()); - //vi.setUserId(token获取); - epmetUserFeignClient.saveLatestAndVisited(vi); - - //2:调用ope-customize服务 获取首页发布数据 - Result res = getCustomerHomeData(formDTO.getCustomerId()); - return res; - - } - - /** - * 调用oper-customize服务 获取首页发布数据 - */ - public Result getCustomerHomeData(String customerId){ - CustomerHomeFormDTO dto = new CustomerHomeFormDTO(); - dto.setCustomerId(customerId); - //dto.setClientType(token中获取);//居民端 - return operCustomizeFeignClient.getHomeReleaseByCustomer(dto); - } - -}