From ff0c46302099d2c13736a15adf185235ba0f34b9 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Wed, 19 Jun 2024 21:10:46 +0800 Subject: [PATCH 1/2] fix update status --- app/mix/dao/mysql.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mix/dao/mysql.go b/app/mix/dao/mysql.go index e065611d..b7a88c6a 100644 --- a/app/mix/dao/mysql.go +++ b/app/mix/dao/mysql.go @@ -299,12 +299,12 @@ func (m *Mysql) GetOrderCnt(ctx *gin.Context, tx *sqlx.Tx, mid, st, et int64, or // 更新订单状态 func (m *Mysql) UpdateOrderStatus(ctx *gin.Context, tx *sqlx.Tx, orderId string, preStatus, aftStatus int32) error { var err error - sqlStr := "update " + TableOrder + " set order_status=? where id=? and order_status=?" + sqlStr := "update " + TableOrder + " set order_status=?,ut=? where id=? and order_status=?" if tx != nil { - _, err = tx.ExecContext(ctx, sqlStr, aftStatus, orderId, preStatus) + _, err = tx.ExecContext(ctx, sqlStr, aftStatus, time.Now().Unix(), orderId, preStatus) } else { db := m.getDBVas() - _, err = db.ExecContext(ctx, sqlStr, aftStatus, orderId, preStatus) + _, err = db.ExecContext(ctx, sqlStr, aftStatus, time.Now().Unix(), orderId, preStatus) } if err != nil { logger.Error("UpdateOrderStatus fail, orderId: %v, preStatus: %v, aftStatus: %v, err: %v", orderId, preStatus, aftStatus, err) From b83aab01a793ff03e99351aeb144502952bface0 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Wed, 19 Jun 2024 21:56:57 +0800 Subject: [PATCH 2/2] fix --- app/mix/controller/zone_vas_api.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/mix/controller/zone_vas_api.go b/app/mix/controller/zone_vas_api.go index f45fd89b..08727347 100644 --- a/app/mix/controller/zone_vas_api.go +++ b/app/mix/controller/zone_vas_api.go @@ -22,6 +22,9 @@ func ZoneCreateOrder(ctx *gin.Context) { ReplyErrorMsg(ctx, "商品错误") return } + if len(req.Model) >= 28 { + req.Model = req.Model[:28] + } data, ec, err := service.DefaultService.ZoneCreateOrder(ctx, req) if ec != errcode.ErrCodeVasSrvOk {