This commit is contained in:
eson 2023-08-29 17:22:58 +08:00
parent aeb8677239
commit 7a2b66f5ab
3 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
Platform: "google",
OperateType: auth.OpTypeRegister,
TraceId: uuid.NewString(),
CreateAt: time.Now(),
CreateAt: time.Now().UTC(),
Extend: map[string]interface{}{
"google_id": googleId,
},

View File

@ -67,13 +67,13 @@ func (l *UserOrderListLogic) UserOrderList(req *types.UserOrderListReq, userinfo
// 根据时间来查询不同范围的订单
switch req.Time {
case 1:
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -1, 0).Unix())
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -1, 0).Unix())
case 2:
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -3, 0).Unix())
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -3, 0).Unix())
case 3:
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -6, 0).Unix())
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -6, 0).Unix())
case 4:
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(-1, 0, 0).Unix())
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(-1, 0, 0).Unix())
default:
}

View File

@ -97,7 +97,7 @@ func (l *CartListLogic) CartList(req *types.CartListReq, userinfo *auth.UserInfo
Cover: *v.Cover,
Name: name,
Capacity: "",
ETA: time.Now().AddDate(0, 0, 60).Format("2006-01-02 15:04:05"),
ETA: time.Now().UTC().AddDate(0, 0, 60).Format("2006-01-02 15:04:05"),
Pcs: *v.BuyNum,
ProductSn: productSn,
DesignSn: designSn,