|
@@ -2,11 +2,13 @@ package article |
|
@@ -2,11 +2,13 @@ package article |
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
"context"
|
4
|
"context"
|
|
|
5
|
+ "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/logic/message"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/gateway/authlib"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/gateway/authlib"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr"
|
|
|
11
|
+ "time"
|
10
|
|
12
|
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types"
|
14
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types"
|
|
@@ -75,6 +77,13 @@ func (l *SystemDeleteArticleLogic) SystemDeleteArticle(req *types.SystemArticleD |
|
@@ -75,6 +77,13 @@ func (l *SystemDeleteArticleLogic) SystemDeleteArticle(req *types.SystemArticleD |
75
|
if err != nil {
|
77
|
if err != nil {
|
76
|
return xerr.NewErrMsgErr("保存文章内容失败", err)
|
78
|
return xerr.NewErrMsgErr("保存文章内容失败", err)
|
77
|
}
|
79
|
}
|
|
|
80
|
+ //消息通知
|
|
|
81
|
+ messageLogic := message.NewMiniSystemLogic(l.ctx, l.svcCtx)
|
|
|
82
|
+ mTime := time.Unix(article.CreatedAt, 0).Format("2006-01-02 15:04")
|
|
|
83
|
+ err = messageLogic.ArticleDeleted(conn, article.CompanyId, article.AuthorId, mTime)
|
|
|
84
|
+ if err != nil {
|
|
|
85
|
+ return xerr.NewErrMsgErr("删除失败", err)
|
|
|
86
|
+ }
|
78
|
return nil
|
87
|
return nil
|
79
|
}, true)
|
88
|
}, true)
|
80
|
if err != nil {
|
89
|
if err != nil {
|