diff --git a/api/service/coupon.go b/api/service/coupon.go index 7d5e3ac..02fc902 100644 --- a/api/service/coupon.go +++ b/api/service/coupon.go @@ -753,15 +753,15 @@ func (r *CouponService) GrantSystemCoupon(couponId, adminUserId int64, req reque tx.Rollback() return false, err } - - go func() { - // 发送通知 - res, _ := PatientDistributeCoupon(coupon.CouponName, user.UserId) - if !res { - utils.LogJsonErr("CouponService-GrantSystemCoupon", "优惠卷通知发送失败") - } - }() } + + go func() { + // 发送通知 + res, _ := PatientDistributeCoupon(coupon.CouponName, user.UserId) + if !res { + utils.LogJsonErr("CouponService-GrantSystemCoupon", "优惠卷通知发送失败") + } + }() } // 添加优惠卷发放记录表