合并 internal → main: 退款/提现/激活/CI 全面优化 #4

Open
shanshanzhong147 wants to merge 76 commits from internal into main
3 changed files with 4 additions and 0 deletions
Showing only changes of commit 54328b197d - Show all commits
+1
View File
@@ -708,6 +708,7 @@ type (
Price int64 `json:"price"`
Amount int64 `json:"amount"`
Discount int64 `json:"discount"`
PromoDiscount int64 `json:"promo_discount"`
GiftAmount int64 `json:"gift_amount"`
Coupon string `json:"coupon"`
CouponDiscount int64 `json:"coupon_discount"`
@@ -123,6 +123,7 @@ func (l *PreCreateOrderLogic) PreCreateOrder(req *types.PurchaseOrderRequest) (r
amount := int64(math.Round(float64(price) * discount))
discountAmount := price - amount
var promoDiscount int64
var couponAmount int64
if req.Coupon != "" {
couponInfo, err := l.svcCtx.CouponModel.FindOneByCode(l.ctx, req.Coupon)
@@ -185,6 +186,7 @@ func (l *PreCreateOrderLogic) PreCreateOrder(req *types.PurchaseOrderRequest) (r
Price: price,
Amount: amount,
Discount: discountAmount,
PromoDiscount: promoDiscount,
GiftAmount: deductionAmount,
Coupon: req.Coupon,
CouponDiscount: couponAmount,
+1
View File
@@ -2012,6 +2012,7 @@ type PreOrderResponse struct {
Price int64 `json:"price"`
Amount int64 `json:"amount"`
Discount int64 `json:"discount"`
PromoDiscount int64 `json:"promo_discount"`
GiftAmount int64 `json:"gift_amount"`
Coupon string `json:"coupon"`
CouponDiscount int64 `json:"coupon_discount"`