feat:主播修改昵称审核-op 列表
This commit is contained in:
parent
a2319ffad1
commit
47fbda1240
|
@ -57,6 +57,7 @@ type OpListReq struct {
|
|||
AssociativeTableColumn *string `json:"associative_table_column"`
|
||||
BatchId *string `json:"batch_id"`
|
||||
Status *int64 `json:"status"`
|
||||
Role *int64 `json:"role"`
|
||||
Offset int `json:"offset"`
|
||||
Limit int `json:"limit"`
|
||||
Sort string
|
||||
|
|
|
@ -3869,6 +3869,9 @@ func (m *Mongo) GetTextAuditTaskList(ctx *gin.Context, req *textaudittaskproto.O
|
|||
if req.Status != nil {
|
||||
query["status"] = util.DerefInt64(req.Status)
|
||||
}
|
||||
if req.Role != nil {
|
||||
query["role"] = util.DerefInt64(req.Role)
|
||||
}
|
||||
if req.NotAlignedOpt != 0 {
|
||||
query["is_aligned"] = qmgo.M{
|
||||
"$ne": consts.TextAuditIsAligned_Yes,
|
||||
|
@ -3886,7 +3889,7 @@ func (m *Mongo) GetTextAuditTaskList(ctx *gin.Context, req *textaudittaskproto.O
|
|||
return list, err
|
||||
}
|
||||
|
||||
func (m *Mongo) GetTextAuditTaskListByCollectionInfos(ctx *gin.Context, databases []string, tableNames []string, status int64, offset, limit int) ([]*dbstruct.TextAuditTask, error) {
|
||||
func (m *Mongo) GetTextAuditTaskListByCollectionInfos(ctx *gin.Context, databases []string, tableNames []string, status int64, role *int64, offset, limit int) ([]*dbstruct.TextAuditTask, error) {
|
||||
list := make([]*dbstruct.TextAuditTask, 0)
|
||||
|
||||
if len(databases) != len(tableNames) {
|
||||
|
@ -3902,6 +3905,10 @@ func (m *Mongo) GetTextAuditTaskListByCollectionInfos(ctx *gin.Context, database
|
|||
"del_flag": 0,
|
||||
}
|
||||
|
||||
if role != nil {
|
||||
query["role"] = util.DerefInt64(role)
|
||||
}
|
||||
|
||||
orClause := make([]qmgo.M, 0)
|
||||
for i := range databases {
|
||||
orClause = append(orClause, qmgo.M{
|
||||
|
|
|
@ -87,7 +87,7 @@ func (p *TextAuditTaskDecorator) OpList(ctx *gin.Context, req *textaudittaskprot
|
|||
databases = append(databases, collectionInfo.Database)
|
||||
tableNames = append(tableNames, collectionInfo.TableName)
|
||||
}
|
||||
return p.TextAuditTask.OpListByCollectionInfos(ctx, databases, tableNames, util.DerefInt64(req.Status), req.Offset, req.Limit)
|
||||
return p.TextAuditTask.OpListByCollectionInfos(ctx, databases, tableNames, util.DerefInt64(req.Status), req.Role, req.Offset, req.Limit)
|
||||
}
|
||||
}
|
||||
return queryFunc(ctx, req)
|
||||
|
|
|
@ -65,8 +65,8 @@ func (p *TextAuditTask) OpList(ctx *gin.Context, req *textaudittaskproto.OpListR
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func (p *TextAuditTask) OpListByCollectionInfos(ctx *gin.Context, databases []string, tableNames []string, status int64, offset, limit int) ([]*dbstruct.TextAuditTask, error) {
|
||||
list, err := p.store.GetTextAuditTaskListByCollectionInfos(ctx, databases, tableNames, status, offset, limit)
|
||||
func (p *TextAuditTask) OpListByCollectionInfos(ctx *gin.Context, databases []string, tableNames []string, status int64, role *int64, offset, limit int) ([]*dbstruct.TextAuditTask, error) {
|
||||
list, err := p.store.GetTextAuditTaskListByCollectionInfos(ctx, databases, tableNames, status, role, offset, limit)
|
||||
if err != nil {
|
||||
logger.Error("GetTextAuditTaskListByCollectionInfos fail, err: %v", err)
|
||||
return make([]*dbstruct.TextAuditTask, 0), err
|
||||
|
|
Loading…
Reference in New Issue