Browse Source

Merge remote-tracking branch 'origin/dev1.0-resiguide' into dev1.0-resiguide

# Conflicts:
#	epmet-gateway/pom.xml
#	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/controller/DemoController.java
#	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
#	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
#	epmet-user/epmet-user-server/pom.xml
dev_shibei_match
wangchao 6 years ago
parent
commit
800b67de82
  1. 4
      epmet-gateway/pom.xml
  2. 3
      epmet-gateway/src/main/resources/bootstrap.yml
  3. 1
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/controller/DemoController.java
  4. 2
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  5. 1
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java
  6. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
  7. 1
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java
  8. 33
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java
  9. 6
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java
  10. 3
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java
  11. 14
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java
  12. 12
      epmet-user/epmet-user-server/pom.xml
  13. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java

4
epmet-gateway/pom.xml

@ -141,8 +141,8 @@
<!-- <gateway.routes.oper-crm-server.uri>lb://oper-crm-server</gateway.routes.oper-crm-server.uri>-->
<gateway.routes.oper-crm-server.uri>http://127.0.0.1:8090</gateway.routes.oper-crm-server.uri>
<!-- 12、居民端陌生人导览 -->
<!-- <gateway.routes.resi-guide-server.uri>lb://resi-guide-server</gateway.routes.resi-guide-server.uri>-->
<gateway.routes.resi-guide-server.uri>http://localhost:8091</gateway.routes.resi-guide-server.uri>
<!-- <gateway.routes.resi-guide-server.uri>lb://oper-crm-server</gateway.routes.resi-guide-server.uri>-->
<gateway.routes.resi-guide-server.uri>http://127.0.0.1:8091</gateway.routes.resi-guide-server.uri>
<!-- 13、政府组织管理 -->
<!-- <gateway.routes.gov-org-server.uri>lb://gov-org-server</gateway.routes.gov-org-server.uri>-->
<gateway.routes.gov-org-server.uri>http://127.0.0.1:8092</gateway.routes.gov-org-server.uri>

3
epmet-gateway/src/main/resources/bootstrap.yml

@ -127,6 +127,7 @@ spring:
- Path=${server.servlet.context-path}/resi/guide/**
filters:
- StripPrefix=1
- CpAuth=true
#政府端组织管理
- id: gov-org-server
uri: @gateway.routes.gov-org-server.uri@
@ -179,6 +180,7 @@ renren:
- /epmetuser/**
- /gov/org/**
- /oper/access/**
- /resi/guide/**
management:
endpoints:
web:
@ -239,6 +241,7 @@ epmet:
- /epmetuser/**
- /gov/org/**
- /oper/access/**
- /resi/guide/**
swaggerUrls:
jwt:

1
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/controller/DemoController.java

@ -180,4 +180,5 @@ public class DemoController {
public Result<UserDetail> getSysUserInfoById(@RequestParam("id") Long id) {
return demoService.getSysUserInfoById(id);
}
}

2
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -3,7 +3,6 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.feign.impl.GovOrgFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -17,4 +16,5 @@ import org.springframework.web.bind.annotation.PathVariable;
public interface GovOrgFeignClient {
@GetMapping("gov/org/customergrid/getcustomergrid/{id}")
Result<CustomerGridDTO> getcustomergrid(@PathVariable("id") String id);
}

1
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java

@ -154,4 +154,5 @@ public interface DemoService extends BaseService<DemoEntity> {
* @Date 2020/3/20 9:37
**/
Result<UserDetail> getSysUserInfoById(Long id);
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java

