Commit 5ffa7617 by chongfu.liang

重构二期

parent 7ea2e380
......@@ -109,7 +109,12 @@ public class ShoppingCartController {
@ApiAnnotation(logMessage = "listCartGoods")
@PostMapping(value = "/listCartGoods")
public BaseResponse listCartGoods(@Validated @LogParams @RequestBody ShoppingCartInfoRequestVo request) {
return getInstanceByRequest(request).getGoodsList(request);
if (SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).newShoppingCartGray(request.getPartnerId(), request.getShopId())){
Map requestMap = mapperFacade.map(request, Map.class);
return shoppingCartDemoController.listCartGoods(requestMap);
} else {
return getInstanceByRequest(request).getGoodsList(request);
}
}
/**
......@@ -161,9 +166,13 @@ public class ShoppingCartController {
return ResponseUtil.error(ResponseResult.NOT_LOGIN);
}
ShoppingCartInfoRequestVo shoppingCartInfoRequestVo = getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo();
return getInstanceByRequest(shoppingCartInfoRequestVo).
getShoppingCartGoods(shoppingCartInfoRequestVo,
getShoppingCartGoodsApportionRequestVo.getPremiumExchangeActivity());
if (SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).newShoppingCartGray(shoppingCartInfoRequestVo.getPartnerId(), shoppingCartInfoRequestVo.getShopId())){
return shoppingCartDemoController.getShoppingCartGoodsApportion(getShoppingCartGoodsApportionRequestVo);
} else {
return getInstanceByRequest(shoppingCartInfoRequestVo).
getShoppingCartGoods(shoppingCartInfoRequestVo,
getShoppingCartGoodsApportionRequestVo.getPremiumExchangeActivity());
}
}
......
......@@ -161,13 +161,7 @@ public class ShoppingCartDemoController {
@PostMapping(value = "/listCartGoods")
public BaseResponse listCartGoods(@LogParams @RequestBody Map<String, Object> request) {
ListCartGoodsRequestDTO baseRequestDTO = new ListCartGoodsRequestDTO();
try {
BeanUtils.populate(baseRequestDTO, request);
} catch (Exception exception){
return ResponseUtil.error("");
}
ListCartGoodsRequestDTO baseRequestDTO = mapperFacade.map(request, ListCartGoodsRequestDTO.class);
/**
* 是否用新字段,还是沿用老逻辑
*/
......@@ -207,7 +201,6 @@ public class ShoppingCartDemoController {
return ResponseUtil.success(baseApportionVO);
}
return getInstanceByRequest(shoppingCartInfoRequestVo).
getShoppingCartGoods(shoppingCartInfoRequestVo,
getShoppingCartGoodsApportionRequestVo.getPremiumExchangeActivity());
......
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