Commit 1b8f43e793aa26f9a356547a0fce2eed6955f0d9
1 parent
0e68a92c
2025 last commit happy new year
Showing
11 changed files
with
112 additions
and
26 deletions
cashier-mall/src/main/java/com/diligrp/cashier/mall/api/RtMallOrderApi.java
| ... | ... | @@ -9,6 +9,7 @@ import com.diligrp.cashier.mall.domain.rtmall.vo.OrderStatusCallbackVO; |
| 9 | 9 | import com.diligrp.cashier.mall.domain.rtmall.vo.OrderSuccessVO; |
| 10 | 10 | import com.diligrp.cashier.mall.service.biz.MallBizOrderService; |
| 11 | 11 | import com.diligrp.cashier.mall.sign.RtMallSign; |
| 12 | +import com.diligrp.cashier.mall.type.OrderType; | |
| 12 | 13 | import com.diligrp.cashier.mall.util.RtMallValidateUtils; |
| 13 | 14 | import com.diligrp.cashier.shared.annotation.ParamLogPrint; |
| 14 | 15 | import com.diligrp.cashier.shared.annotation.RepeatSubmit; |
| ... | ... | @@ -16,7 +17,6 @@ import com.diligrp.cashier.shared.annotation.Sign; |
| 16 | 17 | import com.diligrp.cashier.shared.handler.duplication.SpelDuplicationSubmit; |
| 17 | 18 | import com.diligrp.cashier.shared.util.JsonUtils; |
| 18 | 19 | import jakarta.annotation.Resource; |
| 19 | -import jakarta.validation.Valid; | |
| 20 | 20 | import org.springframework.validation.annotation.Validated; |
| 21 | 21 | import org.springframework.web.bind.annotation.PostMapping; |
| 22 | 22 | import org.springframework.web.bind.annotation.RequestBody; |
| ... | ... | @@ -48,8 +48,9 @@ public class RtMallOrderApi { |
| 48 | 48 | @ParamLogPrint(outPrint = true) |
| 49 | 49 | @Sign(sign = RtMallSign.class) |
| 50 | 50 | @RepeatSubmit(prefix = "order_sync:", value = "#req['order_id']", duplicationSubmit = SpelDuplicationSubmit.class) |
| 51 | - public RtMarkMessage<OrderSuccessVO> createOrder(@Valid @RequestBody Object req) { | |
| 51 | + public RtMarkMessage<OrderSuccessVO> createOrder(@RequestBody Object req) { | |
| 52 | 52 | OrderCO orderCo = JsonUtils.convertValue(req, OrderCO.class); |
| 53 | + orderCo.setOrderType(OrderType.MINI_PROGRAM.code); | |
| 53 | 54 | RtMallValidateUtils.valid(orderCo); |
| 54 | 55 | return RtMarkMessage.success(mallBizOrderService.createOrder(List.of(orderCo))); |
| 55 | 56 | } |
| ... | ... | @@ -62,7 +63,7 @@ public class RtMallOrderApi { |
| 62 | 63 | @PostMapping("/order/v1/info") |
| 63 | 64 | @ParamLogPrint(outPrint = true) |
| 64 | 65 | @Sign(sign = RtMallSign.class) |
| 65 | - public RtMarkMessage<OrderPaymentVO> info(@Valid @RequestBody Object req) { | |
| 66 | + public RtMarkMessage<OrderPaymentVO> info(@RequestBody Object req) { | |
| 66 | 67 | OrderInfoCO orderInfoCo = JsonUtils.convertValue(req, OrderInfoCO.class); |
| 67 | 68 | RtMallValidateUtils.valid(orderInfoCo); |
| 68 | 69 | return RtMarkMessage.success(mallBizOrderService.info(orderInfoCo)); |
| ... | ... | @@ -77,7 +78,7 @@ public class RtMallOrderApi { |
| 77 | 78 | @ParamLogPrint(outPrint = true) |
| 78 | 79 | @Sign(sign = RtMallSign.class) |
| 79 | 80 | @RepeatSubmit(prefix = "status_callback:", value = "#req['order_id']", duplicationSubmit = SpelDuplicationSubmit.class) |
| 80 | - public RtMarkMessage<OrderStatusCallbackVO> statusCallback(@Valid @RequestBody Object req) { | |
| 81 | + public RtMarkMessage<OrderStatusCallbackVO> statusCallback(@RequestBody Object req) { | |
| 81 | 82 | OrderStatusCallbackCO orderStatusCallback = JsonUtils.convertValue(req, OrderStatusCallbackCO.class); |
| 82 | 83 | RtMallValidateUtils.valid(orderStatusCallback); |
| 83 | 84 | return RtMarkMessage.success(mallBizOrderService.statusCallback(orderStatusCallback)); | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/api/RtMallOrderRefundApi.java
| ... | ... | @@ -3,8 +3,8 @@ package com.diligrp.cashier.mall.api; |
| 3 | 3 | import com.diligrp.cashier.mall.domain.rtmall.RtMarkMessage; |
| 4 | 4 | import com.diligrp.cashier.mall.domain.rtmall.co.RefundCO; |
| 5 | 5 | import com.diligrp.cashier.mall.domain.rtmall.co.RefundStatusCO; |
| 6 | -import com.diligrp.cashier.mall.domain.rtmall.vo.RefundVO; | |
| 7 | 6 | import com.diligrp.cashier.mall.domain.rtmall.vo.RefundSuccessVO; |
| 7 | +import com.diligrp.cashier.mall.domain.rtmall.vo.RefundVO; | |
| 8 | 8 | import com.diligrp.cashier.mall.service.biz.MallBizRefundService; |
| 9 | 9 | import com.diligrp.cashier.mall.sign.RtMallSign; |
| 10 | 10 | import com.diligrp.cashier.mall.util.RtMallValidateUtils; |
| ... | ... | @@ -14,7 +14,6 @@ import com.diligrp.cashier.shared.annotation.Sign; |
| 14 | 14 | import com.diligrp.cashier.shared.handler.duplication.SpelDuplicationSubmit; |
| 15 | 15 | import com.diligrp.cashier.shared.util.JsonUtils; |
| 16 | 16 | import jakarta.annotation.Resource; |
| 17 | -import jakarta.validation.Valid; | |
| 18 | 17 | import org.springframework.validation.annotation.Validated; |
| 19 | 18 | import org.springframework.web.bind.annotation.PostMapping; |
| 20 | 19 | import org.springframework.web.bind.annotation.RequestBody; |
| ... | ... | @@ -43,7 +42,7 @@ public class RtMallOrderRefundApi { |
| 43 | 42 | @ParamLogPrint(outPrint = true) |
| 44 | 43 | @Sign(sign = RtMallSign.class) |
| 45 | 44 | @RepeatSubmit(prefix = "refund:", value = "#req['order_id']", duplicationSubmit = SpelDuplicationSubmit.class) |
| 46 | - public RtMarkMessage<RefundSuccessVO> refund(@Valid @RequestBody Object req) { | |
| 45 | + public RtMarkMessage<RefundSuccessVO> refund(@RequestBody Object req) { | |
| 47 | 46 | RefundCO refundCo = JsonUtils.convertValue(req, RefundCO.class); |
| 48 | 47 | RtMallValidateUtils.valid(refundCo); |
| 49 | 48 | return RtMarkMessage.success(mallBizRefundService.refund(refundCo)); |
| ... | ... | @@ -57,7 +56,7 @@ public class RtMallOrderRefundApi { |
| 57 | 56 | @PostMapping("/refund/v1/info") |
| 58 | 57 | @ParamLogPrint(outPrint = true) |
| 59 | 58 | @Sign(sign = RtMallSign.class) |
| 60 | - public RtMarkMessage<RefundVO> info(@Valid @RequestBody Object req) { | |
| 59 | + public RtMarkMessage<RefundVO> info(@RequestBody Object req) { | |
| 61 | 60 | RefundStatusCO refundStatusCo = JsonUtils.convertValue(req, RefundStatusCO.class); |
| 62 | 61 | RtMallValidateUtils.valid(refundStatusCo); |
| 63 | 62 | return RtMarkMessage.success(mallBizRefundService.info(refundStatusCo)); | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/domain/rtmall/co/OrderCO.java
| ... | ... | @@ -42,6 +42,8 @@ public class OrderCO extends RtMarkBaseCO { |
| 42 | 42 | @NotNull(message = "freight_fee is required") |
| 43 | 43 | private Long freightFee; |
| 44 | 44 | |
| 45 | + private Long discountFee; | |
| 46 | + | |
| 45 | 47 | @NotBlank(message = "shop_code is required") |
| 46 | 48 | private String shopCode; |
| 47 | 49 | |
| ... | ... | @@ -53,6 +55,12 @@ public class OrderCO extends RtMarkBaseCO { |
| 53 | 55 | |
| 54 | 56 | private ReceiverInfoCO receiverInfo; |
| 55 | 57 | |
| 58 | + /** | |
| 59 | + * ่ฎขๅ็ฑปๅ | |
| 60 | + * @see com.diligrp.cashier.mall.type.OrderType | |
| 61 | + */ | |
| 62 | + private Integer orderType; | |
| 63 | + | |
| 56 | 64 | public String getOrderId() { |
| 57 | 65 | return orderId; |
| 58 | 66 | } |
| ... | ... | @@ -117,6 +125,14 @@ public class OrderCO extends RtMarkBaseCO { |
| 117 | 125 | this.freightFee = freightFee; |
| 118 | 126 | } |
| 119 | 127 | |
| 128 | + public Long getDiscountFee() { | |
| 129 | + return discountFee; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setDiscountFee(Long discountFee) { | |
| 133 | + this.discountFee = discountFee; | |
| 134 | + } | |
| 135 | + | |
| 120 | 136 | public String getShopCode() { |
| 121 | 137 | return shopCode; |
| 122 | 138 | } |
| ... | ... | @@ -148,4 +164,12 @@ public class OrderCO extends RtMarkBaseCO { |
| 148 | 164 | public void setReceiverInfo(ReceiverInfoCO receiverInfo) { |
| 149 | 165 | this.receiverInfo = receiverInfo; |
| 150 | 166 | } |
| 167 | + | |
| 168 | + public Integer getOrderType() { | |
| 169 | + return orderType; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public void setOrderType(Integer orderType) { | |
| 173 | + this.orderType = orderType; | |
| 174 | + } | |
| 151 | 175 | } | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/domain/rtmall/co/OrderItemCO.java
| ... | ... | @@ -25,6 +25,8 @@ public class OrderItemCO { |
| 25 | 25 | @NotNull(message = "amount is required") |
| 26 | 26 | private Long amount; |
| 27 | 27 | |
| 28 | + private Long discountFee; | |
| 29 | + | |
| 28 | 30 | @NotBlank(message = "item_bn is required") |
| 29 | 31 | private String itemBn; |
| 30 | 32 | |
| ... | ... | @@ -72,6 +74,14 @@ public class OrderItemCO { |
| 72 | 74 | this.amount = amount; |
| 73 | 75 | } |
| 74 | 76 | |
| 77 | + public Long getDiscountFee() { | |
| 78 | + return discountFee; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setDiscountFee(Long discountFee) { | |
| 82 | + this.discountFee = discountFee; | |
| 83 | + } | |
| 84 | + | |
| 75 | 85 | public String getItemBn() { |
| 76 | 86 | return itemBn; |
| 77 | 87 | } | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/model/MallBizOrder.java
| ... | ... | @@ -101,6 +101,11 @@ public class MallBizOrder extends BaseDO { |
| 101 | 101 | private Long freightFee; |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | + * ไผๆ ้้ข(ๅ) | |
| 105 | + */ | |
| 106 | + private Long discountFee; | |
| 107 | + | |
| 108 | + /** | |
| 104 | 109 | * ่ฎขๅ็ถๆ(0-notpay-ๆชๆฏไป-1-payed-ๅทฒๆฏไป 2-notpaycancel-ๆชๆฏไปๅๆถ 3-payedcancel-ๅทฒๆฏไปๅๆถ 4-done-่ฎขๅๅฎๆ 5-buyer_confirm-ๅพ ็จๆทๆถ่ดง) |
| 105 | 110 | * @see OrderState |
| 106 | 111 | */ |
| ... | ... | @@ -254,6 +259,14 @@ public class MallBizOrder extends BaseDO { |
| 254 | 259 | this.freightFee = freightFee; |
| 255 | 260 | } |
| 256 | 261 | |
| 262 | + public Long getDiscountFee() { | |
| 263 | + return discountFee; | |
| 264 | + } | |
| 265 | + | |
| 266 | + public void setDiscountFee(Long discountFee) { | |
| 267 | + this.discountFee = discountFee; | |
| 268 | + } | |
| 269 | + | |
| 257 | 270 | public Integer getState() { |
| 258 | 271 | return state; |
| 259 | 272 | } | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/model/MallBizOrderItem.java
| ... | ... | @@ -59,6 +59,11 @@ public class MallBizOrderItem extends BaseDO { |
| 59 | 59 | private Long amount; |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | + * ไผๆ ้้ข(ๅ) | |
| 63 | + */ | |
| 64 | + private Long discountFee; | |
| 65 | + | |
| 66 | + /** | |
| 62 | 67 | * ๅๅๅพ็ |
| 63 | 68 | */ |
| 64 | 69 | private String pic; |
| ... | ... | @@ -158,6 +163,14 @@ public class MallBizOrderItem extends BaseDO { |
| 158 | 163 | this.amount = amount; |
| 159 | 164 | } |
| 160 | 165 | |
| 166 | + public Long getDiscountFee() { | |
| 167 | + return discountFee; | |
| 168 | + } | |
| 169 | + | |
| 170 | + public void setDiscountFee(Long discountFee) { | |
| 171 | + this.discountFee = discountFee; | |
| 172 | + } | |
| 173 | + | |
| 161 | 174 | public String getPic() { |
| 162 | 175 | return pic; |
| 163 | 176 | } | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/service/biz/impl/MallBizOrderServiceImpl.java
| ... | ... | @@ -17,6 +17,7 @@ import com.diligrp.cashier.mall.exception.RtMartMallException; |
| 17 | 17 | import com.diligrp.cashier.mall.model.*; |
| 18 | 18 | import com.diligrp.cashier.mall.service.biz.MallBizOrderService; |
| 19 | 19 | import com.diligrp.cashier.mall.service.biz.MallBizPaymentService; |
| 20 | +import com.diligrp.cashier.mall.type.OrderState; | |
| 20 | 21 | import com.diligrp.cashier.mall.type.RtMarkErrorCode; |
| 21 | 22 | import com.diligrp.cashier.shared.util.JsonUtils; |
| 22 | 23 | import jakarta.annotation.Resource; |
| ... | ... | @@ -62,7 +63,7 @@ public class MallBizOrderServiceImpl implements MallBizOrderService { |
| 62 | 63 | @Override |
| 63 | 64 | @Transactional(rollbackFor = {Exception.class}) |
| 64 | 65 | public OrderSuccessVO createOrder(List<OrderCO> orderCos) { |
| 65 | - AuthLoginCO authLogin = getAuthLogin(orderCos.getFirst().getUserCode()); | |
| 66 | + AuthLoginCO authLogin = getAuthLogin(orderCos.getFirst().getUserCode(), orderCos.getFirst().getOrderType()); | |
| 66 | 67 | |
| 67 | 68 | // order |
| 68 | 69 | List<MallBizOrder> mallBizOrders = MallBizOrder.of(orderCos, authLogin); |
| ... | ... | @@ -97,9 +98,9 @@ public class MallBizOrderServiceImpl implements MallBizOrderService { |
| 97 | 98 | @Override |
| 98 | 99 | @Transactional(rollbackFor = {Exception.class}) |
| 99 | 100 | public OrderStatusCallbackVO statusCallback(OrderStatusCallbackCO orderStatusCallback) { |
| 100 | - // update order status | |
| 101 | 101 | MallBizOrder mallBizOrder = getByOrderId(orderStatusCallback.getOrderId()); |
| 102 | 102 | |
| 103 | + // update order status | |
| 103 | 104 | MallBizOrder update = mallBizOrder.ofUpdateState(orderStatusCallback); |
| 104 | 105 | int num = mallBizOrderDao.updateByPrimaryKeySelective(update); |
| 105 | 106 | if (num < 1) { |
| ... | ... | @@ -109,14 +110,21 @@ public class MallBizOrderServiceImpl implements MallBizOrderService { |
| 109 | 110 | MallBizPaymentOrder mallBizPaymentOrder = new MallBizPaymentOrder(); |
| 110 | 111 | BeanUtils.copyProperties(orderStatusCallback, mallBizPaymentOrder); |
| 111 | 112 | mallBizPaymentOrder = mallBizPaymentService.paymentOrderInfo(mallBizPaymentOrder); |
| 113 | + | |
| 114 | + // ๅทฒๆฏไปๅๆถ้ๆฌพ ๅทฒๆฏไปๅๆถ ้่ฆ้ๆฌพ | |
| 115 | + if (Objects.equals(mallBizOrder.getState(), OrderState.PAYED.getCode()) | |
| 116 | + && Objects.equals(orderStatusCallback.getOrderStatus(), OrderState.PAYED_CANCEL.getKey())) { | |
| 117 | + // 2025/12/31: ้ๆฌพ ๆๆถไธ้่ฆ ้่ฆ้ๆฌพ็ณ่ฏท | |
| 118 | + } | |
| 112 | 119 | return new OrderStatusCallbackVO(mallBizPaymentOrder.getPayTradeNo()); |
| 113 | 120 | } |
| 114 | 121 | |
| 115 | 122 | /** |
| 116 | 123 | * getAuthLogin |
| 124 | + * userCode = userCode + "_" + channel | |
| 117 | 125 | */ |
| 118 | - private AuthLoginCO getAuthLogin(String userCode) { | |
| 119 | - Object cache = redisTemplate.opsForValue().get(MallConstants.MALL_USER_INFO + userCode); | |
| 126 | + private AuthLoginCO getAuthLogin(String userCode, Integer orderType) { | |
| 127 | + Object cache = redisTemplate.opsForValue().get(MallConstants.MALL_USER_INFO + userCode + "_" + orderType); | |
| 120 | 128 | if (Objects.isNull(cache)) { |
| 121 | 129 | throw new RtMartMallException(RtMarkErrorCode.E5001); |
| 122 | 130 | } | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/service/biz/impl/MallBizRefundServiceImpl.java
| ... | ... | @@ -5,11 +5,10 @@ import com.diligrp.cashier.mall.dao.MallBizOrderDao; |
| 5 | 5 | import com.diligrp.cashier.mall.dao.MallBizRefundDao; |
| 6 | 6 | import com.diligrp.cashier.mall.domain.rtmall.co.RefundCO; |
| 7 | 7 | import com.diligrp.cashier.mall.domain.rtmall.co.RefundStatusCO; |
| 8 | -import com.diligrp.cashier.mall.domain.rtmall.vo.RefundVO; | |
| 9 | 8 | import com.diligrp.cashier.mall.domain.rtmall.vo.RefundSuccessVO; |
| 9 | +import com.diligrp.cashier.mall.domain.rtmall.vo.RefundVO; | |
| 10 | 10 | import com.diligrp.cashier.mall.exception.RtMartMallException; |
| 11 | 11 | import com.diligrp.cashier.mall.model.MallBizOrder; |
| 12 | -import com.diligrp.cashier.mall.model.MallBizPayment; | |
| 13 | 12 | import com.diligrp.cashier.mall.model.MallBizPaymentOrder; |
| 14 | 13 | import com.diligrp.cashier.mall.model.MallBizRefund; |
| 15 | 14 | import com.diligrp.cashier.mall.service.biz.MallBizPaymentService; |
| ... | ... | @@ -43,7 +42,7 @@ public class MallBizRefundServiceImpl implements MallBizRefundService { |
| 43 | 42 | |
| 44 | 43 | /** |
| 45 | 44 | * refund |
| 46 | - * ้ๆฌพๆๅๅ่ฐ | |
| 45 | + * ็ณ่ฏท้ๆฌพๆฅๅฃ | |
| 47 | 46 | */ |
| 48 | 47 | @Override |
| 49 | 48 | @Transactional(rollbackFor = {Exception.class}) | ... | ... |
cashier-mall/src/main/java/com/diligrp/cashier/mall/service/sourcechannel/AbstractSourceChannel.java
| ... | ... | @@ -66,8 +66,8 @@ public abstract class AbstractSourceChannel { |
| 66 | 66 | String tokenKey = MallConstants.MALL_TOKEN + token; |
| 67 | 67 | redisTemplate.opsForValue().set(tokenKey, JsonUtils.toJsonString(authLogin), 1, TimeUnit.DAYS); |
| 68 | 68 | |
| 69 | - // ็จๆทไฟกๆฏ็ผๅญ ไธญ็ใdiliๆฏ็ฌ็ซ็ณป็ป้จ็ฝฒ ๅฏ่ฝๅญๅจ็ธๅ็จๆทid ๆไปฅ้่ฆๅ ไธๆธ ้ | |
| 70 | - String userKey = MallConstants.MALL_USER_INFO + authLogin.getUserCode() + "_" + authLogin.getChannel(); | |
| 69 | + // ็จๆทไฟกๆฏ็ผๅญ ไธญ็ใdiliๆฏ็ฌ็ซ็ณป็ป้จ็ฝฒ ๅฏ่ฝๅญๅจ็ธๅ็จๆทid ๆไปฅ้่ฆๅ ไธๆธ ้ ๅฏ่ฝๅๆถๅญๅจๆไฝๆซ็ ๅๆซ็ ่ดญ-่ฎขๅ็ฑปๅ | |
| 70 | + String userKey = MallConstants.MALL_USER_INFO + authLogin.getUserCode() + "_" + authLogin.getChannel() + "_" + authLogin.getOrderType(); | |
| 71 | 71 | redisTemplate.opsForValue().set(userKey, JsonUtils.toJsonString(authLogin), 1, TimeUnit.DAYS); |
| 72 | 72 | return authUrl; |
| 73 | 73 | } | ... | ... |
cashier-mall/src/main/resources/com/diligrp/cashier/dao/mapper/MallBizOrderDao.xml
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | <result column="shop_name" jdbcType="VARCHAR" property="shopName" /> |
| 18 | 18 | <result column="total_amount" jdbcType="BIGINT" property="totalAmount" /> |
| 19 | 19 | <result column="freight_fee" jdbcType="BIGINT" property="freightFee" /> |
| 20 | + <result column="discount_fee" jdbcType="BIGINT" property="discountFee" /> | |
| 20 | 21 | <result column="state" jdbcType="TINYINT" property="state" /> |
| 21 | 22 | <result column="rtmart_state" jdbcType="TINYINT" property="rtmartState" /> |
| 22 | 23 | <result column="order_time" jdbcType="TIMESTAMP" property="orderTime" /> |
| ... | ... | @@ -28,7 +29,7 @@ |
| 28 | 29 | </resultMap> |
| 29 | 30 | <sql id="Base_Column_List"> |
| 30 | 31 | id, order_no, order_id, trade_id, channel, mch_id, source, order_type, user_code, |
| 31 | - username, company_code, shop_code, shop_name, total_amount, freight_fee, state, | |
| 32 | + username, company_code, shop_code, shop_name, total_amount, freight_fee, discount_fee, state, | |
| 32 | 33 | rtmart_state, order_time, order_expire, version, created_time, modifier_name, modified_time |
| 33 | 34 | </sql> |
| 34 | 35 | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| ... | ... | @@ -47,15 +48,15 @@ |
| 47 | 48 | source, order_type, user_code, |
| 48 | 49 | username, company_code, shop_code, |
| 49 | 50 | shop_name, total_amount, freight_fee, |
| 50 | - state, rtmart_state, order_time, | |
| 51 | - order_expire) | |
| 51 | + discount_fee, state, rtmart_state, | |
| 52 | + order_time, order_expire) | |
| 52 | 53 | values (#{id,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, |
| 53 | 54 | #{tradeId,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, |
| 54 | 55 | #{source,jdbcType=TINYINT}, #{orderType,jdbcType=TINYINT}, #{userCode,jdbcType=VARCHAR}, |
| 55 | 56 | #{username,jdbcType=VARCHAR}, #{companyCode,jdbcType=VARCHAR}, #{shopCode,jdbcType=VARCHAR}, |
| 56 | 57 | #{shopName,jdbcType=VARCHAR}, #{totalAmount,jdbcType=BIGINT}, #{freightFee,jdbcType=BIGINT}, |
| 57 | - #{state,jdbcType=TINYINT}, #{rtmartState,jdbcType=TINYINT}, #{orderTime,jdbcType=TIMESTAMP}, | |
| 58 | - #{orderExpire,jdbcType=INTEGER}) | |
| 58 | + #{discountFee,jdbcType=BIGINT}, #{state,jdbcType=TINYINT}, #{rtmartState,jdbcType=TINYINT}, | |
| 59 | + #{orderTime,jdbcType=TIMESTAMP}, #{orderExpire,jdbcType=INTEGER}) | |
| 59 | 60 | </insert> |
| 60 | 61 | <insert id="insertSelective" parameterType="com.diligrp.cashier.mall.model.MallBizOrder"> |
| 61 | 62 | insert into mall_biz_order |
| ... | ... | @@ -105,6 +106,9 @@ |
| 105 | 106 | <if test="freightFee != null"> |
| 106 | 107 | freight_fee, |
| 107 | 108 | </if> |
| 109 | + <if test="discountFee != null"> | |
| 110 | + discount_fee, | |
| 111 | + </if> | |
| 108 | 112 | <if test="state != null"> |
| 109 | 113 | state, |
| 110 | 114 | </if> |
| ... | ... | @@ -173,6 +177,9 @@ |
| 173 | 177 | <if test="freightFee != null"> |
| 174 | 178 | #{freightFee,jdbcType=BIGINT}, |
| 175 | 179 | </if> |
| 180 | + <if test="discountFee != null"> | |
| 181 | + #{discountFee,jdbcType=BIGINT}, | |
| 182 | + </if> | |
| 176 | 183 | <if test="state != null"> |
| 177 | 184 | #{state,jdbcType=TINYINT}, |
| 178 | 185 | </if> |
| ... | ... | @@ -241,6 +248,9 @@ |
| 241 | 248 | <if test="freightFee != null"> |
| 242 | 249 | freight_fee = #{freightFee,jdbcType=BIGINT}, |
| 243 | 250 | </if> |
| 251 | + <if test="discountFee != null"> | |
| 252 | + discount_fee = #{discountFee,jdbcType=BIGINT}, | |
| 253 | + </if> | |
| 244 | 254 | <if test="state != null"> |
| 245 | 255 | state = #{state,jdbcType=TINYINT}, |
| 246 | 256 | </if> |
| ... | ... | @@ -284,6 +294,7 @@ |
| 284 | 294 | shop_name = #{shopName,jdbcType=VARCHAR}, |
| 285 | 295 | total_amount = #{totalAmount,jdbcType=BIGINT}, |
| 286 | 296 | freight_fee = #{freightFee,jdbcType=BIGINT}, |
| 297 | + discount_fee = #{discountFee,jdbcType=BIGINT}, | |
| 287 | 298 | state = #{state,jdbcType=TINYINT}, |
| 288 | 299 | rtmart_state = #{rtmartState,jdbcType=TINYINT}, |
| 289 | 300 | order_time = #{orderTime,jdbcType=TIMESTAMP}, |
| ... | ... | @@ -298,7 +309,7 @@ |
| 298 | 309 | source, order_type, user_code, |
| 299 | 310 | username, company_code, shop_code, |
| 300 | 311 | shop_name, total_amount, freight_fee, |
| 301 | - order_time, order_expire) | |
| 312 | + discount_fee, order_time, order_expire) | |
| 302 | 313 | values |
| 303 | 314 | <foreach collection="list" item="item" index="index" separator=","> |
| 304 | 315 | (#{item.id,jdbcType=BIGINT}, |
| ... | ... | @@ -316,6 +327,7 @@ |
| 316 | 327 | #{item.shopName,jdbcType=VARCHAR}, |
| 317 | 328 | #{item.totalAmount,jdbcType=BIGINT}, |
| 318 | 329 | #{item.freightFee,jdbcType=BIGINT}, |
| 330 | + #{item.discountFee,jdbcType=BIGINT}, | |
| 319 | 331 | #{item.orderTime,jdbcType=TIMESTAMP}, |
| 320 | 332 | #{item.orderExpire,jdbcType=INTEGER}) |
| 321 | 333 | </foreach> |
| ... | ... | @@ -351,6 +363,9 @@ |
| 351 | 363 | <if test="freightFee != null"> |
| 352 | 364 | freight_fee = #{freightFee,jdbcType=BIGINT}, |
| 353 | 365 | </if> |
| 366 | + <if test="discountFee != null"> | |
| 367 | + discount_fee = #{discountFee,jdbcType=BIGINT}, | |
| 368 | + </if> | |
| 354 | 369 | <if test="state != null"> |
| 355 | 370 | state = #{state,jdbcType=TINYINT}, |
| 356 | 371 | </if> | ... | ... |
cashier-mall/src/main/resources/com/diligrp/cashier/dao/mapper/MallBizOrderItemDao.xml
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | <result column="num" jdbcType="INTEGER" property="num" /> |
| 14 | 14 | <result column="price" jdbcType="BIGINT" property="price" /> |
| 15 | 15 | <result column="amount" jdbcType="BIGINT" property="amount" /> |
| 16 | + <result column="discount_fee" jdbcType="BIGINT" property="discountFee" /> | |
| 16 | 17 | <result column="pic" jdbcType="VARCHAR" property="pic" /> |
| 17 | 18 | <result column="tax_output_rate" jdbcType="VARCHAR" property="taxOutputRate" /> |
| 18 | 19 | <result column="tax_classification_code" jdbcType="VARCHAR" property="taxClassificationCode" /> |
| ... | ... | @@ -20,7 +21,8 @@ |
| 20 | 21 | </resultMap> |
| 21 | 22 | <sql id="Base_Column_List"> |
| 22 | 23 | id, biz_order_id, order_id, sub_order_id, shop_code, shop_name, item_bn, item_name, |
| 23 | - num, price, amount, pic, tax_output_rate, tax_classification_code, tax_classification_name | |
| 24 | + num, price, amount, discount_fee, pic, tax_output_rate, | |
| 25 | + tax_classification_code, tax_classification_name | |
| 24 | 26 | </sql> |
| 25 | 27 | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| 26 | 28 | select |
| ... | ... | @@ -36,13 +38,13 @@ |
| 36 | 38 | insert into mall_biz_order_item (id, biz_order_id, order_id, |
| 37 | 39 | sub_order_id, shop_code, shop_name, |
| 38 | 40 | item_bn, item_name, num, |
| 39 | - price, amount, pic, tax_output_rate, | |
| 41 | + price, amount, discount_fee, pic, tax_output_rate, | |
| 40 | 42 | tax_classification_code, tax_classification_name |
| 41 | 43 | ) |
| 42 | 44 | values (#{id,jdbcType=BIGINT}, #{bizOrderId,jdbcType=BIGINT}, #{orderId,jdbcType=VARCHAR}, |
| 43 | 45 | #{subOrderId,jdbcType=VARCHAR}, #{shopCode,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR}, |
| 44 | 46 | #{itemBn,jdbcType=VARCHAR}, #{itemName,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, |
| 45 | - #{price,jdbcType=BIGINT}, #{amount,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}, #{taxOutputRate,jdbcType=VARCHAR}, | |
| 47 | + #{price,jdbcType=BIGINT}, #{amount,jdbcType=BIGINT}, #{discountFee,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}, #{taxOutputRate,jdbcType=VARCHAR}, | |
| 46 | 48 | #{taxClassificationCode,jdbcType=VARCHAR}, #{taxClassificationName,jdbcType=VARCHAR} |
| 47 | 49 | ) |
| 48 | 50 | </insert> |
| ... | ... | @@ -223,6 +225,7 @@ |
| 223 | 225 | num, |
| 224 | 226 | price, |
| 225 | 227 | amount, |
| 228 | + discount_fee, | |
| 226 | 229 | pic, |
| 227 | 230 | tax_output_rate, |
| 228 | 231 | tax_classification_code, |
| ... | ... | @@ -240,6 +243,7 @@ |
| 240 | 243 | #{item.num,jdbcType=INTEGER}, |
| 241 | 244 | #{item.price,jdbcType=BIGINT}, |
| 242 | 245 | #{item.amount,jdbcType=BIGINT}, |
| 246 | + #{item.discountFee,jdbcType=BIGINT}, | |
| 243 | 247 | #{item.pic,jdbcType=VARCHAR}, |
| 244 | 248 | #{item.taxOutputRate,jdbcType=VARCHAR}, |
| 245 | 249 | #{item.taxClassificationCode,jdbcType=VARCHAR}, | ... | ... |