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 { 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)