This commit is contained in:
lwl0608 2024-09-09 17:28:12 +08:00
parent afa4ef12db
commit ff2c8b4131
2 changed files with 5 additions and 2 deletions

View File

@ -468,7 +468,7 @@ func (m *Mysql) GetZoneMemberListV2(ctx *gin.Context, tx *sqlx.Tx, zid, offset,
// 获取空间成员列表 // 获取空间成员列表
func (m *Mysql) GetZoneMemberCnt(ctx *gin.Context, tx *sqlx.Tx, zid int64, memType int32) (cnt int64, err error) { func (m *Mysql) GetZoneMemberCnt(ctx *gin.Context, tx *sqlx.Tx, zid int64, memType int32) (cnt int64, err error) {
type CntSt struct { type CntSt struct {
Cnt int64 `json:"cnt"` Cnt int64 `json:"cnt" db:"cnt"`
} }
cntSt := CntSt{} cntSt := CntSt{}
sqlStr := fmt.Sprintf(fmt.Sprintf("select count(1) as cnt from %s where zid=? and member_type=?", TableVasZoneMember)) sqlStr := fmt.Sprintf(fmt.Sprintf("select count(1) as cnt from %s where zid=? and member_type=?", TableVasZoneMember))

View File

@ -1030,7 +1030,10 @@ func (s *Service) ZoneMemberListV2(ctx *gin.Context, req *vasproto.GetZoneMember
} }
// 总数 // 总数
total, _ = _DefaultVas.GetZoneMemberCnt(ctx, req.Zid, req.MemberType) total, _err := _DefaultVas.GetZoneMemberCnt(ctx, req.Zid, req.MemberType)
if _err != nil {
logger.Error("GetZoneMemberCnt fail, req: %v, err: %v", util.ToJson(req), err)
}
return return
} }