From fec6306b3cf56f08ad61e221d05d9627393644a7 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Fri, 14 Jun 2024 17:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=80=E8=BF=98=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BC=98=E6=83=A0=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/OrderInquiry.go | 2 +- api/service/order.go | 4 ++-- api/service/orderProduct.go | 2 +- api/service/orderServicePackage.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/service/OrderInquiry.go b/api/service/OrderInquiry.go index 980efbc..e4fa26e 100644 --- a/api/service/OrderInquiry.go +++ b/api/service/OrderInquiry.go @@ -176,7 +176,7 @@ func (r *OrderInquiryService) CancelOrderInquiry(req requests.CancelOrderInquiry // 模拟退款时手动退还优惠卷 if orderInquiry.CouponAmountTotal > 0 { orderService := OrderService{} - res, err := orderService.ReturnOrderCoupon(orderInquiry.InquiryNo, tx) + res, err := orderService.ReturnOrderCoupon(orderInquiry.OrderId, tx) if err != nil || !res { // 退还优惠卷失败 tx.Rollback() diff --git a/api/service/order.go b/api/service/order.go index 5252cac..5b5a346 100644 --- a/api/service/order.go +++ b/api/service/order.go @@ -409,13 +409,13 @@ func (r *OrderService) PdfToImg() (bool, error) { } // ReturnOrderCoupon 退还用户优惠卷 -func (r *OrderService) ReturnOrderCoupon(orderNo string, tx *gorm.DB) (bool, error) { +func (r *OrderService) ReturnOrderCoupon(orderId int64, tx *gorm.DB) (bool, error) { orderCouponDao := dao.OrderCouponDao{} userCouponDao := dao.UserCouponDao{} // 获取该订单全部优惠卷数据 maps := make(map[string]interface{}) - maps["order_no"] = orderNo + maps["order_id"] = orderId orderCoupons, err := orderCouponDao.GetOrderCouponList(maps) if err != nil { return false, err diff --git a/api/service/orderProduct.go b/api/service/orderProduct.go index c92b03f..278318d 100644 --- a/api/service/orderProduct.go +++ b/api/service/orderProduct.go @@ -227,7 +227,7 @@ func (r *OrderProductService) CancelOrderProduct(req requests.CancelOrderProduct // 模拟退款时手动退还优惠卷 if orderProduct.CouponAmountTotal > 0 { orderService := OrderService{} - res, err := orderService.ReturnOrderCoupon(orderProduct.OrderProductNo, tx) + res, err := orderService.ReturnOrderCoupon(orderProduct.OrderId, tx) if err != nil || !res { // 退还优惠卷失败 tx.Rollback() diff --git a/api/service/orderServicePackage.go b/api/service/orderServicePackage.go index 5dfa474..dfcb515 100644 --- a/api/service/orderServicePackage.go +++ b/api/service/orderServicePackage.go @@ -285,7 +285,7 @@ func (r *OrderServicePackageService) CancelOrderServicePackage(req requests.Canc // 模拟退款时手动退还优惠卷 if orderServicePackage.CouponAmountTotal > 0 { orderService := OrderService{} - res, err := orderService.ReturnOrderCoupon(orderServicePackage.OrderServiceNo, tx) + res, err := orderService.ReturnOrderCoupon(orderServicePackage.OrderId, tx) if err != nil || !res { // 退还优惠卷失败 tx.Rollback()