Commit c7bcb011 by 张跃

会员调用sdk

parent 6114cffb
...@@ -16,6 +16,8 @@ import cn.freemud.enums.ResponseResult; ...@@ -16,6 +16,8 @@ import cn.freemud.enums.ResponseResult;
import cn.freemud.interceptor.ServiceException; import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.thirdparty.CustomScoreClient; import cn.freemud.service.thirdparty.CustomScoreClient;
import cn.freemud.service.thirdparty.CustomerApplicationClient; import cn.freemud.service.thirdparty.CustomerApplicationClient;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.constant.FMStatusCode; import com.freemud.application.sdk.api.constant.FMStatusCode;
import com.freemud.application.sdk.api.log.ErrorLog; import com.freemud.application.sdk.api.log.ErrorLog;
import com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest; import com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest;
...@@ -40,27 +42,35 @@ public class KgdCustomerServceImpl implements CustomerService { ...@@ -40,27 +42,35 @@ public class KgdCustomerServceImpl implements CustomerService {
private CustomerDTO2BOAdapter customerDTO2BOAdapter; private CustomerDTO2BOAdapter customerDTO2BOAdapter;
@Autowired @Autowired
private CustomerBO2DTOAdapter customerBO2DTOAdapter; private CustomerBO2DTOAdapter customerBO2DTOAdapter;
@Autowired
private AssortmentCustomerInfoManager customerInfoManager;
@Override @Override
public CustomerInfo getUserInfoByUserId(String sessionId) { public CustomerInfo getUserInfoByUserId(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo =
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
// if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() ==
// null) {
// throw new ServiceException(ResponseResult.NOT_LOGIN);
// }
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if (customerInfoVo == null)
throw new ServiceException(ResponseResult.NOT_LOGIN); throw new ServiceException(ResponseResult.NOT_LOGIN);
} // CustomerInfoVo result = sessionUserInfo.getResult();
CustomerInfoVo result = sessionUserInfo.getResult();
CustomerInfo customerInfo = new CustomerInfo(); CustomerInfo customerInfo = new CustomerInfo();
if(CollectionUtils.isEmpty(result.getMemberPaids())){ // if(CollectionUtils.isEmpty(result.getMemberPaids())){
customerInfo.setIsMember(false); // customerInfo.setIsMember(false);
} else { // } else {
boolean isMember = result.getMemberPaids().stream().anyMatch(item -> item.getExpiryTime().getTime() > System.currentTimeMillis()); // boolean isMember = result.getMemberPaids().stream().anyMatch(item -> item.getExpiryTime().getTime() >
customerInfo.setIsMember(isMember); // System.currentTimeMillis());
// customerInfo.setIsMember(isMember);
} //
customerInfo.setUserId(result.getMemberId()); // }
customerInfo.setUserId(customerInfoVo.getMemberId());
customerInfo.setIsMember(customerInfoVo.isMemberPaid());
return customerInfo; return customerInfo;
} }
......
...@@ -21,9 +21,12 @@ import cn.freemud.service.ShoppingCartNewService; ...@@ -21,9 +21,12 @@ import cn.freemud.service.ShoppingCartNewService;
import cn.freemud.service.impl.*; import cn.freemud.service.impl.*;
import cn.freemud.service.thirdparty.CustomerApplicationClient; import cn.freemud.service.thirdparty.CustomerApplicationClient;
import cn.freemud.service.thirdparty.StockClient; import cn.freemud.service.thirdparty.StockClient;
import cn.freemud.utils.BeanUtil;
import cn.freemud.utils.PromotionFactory; import cn.freemud.utils.PromotionFactory;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformPartnerStoreDeliveryConfig; import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformPartnerStoreDeliveryConfig;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager; import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare; import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
import com.freemud.application.sdk.api.log.ApiLog; import com.freemud.application.sdk.api.log.ApiLog;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
...@@ -99,7 +102,8 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService ...@@ -99,7 +102,8 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
@Autowired @Autowired
private AssortmentSdkService assortmentSdkService; private AssortmentSdkService assortmentSdkService;
@Autowired
private AssortmentCustomerInfoManager customerInfoManager;
// 配送费逻辑是否使用旧的 // 配送费逻辑是否使用旧的
@Value("${store.delivery.use.old:true}") @Value("${store.delivery.use.old:true}")
private boolean storeDeliveryUseOld; private boolean storeDeliveryUseOld;
...@@ -110,14 +114,18 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService ...@@ -110,14 +114,18 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
* @return * @return
*/ */
public CustomerInfoVo getCustomerInfoVo(String sessionId) { public CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) {
throw new ServiceException(ResponseResult.NOT_LOGIN); // throw new ServiceException(ResponseResult.NOT_LOGIN);
} // }
return sessionUserInfo.getResult(); AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if(customerInfoVo == null) throw new ServiceException(ResponseResult.NOT_LOGIN);;
CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
BeanUtil.convertBean(customerInfoVo,customerInfoVo1);
return customerInfoVo1;
} }
public UserLoginInfoDto convert2UserLoginInfoDto(CustomerInfoVo assortmentCustomerInfoVo) { public UserLoginInfoDto convert2UserLoginInfoDto(CustomerInfoVo assortmentCustomerInfoVo) {
......
...@@ -14,6 +14,8 @@ import cn.freemud.service.thirdparty.CustomerApplicationClient; ...@@ -14,6 +14,8 @@ import cn.freemud.service.thirdparty.CustomerApplicationClient;
import cn.freemud.utils.BeanUtil; import cn.freemud.utils.BeanUtil;
import cn.freemud.utils.LogUtil; import cn.freemud.utils.LogUtil;
import cn.freemud.utils.ResponseUtil; import cn.freemud.utils.ResponseUtil;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.log.ApiLog; import com.freemud.application.sdk.api.log.ApiLog;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
...@@ -29,6 +31,8 @@ public class OpenStoreIappWxappConfigServiceImpl implements OpenStoreIappWxappCo ...@@ -29,6 +31,8 @@ public class OpenStoreIappWxappConfigServiceImpl implements OpenStoreIappWxappCo
@Autowired @Autowired
private CustomerApplicationClient customerApplicationClient; private CustomerApplicationClient customerApplicationClient;
@Autowired
private AssortmentCustomerInfoManager customerInfoManager;
public BaseResponse getOpenStoreIappWxappConfig(OpenStoreIappWxappConfigRequestVo openStoreIappWxappConfigRequestVo){ public BaseResponse getOpenStoreIappWxappConfig(OpenStoreIappWxappConfigRequestVo openStoreIappWxappConfigRequestVo){
// 获取用户信息 // 获取用户信息
...@@ -56,13 +60,18 @@ public class OpenStoreIappWxappConfigServiceImpl implements OpenStoreIappWxappCo ...@@ -56,13 +60,18 @@ public class OpenStoreIappWxappConfigServiceImpl implements OpenStoreIappWxappCo
} }
private CustomerInfoVo getCustomerInfoVo(String sessionId) { private CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) {
throw new ServiceException(ResponseResult.NOT_LOGIN); // throw new ServiceException(ResponseResult.NOT_LOGIN);
} // }
return sessionUserInfo.getResult(); // return sessionUserInfo.getResult();
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if(customerInfoVo == null) throw new ServiceException(ResponseResult.NOT_LOGIN);;
CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
BeanUtil.convertBean(customerInfoVo,customerInfoVo1);
return customerInfoVo1;
} }
} }
...@@ -34,6 +34,7 @@ import cn.freemud.service.impl.calculate.*; ...@@ -34,6 +34,7 @@ import cn.freemud.service.impl.calculate.*;
import cn.freemud.service.shoppingCart.ShoppingCartRelationFactory; import cn.freemud.service.shoppingCart.ShoppingCartRelationFactory;
import cn.freemud.service.shoppingCart.ShoppingCartRelationService; import cn.freemud.service.shoppingCart.ShoppingCartRelationService;
import cn.freemud.service.thirdparty.*; import cn.freemud.service.thirdparty.*;
import cn.freemud.utils.BeanUtil;
import cn.freemud.utils.PromotionFactory; import cn.freemud.utils.PromotionFactory;
import cn.freemud.utils.ResponseUtil; import cn.freemud.utils.ResponseUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -894,14 +895,19 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService { ...@@ -894,14 +895,19 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
} }
private CustomerInfoVo getCustomerInfoVo(String sessionId) { private CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) {
throw new ServiceException(ResponseResult.NOT_LOGIN); // throw new ServiceException(ResponseResult.NOT_LOGIN);
} // }
return sessionUserInfo.getResult(); // return sessionUserInfo.getResult();
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if(customerInfoVo == null) throw new ServiceException(ResponseResult.NOT_LOGIN);;
CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
BeanUtil.convertBean(customerInfoVo,customerInfoVo1);
return customerInfoVo1;
} }
private List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> buildCoupons(List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> oldCoupons, List<ShoppingCartInfoRequestVo.couponCode> coupons){ private List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> buildCoupons(List<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> oldCoupons, List<ShoppingCartInfoRequestVo.couponCode> coupons){
......
...@@ -21,10 +21,7 @@ import cn.freemud.service.CommonService; ...@@ -21,10 +21,7 @@ import cn.freemud.service.CommonService;
import cn.freemud.service.ShoppingCartNewService; import cn.freemud.service.ShoppingCartNewService;
import cn.freemud.service.thirdparty.ActivityClient; import cn.freemud.service.thirdparty.ActivityClient;
import cn.freemud.service.thirdparty.CustomerApplicationClient; import cn.freemud.service.thirdparty.CustomerApplicationClient;
import cn.freemud.utils.PromotionFactory; import cn.freemud.utils.*;
import cn.freemud.utils.PropertyConvertUtil;
import cn.freemud.utils.RedisLock;
import cn.freemud.utils.ResponseUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo; import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
...@@ -702,14 +699,19 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService { ...@@ -702,14 +699,19 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
} }
private CustomerInfoVo getCustomerInfoVo(String sessionId) { private CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) {
return null; // return null;
} // }
return sessionUserInfo.getResult(); // return sessionUserInfo.getResult();
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if(customerInfoVo == null) return null;
CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
BeanUtil.convertBean(customerInfoVo,customerInfoVo1);
return customerInfoVo1;
} }
} }
...@@ -54,6 +54,7 @@ import com.alibaba.fastjson.JSON; ...@@ -54,6 +54,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformPartnerStoreDeliveryConfig; import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformPartnerStoreDeliveryConfig;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager; import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager; import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare; import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
...@@ -2371,14 +2372,19 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2371,14 +2372,19 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
} }
private CustomerInfoVo getCustomerInfoVo(String sessionId) { private CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) { // if (!ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null) {
throw new ServiceException(ResponseResult.NOT_LOGIN); // throw new ServiceException(ResponseResult.NOT_LOGIN);
} // }
return sessionUserInfo.getResult(); // return sessionUserInfo.getResult();
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if(customerInfoVo == null) throw new ServiceException(ResponseResult.NOT_LOGIN);;
CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
BeanUtil.convertBean(customerInfoVo,customerInfoVo1);
return customerInfoVo1;
} }
/** /**
......
...@@ -34,6 +34,8 @@ import cn.freemud.utils.ResponseUtil; ...@@ -34,6 +34,8 @@ import cn.freemud.utils.ResponseUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare; import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
import com.freemud.application.sdk.api.log.ApiLog; import com.freemud.application.sdk.api.log.ApiLog;
import com.freemud.application.sdk.api.log.ErrorLog; import com.freemud.application.sdk.api.log.ErrorLog;
...@@ -112,6 +114,8 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -112,6 +114,8 @@ public class ShoppingCartMCoffeeServiceImpl {
private ProductClient productClient; private ProductClient productClient;
@Autowired @Autowired
private ShoppingCartConvertAdapter shoppingCartConvertAdapter; private ShoppingCartConvertAdapter shoppingCartConvertAdapter;
@Autowired
private AssortmentCustomerInfoManager customerInfoManager;
private static final String nullSeat = "508106"; private static final String nullSeat = "508106";
...@@ -1567,14 +1571,22 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1567,14 +1571,22 @@ public class ShoppingCartMCoffeeServiceImpl {
* @return * @return
*/ */
private CustomerInfoVo getCustomerInfoVo(String sessionId) { private CustomerInfoVo getCustomerInfoVo(String sessionId) {
GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto(); // GetSessionUserInfoDto getSessionUserInfoDto = new GetSessionUserInfoDto();
getSessionUserInfoDto.setIsGetPaid(true); // getSessionUserInfoDto.setIsGetPaid(true);
getSessionUserInfoDto.setSessionId(sessionId); // getSessionUserInfoDto.setSessionId(sessionId);
BaseResponse<CustomerInfoVo> sessionUserInfo = customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto); // BaseResponse<CustomerInfoVo> sessionUserInfo =
if (sessionUserInfo == null || !ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) || sessionUserInfo.getResult() == null || sessionUserInfo.getResult().getMemberId() == null) { // customerApplicationClient.getSessionUserInfo(getSessionUserInfoDto);
// if (sessionUserInfo == null || !ResponseResult.SUCCESS.getCode().equals(sessionUserInfo.getCode()) ||
// sessionUserInfo.getResult() == null || sessionUserInfo.getResult().getMemberId() == null) {
// throw new ServiceException(ResponseResult.NOT_LOGIN);
// }
// return sessionUserInfo.getResult();
AssortmentCustomerInfoVo customerInfoVo = customerInfoManager.getCustomerInfoByObject(sessionId);
if (customerInfoVo == null)
throw new ServiceException(ResponseResult.NOT_LOGIN); throw new ServiceException(ResponseResult.NOT_LOGIN);
} CustomerInfoVo customerInfoVo1 = new CustomerInfoVo();
return sessionUserInfo.getResult(); BeanUtil.convertBean(customerInfoVo, customerInfoVo1);
return customerInfoVo1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment