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