Commit b3fd63a5 by hanghang.wang

围餐

parent cdba5eb9
package cn.freemud.aop; package cn.freemud.aop;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.enums.ResponseResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
......
...@@ -97,13 +97,15 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService { ...@@ -97,13 +97,15 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
@Override @Override
public BaseResponse addGoods(AddShoppingCartGoodsRequestVo requestVo) { public BaseResponse addGoods(AddShoppingCartGoodsRequestVo requestVo) {
// 获取用户信息 // 获取用户信息
CustomerInfoVo customerInfo = getCustomerInfoVo(requestVo.getSessionId()); CustomerInfoVo customerInfo = getCustomerInfoVo(requestVo.getSessionId());
//todo 单元测试使用 if (customerInfo == null || customerInfo.getMemberId() == null) {
//customerInfo = test(customerInfo, requestVo.getSessionId()); return ResponseUtil.error(ResponseResult.NOT_LOGIN);
}
checkBase(customerInfo); if (StringUtils.isBlank(customerInfo.getTableNumber()) || StringUtils.isBlank(customerInfo.getStoreId()) || StringUtils.isBlank(customerInfo.getPartnerId())) {
return ResponseUtil.error(ResponseResult.SHOPPING_CART_NO_BIND_TABLE_NUMBER);
}
// checkBase(customerInfo);
String userId = customerInfo.getMemberId(); String userId = customerInfo.getMemberId();
String partnerId = customerInfo.getPartnerId(); String partnerId = customerInfo.getPartnerId();
String storeId = customerInfo.getStoreId(); String storeId = customerInfo.getStoreId();
...@@ -129,7 +131,7 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService { ...@@ -129,7 +131,7 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
List<ProductBeanDTO> productBeanListSpuClass = List<ProductBeanDTO> productBeanListSpuClass =
assortmentSdkService.getProductsInfoSdk(partnerId, storeId, Collections.singletonList(spuId2), BusinessTypeEnum.SAAS_WC.getName(), mealCartBaseService); assortmentSdkService.getProductsInfoSdk(partnerId, storeId, Collections.singletonList(spuId2), BusinessTypeEnum.SAAS_WC.getName(), mealCartBaseService);
if (productBeanListSpuClass == null) { if (productBeanListSpuClass == null) {
throw new ServiceException(ResponseResult.SHOPPING_CART_ADD_ERROR); return ResponseUtil.error(ResponseResult.SHOPPING_CART_ADD_ERROR);
} }
//缓存中获取购物车商品信息 //缓存中获取购物车商品信息
// 注意,围餐和点餐redis数据结构不一样 // 注意,围餐和点餐redis数据结构不一样
......
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