Commit 9d35a22e by ping.wu

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

Merge branches 'feature/20200420_外卖配送费错误_wuping' and 'master' of http://gitlab.freemud.com/order-group-application/order-group
parents 31f563db 43629ad9
......@@ -603,6 +603,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("");
......@@ -1727,6 +1732,9 @@ 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;
......
......@@ -35,6 +35,7 @@ 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"),
TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT");
private Integer code;
......
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