接口对接

This commit is contained in:
2026-04-21 13:31:10 +08:00
parent adb6da1d70
commit 33cb945846
8 changed files with 119 additions and 47 deletions

View File

@@ -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