作者 郑周

1 修复BUG

... ... @@ -101,6 +101,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
if len(companyIds) > 0 {
_, companyList, err := l.svcCtx.CompanyRepository.Find(l.ctx, conn, domain.NewQueryOptions().
WithFindOnly().
WithKV("companyId", userToken.CompanyId).
WithKV("ids", companyIds).
WithKV("limit", len(companyIds)))
if err != nil {
... ... @@ -115,6 +116,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
if len(userIds) > 0 {
_, userList, err := l.svcCtx.UserRepository.Find(l.ctx, conn, domain.NewQueryOptions().
WithFindOnly().
WithKV("companyId", userToken.CompanyId).
WithKV("ids", userIds).
WithKV("limit", len(userIds)))
if err != nil {
... ... @@ -129,6 +131,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
if len(commentIds) > 0 {
_, commentList, err := l.svcCtx.ArticleCommentRepository.Find(l.ctx, conn, domain.NewQueryOptions().
WithFindOnly().
WithKV("companyId", userToken.CompanyId).
WithKV("ids", commentIds).
WithKV("limit", len(commentIds)))
if err != nil {
... ... @@ -143,6 +146,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma
if len(articleIds) > 0 {
_, articleList, err := l.svcCtx.ArticleRepository.Find(l.ctx, conn, userToken.CompanyId, domain.NewQueryOptions().
WithFindOnly().
WithKV("companyId", userToken.CompanyId).
WithKV("ids", articleIds).
WithKV("limit", len(articleIds)))
if err != nil {
... ...
... ... @@ -30,6 +30,7 @@ func (l *MiniSystemLogic) MiniSystem(req *types.MessageRequest) (resp *types.Mes
total, list, err := l.svcCtx.MessageSystemRepository.Find(l.ctx, l.svcCtx.DefaultDBConn(), domain.NewQueryOptions().
WithOffsetLimit(req.Page, req.Size).
WithKV("companyId", userToken.CompanyId).
WithKV("recipientId", userToken.UserId))
if err != nil {
return nil, err
... ...
... ... @@ -32,7 +32,7 @@ func (l *MiniMyBeLikedLogic) MiniMyBeLiked(req *types.MiniBeLikedRequest) (resp
total, list, err := l.svcCtx.UserLoveFlagRepository.Find(l.ctx, conn, domain.NewQueryOptions().
WithOffsetLimit(req.Page, req.Size).
WithKV("commentId", userToken.CompanyId).
WithKV("companyId", userToken.CompanyId).
WithKV("toUserId", userToken.UserId))
if err != nil {
return nil, err
... ...
... ... @@ -32,7 +32,7 @@ func (l *MiniMyLikeLogic) MiniMyLike(req *types.MiniMyLikeRequest) (resp *types.
total, list, err := l.svcCtx.UserLoveFlagRepository.Find(l.ctx, conn, domain.NewQueryOptions().
WithOffsetLimit(req.Page, req.Size).
WithKV("commentId", userToken.CompanyId).
WithKV("companyId", userToken.CompanyId).
WithKV("userId", userToken.UserId))
if err != nil {
return nil, err
... ...