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
...@@ -24,4 +24,5 @@ ...@@ -24,4 +24,5 @@
| 1.2.5.RELEASE | 满额减配送费 | 海波 | 2020-03-26 | | 1.2.5.RELEASE | 满额减配送费 | 海波 | 2020-03-26 |
| 1.2.7.RELEASE | 判断优化 | 丁凯 | 2020-04-03 | | 1.2.7.RELEASE | 判断优化 | 丁凯 | 2020-04-03 |
| 1.2.8.RELEASE | 增加延时队列 | 海波 | 2020-04-13 | | 1.2.8.RELEASE | 增加延时队列 | 海波 | 2020-04-13 |
| 1.2.9.RELEASE | oms接单 | 侯书虎 | 2020-04-13 | | 1.2.9.RELEASE | oms接单 | 侯书虎 | 2020-04-13 |
\ No newline at end of file | 1.3.0.RELEASE | app订单 | 丁凯 | 2020-04-20 |
\ No newline at end of file
...@@ -605,6 +605,11 @@ public class OrderSdkAdapter { ...@@ -605,6 +605,11 @@ public class OrderSdkAdapter {
accountBean.setName(orderSettlementResp.getNote()); accountBean.setName(orderSettlementResp.getNote());
accountBean.setNumber(1); accountBean.setNumber(1);
accountBean.setPrice(orderSettlementResp.getSettlementAmount() == null ? 0L : orderSettlementResp.getSettlementAmount().longValue()); 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.setSequence(orderSettlementResp.getProductSeq());
accountBean.setType(getOldOrderAccountType(orderSettlementResp.getSettlementType())); accountBean.setType(getOldOrderAccountType(orderSettlementResp.getSettlementType()));
accountBean.setAddInfo(""); accountBean.setAddInfo("");
...@@ -1730,9 +1735,15 @@ public class OrderSdkAdapter { ...@@ -1730,9 +1735,15 @@ public class OrderSdkAdapter {
private Integer getOldOrderAccountType(int newOrderAccountType) { private Integer getOldOrderAccountType(int newOrderAccountType) {
// 新订单服务枚举 OrderSettlementType // 新订单服务枚举 OrderSettlementType
switch (newOrderAccountType) { switch (newOrderAccountType) {
case 1:
newOrderAccountType = OldOrderAccountType.NEW_USER_DISCOUNT.getCode();
break;
case 2: case 2:
newOrderAccountType = OldOrderAccountType.BUY_DISCOUNT.getCode(); newOrderAccountType = OldOrderAccountType.BUY_DISCOUNT.getCode();
break; break;
case 3:
newOrderAccountType = OldOrderAccountType.PRICE_DEDUCTION_COUPON.getCode();
break;
case 10: case 10:
newOrderAccountType = OldOrderAccountType.COUPON.getCode(); newOrderAccountType = OldOrderAccountType.COUPON.getCode();
break; break;
......
...@@ -35,6 +35,8 @@ public enum OldOrderAccountType { ...@@ -35,6 +35,8 @@ public enum OldOrderAccountType {
CARD_DISCOUNT_AMOUNT(26, "会员卡优惠金额", "CARD_DISCOUNT_AMOUNT"), CARD_DISCOUNT_AMOUNT(26, "会员卡优惠金额", "CARD_DISCOUNT_AMOUNT"),
XY_DISCOUNT(104, "x件y折", "XY_DISCOUNT"), XY_DISCOUNT(104, "x件y折", "XY_DISCOUNT"),
FULL_DISTRIBUTION_FEE(1014, "满减配送费", "FULL_DISTRIBUTION_FEE"), 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"); TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT");
private Integer code; private Integer code;
......
...@@ -134,7 +134,7 @@ public class OrderAdapter { ...@@ -134,7 +134,7 @@ public class OrderAdapter {
ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>(); ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>();
long deliveryAmount = 0; long deliveryAmount = 0;
long discountDeliveryAmount = 0; long discountDeliveryAmount = 0;
if (deliveryInfoDto != null) { if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode())) {
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount(); deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount(); discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
if(shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount>shoppingCartGoodsDto.getDiscountDeliveryAmount()){ if(shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount>shoppingCartGoodsDto.getDiscountDeliveryAmount()){
...@@ -597,7 +597,7 @@ public class OrderAdapter { ...@@ -597,7 +597,7 @@ public class OrderAdapter {
ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>(); ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>();
long deliveryAmount = 0; long deliveryAmount = 0;
long discountDeliveryAmount = 0; long discountDeliveryAmount = 0;
if (userDeliveryInfoDto != null) { if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode())) {
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount(); deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount(); discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount();
if(shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount>shoppingCartGoodsDto.getDiscountDeliveryAmount()){ 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