作者 yangfu
@@ -32,3 +32,4 @@ lastupdate.tmp @@ -32,3 +32,4 @@ lastupdate.tmp
32 32
33 public/* 33 public/*
34 logs/ 34 logs/
  35 +cmd/discuss/api/etc/core.local.yaml
@@ -9,6 +9,9 @@ @@ -9,6 +9,9 @@
9 9
10 样例账号 18860183050 密码 123456 10 样例账号 18860183050 密码 123456
11 11
  12 +### 正式环境
  13 +服务端域名 https://sumifcc-discuss-prd.sumifcc.com/
  14 +日志地址 https://sumifcc-discuss-prd.sumifcc.com/v1/log/access
12 15
13 ### 可设置环境变量 16 ### 可设置环境变量
14 - DataSource 17 - DataSource
@@ -28,8 +28,8 @@ func NewMiniArticleSearchMeLogic(ctx context.Context, svcCtx *svc.ServiceContext @@ -28,8 +28,8 @@ func NewMiniArticleSearchMeLogic(ctx context.Context, svcCtx *svc.ServiceContext
28 // MiniArticleSearchMe 获取我发布的文章 28 // MiniArticleSearchMe 获取我发布的文章
29 func (l *MiniArticleSearchMeLogic) MiniArticleSearchMe(req *types.MiniArticleSearchMeRequest) (resp *types.MiniArticleSearchMeResponse, err error) { 29 func (l *MiniArticleSearchMeLogic) MiniArticleSearchMe(req *types.MiniArticleSearchMeRequest) (resp *types.MiniArticleSearchMeResponse, err error) {
30 var conn = l.svcCtx.DefaultDBConn() 30 var conn = l.svcCtx.DefaultDBConn()
31 - if req.Size > 100 {  
32 - req.Size = 100 31 + if req.Size > 2000 {
  32 + req.Size = 2000
33 } 33 }
34 queryOptions := domain.NewQueryOptions(). 34 queryOptions := domain.NewQueryOptions().
35 WithOffsetLimit(req.Page, req.Size). 35 WithOffsetLimit(req.Page, req.Size).
@@ -28,8 +28,8 @@ func NewMiniSearchArticleDraftMeLogic(ctx context.Context, svcCtx *svc.ServiceCo @@ -28,8 +28,8 @@ func NewMiniSearchArticleDraftMeLogic(ctx context.Context, svcCtx *svc.ServiceCo
28 // 查询我的草稿箱内容列表 28 // 查询我的草稿箱内容列表
29 func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.MiniArticleDraftSearchMeRequest) (resp *types.MiniArticleDraftSearchMeResponse, err error) { 29 func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.MiniArticleDraftSearchMeRequest) (resp *types.MiniArticleDraftSearchMeResponse, err error) {
30 var conn = l.svcCtx.DefaultDBConn() 30 var conn = l.svcCtx.DefaultDBConn()
31 - if req.Size > 100 {  
32 - req.Size = 100 31 + if req.Size > 2000 {
  32 + req.Size = 2000
33 } 33 }
34 queryOption := domain.NewQueryOptions(). 34 queryOption := domain.NewQueryOptions().
35 WithOffsetLimit(req.Page, req.Size). 35 WithOffsetLimit(req.Page, req.Size).
@@ -32,8 +32,8 @@ func NewMiniSearchArticlePageLogic(ctx context.Context, svcCtx *svc.ServiceConte @@ -32,8 +32,8 @@ func NewMiniSearchArticlePageLogic(ctx context.Context, svcCtx *svc.ServiceConte
32 func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearchArticleRequest) (resp *types.MiniSearchArticleResponse, err error) { 32 func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearchArticleRequest) (resp *types.MiniSearchArticleResponse, err error) {
33 33
34 var conn = l.svcCtx.DefaultDBConn() 34 var conn = l.svcCtx.DefaultDBConn()
35 - if req.Size > 100 {  
36 - req.Size = 100 35 + if req.Size > 2000 {
  36 + req.Size = 2000
37 } 37 }
38 cnt, articleList, err := l.svcCtx.ArticleRepository.CustomSearchBy(l.ctx, conn, req.UserId, req.CompanyId, 38 cnt, articleList, err := l.svcCtx.ArticleRepository.CustomSearchBy(l.ctx, conn, req.UserId, req.CompanyId,
39 req.TagCategory, req.TagId, [2]int64{req.BeginTime, req.EndTime}, req.SearchWord, req.Page, req.Size) 39 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 @@ -36,8 +36,8 @@ func (l *MiniListArticleCommentLogic) MiniListArticleComment(req *types.MiniList
36 if err != nil { 36 if err != nil {
37 return nil, xerr.NewErrMsgErr("获取评论信息失败", err) 37 return nil, xerr.NewErrMsgErr("获取评论信息失败", err)
38 } 38 }
39 - if req.Size > 100 {  
40 - req.Size = 100 39 + if req.Size > 2000 {
  40 + req.Size = 2000
41 } 41 }
42 42
43 queryOption := domain.NewQueryOptions(). 43 queryOption := domain.NewQueryOptions().
@@ -44,7 +44,7 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio @@ -44,7 +44,7 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio
44 return nil, err 44 return nil, err
45 } 45 }
46 queryFunc := func() (interface{}, error) { 46 queryFunc := func() (interface{}, error) {
47 - tx = tx.Model(m).Updates(m) 47 + tx = tx.Model(m).Select("*").Updates(m)
48 return nil, tx.Error 48 return nil, tx.Error
49 } 49 }
50 if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { 50 if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {
@@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra @@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra
42 return nil, err 42 return nil, err
43 } 43 }
44 queryFunc := func() (interface{}, error) { 44 queryFunc := func() (interface{}, error) {
45 - tx = tx.Model(m).Updates(m) 45 + tx = tx.Model(m).Select("*").Updates(m)
46 return nil, tx.Error 46 return nil, tx.Error
47 } 47 }
48 if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { 48 if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {