Commit 43629ad9 by ping.wu

匹配优惠类型:新用户立减

parent f784b8f1
...@@ -603,6 +603,11 @@ public class OrderSdkAdapter { ...@@ -603,6 +603,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("");
...@@ -1725,6 +1730,9 @@ public class OrderSdkAdapter { ...@@ -1725,6 +1730,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;
......
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