Commit 04e60863 by ping.wu

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

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

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	order-application-service/pom.xml
parents f190d3b1 43629ad9
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
| 1.4.3-SNAPSHOT | 查询订单返回新增参数 | 侯书虎 | 2020-04-08 | | 1.4.3-SNAPSHOT | 查询订单返回新增参数 | 侯书虎 | 2020-04-08 |
| 1.4.4-SNAPSHOT | 订单扩展信息 | 丁凯 | 2020-04-13 | | 1.4.4-SNAPSHOT | 订单扩展信息 | 丁凯 | 2020-04-13 |
| 1.2.8.RELEASE | 增加延时队列 | 海波 | 2020-04-13 | | 1.2.8.RELEASE | 增加延时队列 | 海波 | 2020-04-13 |
| 1.2.9.RELEASE | oms接单 | 侯书虎 | 2020-04-13 |
| 1.3.0.RELEASE | app订单 | 丁凯 | 2020-04-20 |
| 1.4.5-SNAPSHOT | 订单app渠道 | 丁凯 | 2020-04-16 | | 1.4.5-SNAPSHOT | 订单app渠道 | 丁凯 | 2020-04-16 |
| 1.4.7-SNAPSHOT | 去掉无用字符写入ext_info | 李小二 | 2020-04-17 | | 1.4.7-SNAPSHOT | 去掉无用字符写入ext_info | 李小二 | 2020-04-17 |
| 1.4.8-SNAPSHOT | 增加实际配送费 | 海波 | 2020-04-17 | | 1.4.8-SNAPSHOT | 增加实际配送费 | 海波 | 2020-04-17 |
...@@ -606,6 +606,11 @@ public class OrderSdkAdapter { ...@@ -606,6 +606,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("");
...@@ -1733,6 +1738,9 @@ public class OrderSdkAdapter { ...@@ -1733,6 +1738,9 @@ 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;
......
...@@ -35,6 +35,7 @@ public enum OldOrderAccountType { ...@@ -35,6 +35,7 @@ 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"),
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