This commit is contained in:
parent
b7653affe3
commit
dd9b2301be
|
|
@ -508,6 +508,11 @@ func (dao *NewsDAO) QueryAsyncBatch(pairs []OrgDigestPair) (dos []*models.NewsDO
|
||||||
// }
|
// }
|
||||||
|
|
||||||
func (dao *NewsDAO) QueryPullNew(cond *NewsPullNewCondition) (dos []*models.NewsDO, total int64, err error) {
|
func (dao *NewsDAO) QueryPullNew(cond *NewsPullNewCondition) (dos []*models.NewsDO, total int64, err error) {
|
||||||
|
if cond == nil || len(cond.Pairs) == 0 {
|
||||||
|
// 客户端没传org_id列表,返回空
|
||||||
|
return []*models.NewsDO{}, 0, nil
|
||||||
|
}
|
||||||
|
|
||||||
e := dao.db.Model(&dos).
|
e := dao.db.Model(&dos).
|
||||||
Table(models.TableNameNews).
|
Table(models.TableNameNews).
|
||||||
Select(
|
Select(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue