作者 tangxvhui

调整分页限制。调文档

... ... @@ -9,6 +9,9 @@
样例账号 18860183050 密码 123456
### 正式环境
服务端域名 https://sumifcc-discuss-prd.sumifcc.com/
日志地址 https://sumifcc-discuss-prd.sumifcc.com/v1/log/access
### 可设置环境变量
- DataSource
... ...
... ... @@ -28,8 +28,8 @@ func NewMiniArticleSearchMeLogic(ctx context.Context, svcCtx *svc.ServiceContext
// MiniArticleSearchMe 获取我发布的文章
func (l *MiniArticleSearchMeLogic) MiniArticleSearchMe(req *types.MiniArticleSearchMeRequest) (resp *types.MiniArticleSearchMeResponse, err error) {
var conn = l.svcCtx.DefaultDBConn()
if req.Size > 100 {
req.Size = 100
if req.Size > 2000 {
req.Size = 2000
}
queryOptions := domain.NewQueryOptions().
WithOffsetLimit(req.Page, req.Size).
... ...
... ... @@ -28,8 +28,8 @@ func NewMiniSearchArticleDraftMeLogic(ctx context.Context, svcCtx *svc.ServiceCo
// 查询我的草稿箱内容列表
func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.MiniArticleDraftSearchMeRequest) (resp *types.MiniArticleDraftSearchMeResponse, err error) {
var conn = l.svcCtx.DefaultDBConn()
if req.Size > 100 {
req.Size = 100
if req.Size > 2000 {
req.Size = 2000
}
queryOption := domain.NewQueryOptions().
WithOffsetLimit(req.Page, req.Size).
... ...
... ... @@ -32,8 +32,8 @@ func NewMiniSearchArticlePageLogic(ctx context.Context, svcCtx *svc.ServiceConte
func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearchArticleRequest) (resp *types.MiniSearchArticleResponse, err error) {
var conn = l.svcCtx.DefaultDBConn()
if req.Size > 100 {
req.Size = 100
if req.Size > 2000 {
req.Size = 2000
}
cnt, articleList, err := l.svcCtx.ArticleRepository.CustomSearchBy(l.ctx, conn, req.UserId, req.CompanyId,
req.TagCategory, req.TagId, [2]int64{req.BeginTime, req.EndTime}, req.SearchWord, req.Page, req.Size)
... ...
... ... @@ -36,8 +36,8 @@ func (l *MiniListArticleCommentLogic) MiniListArticleComment(req *types.MiniList
if err != nil {
return nil, xerr.NewErrMsgErr("获取评论信息失败", err)
}
if req.Size > 100 {
req.Size = 100
if req.Size > 2000 {
req.Size = 2000
}
queryOption := domain.NewQueryOptions().
... ...