From 1f15b51145524ec2b0ed77c01b0b88691d6c3a0f Mon Sep 17 00:00:00 2001 From: lijikun Date: Sat, 4 Jan 2025 18:01:31 +0800 Subject: [PATCH] =?UTF-8?q?1=E6=9C=884=E6=97=A5=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=8D=A1=E5=88=B8=E6=97=B6=E4=B8=8D=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=97=A5=E6=9C=9F=E5=88=99=E5=A4=A9=E6=95=B0=E5=8A=A0?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/coupon/coupon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/logic/coupon/coupon.go b/internal/logic/coupon/coupon.go index feadf72..e131d02 100644 --- a/internal/logic/coupon/coupon.go +++ b/internal/logic/coupon/coupon.go @@ -79,7 +79,7 @@ func (s *sCoupon) InsertCoupon(ctx context.Context, req *coupon.InsertCouponReq) Cover: req.Image, ImgUrl: req.Image, StartTime: req.StartTime.Unix(), - EndTime: req.EndTime.Add(23*gtime.H + 59*gtime.M + 59*gtime.S).Unix(), + EndTime: req.EndTime.Unix(), }).Insert() } else { _, err = dao.Coupon.Ctx(ctx).Data(do.Coupon{ @@ -87,7 +87,7 @@ func (s *sCoupon) InsertCoupon(ctx context.Context, req *coupon.InsertCouponReq) Cover: req.Image, ImgUrl: req.Image, StartTime: req.StartTime.Unix(), - EndTime: req.EndTime.Add(23*gtime.H + 59*gtime.M + 59*gtime.S).Unix(), + EndTime: req.EndTime.Unix(), }).WherePri(req.Id).Update() } if err != nil {