Commit 13fc1cfd by huiyang.chen

Merge branch '2020/09/24-运费券-huiyang' into qa

# Conflicts:
#	shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
#	shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
parents ea555471 a0e1e8ef
...@@ -5,6 +5,7 @@ import cn.freemud.entities.vo.*; ...@@ -5,6 +5,7 @@ import cn.freemud.entities.vo.*;
import cn.freemud.service.impl.mcoffee.ShoppingCartMCoffeeServiceImpl; import cn.freemud.service.impl.mcoffee.ShoppingCartMCoffeeServiceImpl;
import cn.freemud.service.impl.mcoffee.entity.CopyShoppingCartRequestVo; import cn.freemud.service.impl.mcoffee.entity.CopyShoppingCartRequestVo;
import cn.freemud.service.impl.mcoffee.entity.MCoffeeAddGoodsRequestVo; import cn.freemud.service.impl.mcoffee.entity.MCoffeeAddGoodsRequestVo;
import cn.freemud.service.impl.mcoffee.entity.MCoffeeCardAddVo;
import cn.freemud.service.impl.mcoffee.entity.SwitchShoppingCartRequestVo; import cn.freemud.service.impl.mcoffee.entity.SwitchShoppingCartRequestVo;
import com.freemud.application.sdk.api.log.ApiAnnotation; import com.freemud.application.sdk.api.log.ApiAnnotation;
import com.freemud.application.sdk.api.log.LogParams; import com.freemud.application.sdk.api.log.LogParams;
...@@ -59,6 +60,15 @@ public class MCoffeeShoppingCartController { ...@@ -59,6 +60,15 @@ public class MCoffeeShoppingCartController {
/** /**
* 修改或者新增购物车中商品
*/
@ApiAnnotation(logMessage = "updateGoodsByCard")
@PostMapping(value = "/card/updateGoods")
public BaseResponse updateGoodsByCard(@Validated @LogParams @RequestBody MCoffeeCardAddVo request) {
return shoppingCartMCoffeeService.updateGoodsByCard(request);
}
/**
* 查询购物车信息 * 查询购物车信息
*/ */
@ApiAnnotation(logMessage = "listCartGoods") @ApiAnnotation(logMessage = "listCartGoods")
......
...@@ -88,6 +88,10 @@ public class ActivityCalculationDiscountRequestDto { ...@@ -88,6 +88,10 @@ public class ActivityCalculationDiscountRequestDto {
*/ */
private String goodsCode; private String goodsCode;
/** /**
* 商品核销券号
*/
private String couponCode;
/**
* 商品ID * 商品ID
*/ */
private String goodsId; private String goodsId;
......
...@@ -116,4 +116,9 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo { ...@@ -116,4 +116,9 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
private String ruleId; private String ruleId;
} }
/**
* 运费卡券
*/
private String freightCouponCode;
} }
...@@ -90,6 +90,7 @@ public enum ResponseResult { ...@@ -90,6 +90,7 @@ public enum ResponseResult {
SHOPPING_CART_PRODUCT_CAN_NOT_USE("44023", "商品不可用"), SHOPPING_CART_PRODUCT_CAN_NOT_USE("44023", "商品不可用"),
SHOPPING_CART_COUPON_CAN_NOT_USE("44024", "商品券不可用"), SHOPPING_CART_COUPON_CAN_NOT_USE("44024", "商品券不可用"),
SHOPPING_CART_LIMIT_ADD("44025", "加购数量超过限制"), SHOPPING_CART_LIMIT_ADD("44025", "加购数量超过限制"),
SHOPPING_CART_GOODS_CHECK_ERROR("44026", "当前餐盘中没有可用券的饮品"),
/** /**
* 订单状态码 * 订单状态码
......
...@@ -372,6 +372,8 @@ public class CalculationServiceImpl { ...@@ -372,6 +372,8 @@ public class CalculationServiceImpl {
calculationDiscountGoods.setGoodsQuantity(goodsQuantity); calculationDiscountGoods.setGoodsQuantity(goodsQuantity);
calculationDiscountGoods.setOriginalPrice(originalPrice); calculationDiscountGoods.setOriginalPrice(originalPrice);
calculationDiscountGoods.setMemberDiscount(memberDiscount); calculationDiscountGoods.setMemberDiscount(memberDiscount);
//新增咖啡月卡券券号
calculationDiscountGoods.setCouponCode(cartGoods.getCouponCode());
ArrayList<ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material> materials = new ArrayList<>(); ArrayList<ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material> materials = new ArrayList<>();
//可选搭配 //可选搭配
...@@ -452,11 +454,8 @@ public class CalculationServiceImpl { ...@@ -452,11 +454,8 @@ public class CalculationServiceImpl {
shoppingCartGoodsResponseVo.setTotalAmount(shoppingCartGoodsResponseVo.getTotalAmount() + totalPackgeAmount); shoppingCartGoodsResponseVo.setTotalAmount(shoppingCartGoodsResponseVo.getTotalAmount() + totalPackgeAmount);
shoppingCartGoodsResponseVo.setNewPackAmount(totalPackgeAmount); shoppingCartGoodsResponseVo.setNewPackAmount(totalPackgeAmount);
shoppingCartGoodsResponseVo.setTotalDiscountAmount(calculationDiscount == null ? 0L : calculationDiscount.getTotalDiscountAmount()); shoppingCartGoodsResponseVo.setTotalDiscountAmount(calculationDiscount == null ? 0L : calculationDiscount.getTotalDiscountAmount());
if(calculationDiscount != null && calculationDiscount.getDeliveryAmount() == null){
shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscount == null ? 0L :calculationDiscount.getDistributionFee());
}
} }
} }
package cn.freemud.service.impl.mcoffee.entity;
import lombok.Data;
@Data
public class MCoffeeCardAddVo extends MCoffeeAddGoodsRequestVo{
/**
* true : 选中
* false : 取消选中
*/
private Boolean isSelect;
}
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