diff --git a/app/mix/dao/mysql_zone.go b/app/mix/dao/mysql_zone.go index de24837d..d040a486 100644 --- a/app/mix/dao/mysql_zone.go +++ b/app/mix/dao/mysql_zone.go @@ -503,11 +503,8 @@ func (m *Mysql) GetZoneRefundHisList(ctx *gin.Context, tx *sqlx.Tx, mid, zid int // 获取空间动态购买记录 func (m *Mysql) GetZoneMomentUnlockList(ctx *gin.Context, tx *sqlx.Tx, momentId int64, offset, limit int) (list []*dbstruct.ZoneMomentUnlock, err error) { list = make([]*dbstruct.ZoneMomentUnlock, 0) - var ( - sqlStr string - args = make([]any, 0) - ) - sqlStr = fmt.Sprintf("select * from %s where moment_id=%d limit %d offset %d", TableVasZoneMomentUnlock, momentId, limit, offset) + sqlStr := fmt.Sprintf("select * from %s where moment_id=? limit ? offset ?", TableVasZoneMomentUnlock) + args := []any{momentId, limit, offset} if tx != nil { err = tx.SelectContext(ctx, &list, sqlStr, args...) } else { diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 5e1c1f01..32c9c4bf 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -1045,6 +1045,7 @@ func (s *Service) ZoneMomentOrderList(ctx *gin.Context, req *vasproto.ZoneMoment list = make([]*vasproto.ZoneMomentOrderVO, 0) // 空间动态解锁历史 zmuList, err := _DefaultVas.GetZoneMomentUnlockList(ctx, req.MomentId, req.Offset, req.Limit) + logger.Info("ZoneMomentOrderList, id: %v, zmuList: %v, err: %v", req.MomentId, len(zmuList), err) ec, err = errs.DealVasErr(err) if err != nil { return @@ -1056,6 +1057,7 @@ func (s *Service) ZoneMomentOrderList(ctx *gin.Context, req *vasproto.ZoneMoment mids = append(mids, zmu.GetMid()) } acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, mids) + logger.Info("ZoneMomentOrderList, id: %v, acntMap: %v, err: %v", req.MomentId, len(acntMap), err) // 组装 for _, zmu := range zmuList {