接口对接
This commit is contained in:
@@ -85,11 +85,17 @@ func (d *liveAccountDao) buildListFilter(ctx context.Context, req *dto.ListLiveA
|
||||
WhereOrLike(entity.LiveAccountCols.AccountName, "%"+req.Keyword+"%").
|
||||
WhereOrLike(entity.LiveAccountCols.AccountId, "%"+req.Keyword+"%")
|
||||
}
|
||||
model.Where(entity.LiveAccountCols.Platform, req.Platform)
|
||||
model.Where(entity.LiveAccountCols.AccountName, req.AccountName)
|
||||
model.Where(entity.LiveAccountCols.AccountId, req.AccountId)
|
||||
if !g.IsEmpty(req.Platform) {
|
||||
model.WhereLike(entity.LiveAccountCols.Platform, "%"+req.Platform+"%")
|
||||
}
|
||||
if !g.IsEmpty(req.AccountName) {
|
||||
model.WhereLike(entity.LiveAccountCols.AccountName, "%"+req.AccountName+"%")
|
||||
}
|
||||
if !g.IsEmpty(req.AccountId) {
|
||||
model.WhereLike(entity.LiveAccountCols.AccountId, "%"+req.AccountId+"%")
|
||||
}
|
||||
if req.Status != nil {
|
||||
model.Where(entity.LiveAccountCols.Status, *req.Status)
|
||||
model.Where("status = ?", *req.Status)
|
||||
}
|
||||
model.OmitEmptyWhere()
|
||||
return model
|
||||
|
||||
Reference in New Issue
Block a user