From 56e5ac695ba712b6b986b8c2babeeed740573122 Mon Sep 17 00:00:00 2001 From: chenlin Date: Fri, 6 Dec 2024 14:26:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=96=B0=E5=A2=9E=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=EF=BC=8C=E7=BC=96=E8=BE=91=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=A5=E5=8F=82SmsContent=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/models/marketing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/admin/models/marketing.go b/app/admin/models/marketing.go index 7c10306..e242769 100644 --- a/app/admin/models/marketing.go +++ b/app/admin/models/marketing.go @@ -111,6 +111,7 @@ type ErpMarketingCouponCreateReq struct { Amount uint32 `json:"amount" validate:"required"` // 金额(元) UserType uint32 `json:"user_type" validate:"required"` // 领取人限制:1-所有人 2-未付费用户 3-已付费用户 4-尊享会员 Limit uint32 `json:"limit"` // 优惠券叠加限制 0-不限制;1-仅限原价购买时使用 + SmsContent string `json:"sms_content" validate:"required"` // 短信提示内容 } // ErpMarketingCouponEditReq 编辑优惠券入参 @@ -125,6 +126,7 @@ type ErpMarketingCouponEditReq struct { Amount uint32 `json:"amount" validate:"required"` // 金额(元) UserType uint32 `json:"user_type" validate:"required"` // 领取人限制:1-所有人 2-未付费用户 3-已付费用户 4-尊享会员 Limit uint32 `json:"limit"` // 优惠券叠加限制 0-不限制;1-仅限原价购买时使用 + SmsContent string `json:"sms_content" validate:"required"` // 短信提示内容 } // ErpMarketingCouponDetailReq 优惠券详情入参 @@ -255,6 +257,7 @@ func CreateErpMarketingCoupon(req *ErpMarketingCouponCreateReq) error { UserType: req.UserType, Limit: req.Limit, State: ErpCouponUnStarted, + SmsContent: req.SmsContent, } err := orm.Eloquent.Create(erpCoupon).Error @@ -310,6 +313,7 @@ func EditErpMarketingCoupon(req *ErpMarketingCouponEditReq) error { erpCoupon.Amount = req.Amount * 100 erpCoupon.UserType = req.UserType erpCoupon.Limit = req.Limit + erpCoupon.SmsContent = req.SmsContent begin := orm.Eloquent.Begin() err = begin.Model(&ErpCoupon{}).Where("id = ?", req.ErpCouponId).