@ -94,11 +94,6 @@ public class CustomerGridController {
ExcelUtils.exportExcelToTarget(response, null, list, CustomerGridExcel.class);
}
@GetMapping("getcustomergrid/{id}")
public Result<CustomerGridDTO> getcustomergrid(@PathVariable("id") String id){
CustomerGridDTO data = customerGridService.get(id);
return new Result<CustomerGridDTO>().ok(data);
}
/**
* 供epmet-user服务调用 查询客户网格表数据
* @author sun
@ -124,4 +119,9 @@ public class CustomerGridController {
return customerGridService.listGridForStrangerByOrder(listCustomerGridFormDTO);
}
@GetMapping("getcustomergrid/{id}")
public Result<CustomerGridDTO> getcustomergrid(@PathVariable("id") String id){
CustomerGridDTO data = customerGridService.get(id);
return new Result<CustomerGridDTO>().ok(data);
}
}

1
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/HomeController.java

@ -92,7 +92,6 @@ public class HomeController {
@PostMapping("gethomereleasebycustomer")
public Result<HomeDesignByCustomerResultDTO> getHomeReleaseByCustomer(@RequestBody CustomerHomeFormDTO formDTO) {
formDTO.setStatus(OperCustomizeConstant.STATUS);//已发布数据
formDTO.setClientType("0");//居民端(token中获取)
ValidatorUtils.validateEntity(formDTO);
return homeService.getHomeReleaseByCustomer(formDTO);
}

33
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java

@ -116,24 +116,31 @@ public class HomeServiceImpl implements HomeService {
@Override
public Result<HomeDesignByCustomerResultDTO> getHomeReleaseByCustomer(CustomerHomeFormDTO formDTO) {
HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO();
//根据客户id,所属端获取客户首页配置的设计稿
List<CommonComponentDesignResultDTO> list = customerHomeDetailDao.getHomeReleaseByCustomer(formDTO);
List<CommonComponentDesignResultDTO> flist = new ArrayList<CommonComponentDesignResultDTO>();//功能组件
List<String> usedComponent=new ArrayList<>();//使用的组件集合
List<CommonComponentDesignResultDTO> titlelist=new ArrayList<CommonComponentDesignResultDTO>();
List<CommonComponentDesignResultDTO> toplist=new ArrayList<CommonComponentDesignResultDTO>();
List<CommonComponentDesignResultDTO> functionlist=new ArrayList<CommonComponentDesignResultDTO>();
List<CommonComponentDesignResultDTO> floatlist=new ArrayList<CommonComponentDesignResultDTO>();
//List<String> usedComponent=new ArrayList<>();//使用过的组件集合
for(CommonComponentDesignResultDTO c:list){
usedComponent.add(c.getComponentId());
//usedComponent.add(c.getComponentId());
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
if("titleList".equals(c.getRegion())){
resultDTO.setTitleList(c);
}else if("topList".equals(c.getRegion())){
resultDTO.setTopList(c);
}else if("functionList".equals(c.getRegion())){
flist.add(c);
}else if("floatingList".equals(c.getRegion())){
resultDTO.setFloatingList(c);
if(ReginConstant.titleList.equals(c.getRegion())){
titlelist.add(c);
}else if(ReginConstant.topList.equals(c.getRegion())){
toplist.add(c);
}else if(ReginConstant.functionList.equals(c.getRegion())){
functionlist.add(c);
}else if(ReginConstant.floatingList.equals(c.getRegion())){
floatlist.add(c);
}
}
resultDTO.setFunctionList(flist);
resultDTO.setUsedComponentIdList(usedComponent);
resultDTO.setTitleList(titlelist);
resultDTO.setTopList(toplist);
resultDTO.setFloatingList(floatlist);
resultDTO.setFunctionList(functionlist);
//resultDTO.setUsedComponentIdList(usedComponent);
return new Result<HomeDesignByCustomerResultDTO>().ok(resultDTO);
}
}

6
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java

@ -17,6 +17,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CustomerGridListFormDTO;
@ -52,8 +54,8 @@ public class StrangerResiGuideController {
* @Date 2020/3/16
**/
@PostMapping("getgridhome")
public Result<HomeDesignByCustomerResultDTO> getValidCustomerList(@RequestBody StrangerFormDTO formDTO) throws Exception {
return strangerAccessRecordService.getgridhome(formDTO);
public Result<HomeDesignByCustomerResultDTO> getValidCustomerList( @LoginUser TokenDto tokenDTO, @RequestBody StrangerFormDTO formDTO) throws Exception {
return strangerAccessRecordService.getgridhome(tokenDTO, formDTO);
}

3
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/StrangerAccessRecordService.java

@ -2,6 +2,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StrangerAccessRecordDTO;
import com.epmet.dto.form.CustomerGridListFormDTO;
@ -105,5 +106,5 @@ public interface StrangerAccessRecordService extends BaseService<StrangerAccessR
* @return void
* @author sun
*/
Result<HomeDesignByCustomerResultDTO> getgridhome(StrangerFormDTO formDTO);
Result<HomeDesignByCustomerResultDTO> getgridhome(TokenDto tokenDTO, StrangerFormDTO formDTO);
}

