...
|
...
|
@@ -50,9 +50,17 @@ func (l *MiniHomepageUserNewsLogic) MiniHomepageUserNews(req *types.MiniHomepage |
|
|
queryOptions := domain.IndexCompanyId(userToken.CompanyId)().
|
|
|
WithKV("beginTime", req.BeginTime).
|
|
|
WithKV("endTime", req.EndTime).
|
|
|
WithKV("keywords", req.Keywords).
|
|
|
WithKV("orderByHotScore", req.OrderByHotScore)
|
|
|
|
|
|
WithKV("keywords", req.Keywords)
|
|
|
if len(req.OrderByKey) > 0 && len(req.OrderByValue) > 0 {
|
|
|
switch req.OrderByKey {
|
|
|
case "HotScore":
|
|
|
queryOptions.WithKV("orderByHotScore", req.OrderByValue)
|
|
|
case "All":
|
|
|
queryOptions.WithKV("orderByAll", req.OrderByValue)
|
|
|
case "Time":
|
|
|
queryOptions.WithKV("orderByAll", req.OrderByValue)
|
|
|
}
|
|
|
}
|
|
|
var users = []int64{req.AuthorId}
|
|
|
if _, articles, err = l.svcCtx.ArticleRepository.FindAuthorsLatestArticle(l.ctx, conn, user.CompanyId, users, currentUser.Id, req.LastArticleId, req.Size, queryOptions.Copy().WithFindOnly()); err != nil {
|
|
|
return nil, xerr.NewErrMsgErr("获取快讯异常", err)
|
...
|
...
|
|