|
@ -2,7 +2,9 @@ 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.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
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; |
|
@ -178,7 +180,7 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc |
|
|
* @author sun |
|
|
* @author sun |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public Result<HomeDesignByCustomerResultDTO> getgridhome(TokenDto tokenDTO, StrangerFormDTO formDTO) { |
|
|
public Result<HomeDesignByCustomerResultDTO> getgridhome(TokenDto tokenDTO, StrangerFormDTO formDTO) throws Exception { |
|
|
//token里边有所属端 userId这些参数 前台传递customerID和gridId
|
|
|
//token里边有所属端 userId这些参数 前台传递customerID和gridId
|
|
|
//1:调用epmet-user服务查询数据 新建网格记录数据
|
|
|
//1:调用epmet-user服务查询数据 新建网格记录数据
|
|
|
VisitedFormDTO vi = new VisitedFormDTO(); |
|
|
VisitedFormDTO vi = new VisitedFormDTO(); |
|
@ -188,7 +190,7 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc |
|
|
epmetUserFeignClient.saveLatestAndVisited(vi); |
|
|
epmetUserFeignClient.saveLatestAndVisited(vi); |
|
|
|
|
|
|
|
|
//2:调用ope-customize服务 获取首页发布数据
|
|
|
//2:调用ope-customize服务 获取首页发布数据
|
|
|
Result<HomeDesignByCustomerResultDTO> res = getCustomerHomeData(formDTO.getCustomerId(),tokenDTO.getClient()); |
|
|
Result<HomeDesignByCustomerResultDTO> res = getCustomerHomeData(formDTO.getCustomerId(),tokenDTO.getApp()); |
|
|
return res; |
|
|
return res; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -200,10 +202,15 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc |
|
|
* @return |
|
|
* @return |
|
|
* @author sun |
|
|
* @author sun |
|
|
*/ |
|
|
*/ |
|
|
public Result<HomeDesignByCustomerResultDTO> getCustomerHomeData(String customerId,String clientType){ |
|
|
public Result<HomeDesignByCustomerResultDTO> getCustomerHomeData(String customerId,String clientType) throws Exception { |
|
|
CustomerHomeFormDTO dto = new CustomerHomeFormDTO(); |
|
|
CustomerHomeFormDTO dto = new CustomerHomeFormDTO(); |
|
|
dto.setCustomerId(customerId); |
|
|
dto.setCustomerId(customerId); |
|
|
dto.setClientType(clientType);//居民端
|
|
|
//居民端 所以参数必须是居民端的参数 否则就是参数错误s
|
|
|
|
|
|
if (AppClientConstant.APP_RESI.equals(clientType)){//居民端
|
|
|
|
|
|
dto.setClientType(NumConstant.ZERO_STR); |
|
|
|
|
|
}else { |
|
|
|
|
|
throw new Exception("参数异常,app端不是指定的居民端,请检查token信息!"); |
|
|
|
|
|
} |
|
|
return operCustomizeFeignClient.getHomeReleaseByCustomer(dto); |
|
|
return operCustomizeFeignClient.getHomeReleaseByCustomer(dto); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|