Commit 53e3f65a by ping.wu

Merge branches 'feature/20200420_外卖配送费错误_wuping' and 'qa' of…

Merge branches 'feature/20200420_外卖配送费错误_wuping' and 'qa' of http://gitlab.freemud.com/order-group-application/order-group into qa

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	order-application-service/pom.xml
parents 863a9911 074e01b0
......@@ -25,3 +25,4 @@
| 1.2.7.RELEASE | 判断优化 | 丁凯 | 2020-04-03 |
| 1.2.8.RELEASE | 增加延时队列 | 海波 | 2020-04-13 |
| 1.2.9.RELEASE | oms接单 | 侯书虎 | 2020-04-13 |
| 1.3.0.RELEASE | app订单 | 丁凯 | 2020-04-20 |
\ No newline at end of file
......@@ -605,6 +605,11 @@ public class OrderSdkAdapter {
accountBean.setName(orderSettlementResp.getNote());
accountBean.setNumber(1);
accountBean.setPrice(orderSettlementResp.getSettlementAmount() == null ? 0L : orderSettlementResp.getSettlementAmount().longValue());
//处理第三方外卖单优惠金额信息
if(orderSettlementResp.getSettlementAmount() != null && orderSettlementResp.getSettlementAmount().intValue() > 0){
long discountFee = 0 - Math.abs(orderSettlementResp.getSettlementAmount().longValue());
accountBean.setPrice(discountFee);
}
accountBean.setSequence(orderSettlementResp.getProductSeq());
accountBean.setType(getOldOrderAccountType(orderSettlementResp.getSettlementType()));
accountBean.setAddInfo("");
......@@ -1730,9 +1735,15 @@ public class OrderSdkAdapter {
private Integer getOldOrderAccountType(int newOrderAccountType) {
// 新订单服务枚举 OrderSettlementType
switch (newOrderAccountType) {
case 1:
newOrderAccountType = OldOrderAccountType.NEW_USER_DISCOUNT.getCode();
break;
case 2:
newOrderAccountType = OldOrderAccountType.BUY_DISCOUNT.getCode();
break;
case 3:
newOrderAccountType = OldOrderAccountType.PRICE_DEDUCTION_COUPON.getCode();
break;
case 10:
newOrderAccountType = OldOrderAccountType.COUPON.getCode();
break;
......
......@@ -35,6 +35,8 @@ public enum OldOrderAccountType {
CARD_DISCOUNT_AMOUNT(26, "会员卡优惠金额", "CARD_DISCOUNT_AMOUNT"),
XY_DISCOUNT(104, "x件y折", "XY_DISCOUNT"),
FULL_DISTRIBUTION_FEE(1014, "满减配送费", "FULL_DISTRIBUTION_FEE"),
NEW_USER_DISCOUNT(101, "新用户立减", "NEW_USER_DISCOUNT"),
PRICE_DEDUCTION_COUPON(103, "抵价券", "PRICE_DEDUCTION_COUPON"),
TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT");
private Integer code;
......
......@@ -134,7 +134,7 @@ public class OrderAdapter {
ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>();
long deliveryAmount = 0;
long discountDeliveryAmount = 0;
if (deliveryInfoDto != null) {
if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode())) {
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
if(shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount>shoppingCartGoodsDto.getDiscountDeliveryAmount()){
......@@ -597,7 +597,7 @@ public class OrderAdapter {
ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>();
long deliveryAmount = 0;
long discountDeliveryAmount = 0;
if (userDeliveryInfoDto != null) {
if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode())) {
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
if(shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount>shoppingCartGoodsDto.getDiscountDeliveryAmount()){
......
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