فهرست منبع

修改包的引用

renjiaojiao 2 سال پیش
والد
کامیت
74c6362f59
1فایلهای تغییر یافته به همراه39 افزوده شده و 0 حذف شده
  1. 39 0
      rpc/knowledge/internal/logic/commonphrasesaddlogic.go

+ 39 - 0
rpc/knowledge/internal/logic/commonphrasesaddlogic.go

@@ -0,0 +1,39 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/service"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/svc"
+)
+
+type CommonPhrasesAddLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCommonPhrasesAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommonPhrasesAddLogic {
+	return &CommonPhrasesAddLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// CommonPhrasesAdd 客服话术添加、编辑
+func (l *CommonPhrasesAddLogic) CommonPhrasesAdd(in *knowledgeclient.CommonPhrasesAddReq) (*knowledgeclient.AddResponse, error) {
+	result := &knowledgeclient.AddResponse{}
+	c := service.CommonPhrasesService{}
+	ok, msg := c.CommonPhrasesAdd(in)
+	if ok {
+		result.ErrorCode = 0
+		result.ErrorMsg = msg
+	} else {
+		result.ErrorCode = -1
+		result.ErrorMsg = msg
+	}
+	return result, nil
+}