14
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.StrangerAccessRecordDao;
@ -177,31 +178,32 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc
* @author sun
*/
@Override
public Result<HomeDesignByCustomerResultDTO> getgridhome(StrangerFormDTO formDTO) {
public Result<HomeDesignByCustomerResultDTO> getgridhome(TokenDto tokenDTO, StrangerFormDTO formDTO) {
//token里边有所属端 userId这些参数 前台传递customerID和gridId
//1:调用epmet-user服务查询数据 新建网格记录数据
VisitedFormDTO vi = new VisitedFormDTO();
vi.setGridId(formDTO.getGridId());
vi.setCustomerId(formDTO.getCustomerId());
//vi.setUserId(token获取);
vi.setUserId(tokenDTO.getUserId());//token中获取userId
epmetUserFeignClient.saveLatestAndVisited(vi);
//2:调用ope-customize服务 获取首页发布数据
Result<HomeDesignByCustomerResultDTO> res = getCustomerHomeData(formDTO.getCustomerId());
Result<HomeDesignByCustomerResultDTO> res = getCustomerHomeData(formDTO.getCustomerId(),tokenDTO.getClient());
return res;
}
/**
* 调用oper-customize服务 获取首页发布数据
* @param customerId
* @param customerId 客户Id
* @param clientType 所属端
* @return
* @author sun
*/
public Result<HomeDesignByCustomerResultDTO> getCustomerHomeData(String customerId){
public Result<HomeDesignByCustomerResultDTO> getCustomerHomeData(String customerId,String clientType){
CustomerHomeFormDTO dto = new CustomerHomeFormDTO();
dto.setCustomerId(customerId);
//dto.setClientType(token中获取);//居民端
dto.setClientType(clientType);//居民端
return operCustomizeFeignClient.getHomeReleaseByCustomer(dto);
}

12
epmet-user/epmet-user-server/pom.xml

@ -64,6 +64,18 @@
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-org-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-org-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridVisitedServiceImpl.java

@ -143,11 +143,10 @@ public class GridVisitedServiceImpl extends BaseServiceImpl<GridVisitedDao, Grid
public void saveGridVisited(VisitedFormDTO formDTO,CustomerGridDTO cu) {
Date date = new Date();
GridVisitedDTO vi = new GridVisitedDTO();
vi.setIsRegister(getRegister("0"));//token中获取是否注册
vi.setIsRegister(getRegister("0"));//后续再其他服务中获取这个状态值
vi.setCustomerId(cu.getCustomerId());
vi.setGridId(cu.getId());
// vi.setCustomerUserId(formDTO.getUserId());//token传递的值
vi.setCustomerUserId("1111111111");//token传递的值
vi.setCustomerUserId(formDTO.getUserId());
vi.setVisitTime(date);
vi.setUpdatedTime(date);
//查询是否存在历史数据( 一个用户一天对一个网格只存在一条访问记录)

Loading…
Cancel
Save