|
@@ -0,0 +1,40 @@
|
|
|
+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 CommonPhrasesInfoLogic struct {
|
|
|
+ ctx context.Context
|
|
|
+ svcCtx *svc.ServiceContext
|
|
|
+ logx.Logger
|
|
|
+}
|
|
|
+
|
|
|
+func NewCommonPhrasesInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommonPhrasesInfoLogic {
|
|
|
+ return &CommonPhrasesInfoLogic{
|
|
|
+ ctx: ctx,
|
|
|
+ svcCtx: svcCtx,
|
|
|
+ Logger: logx.WithContext(ctx),
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// CommonPhrasesInfo 客服话术详情
|
|
|
+func (l *CommonPhrasesInfoLogic) CommonPhrasesInfo(in *knowledgeclient.CommonPhrasesInfoReq) (*knowledgeclient.CommonPhrasesInfoResp, error) {
|
|
|
+ result := &knowledgeclient.CommonPhrasesInfoResp{}
|
|
|
+ c := service.CommonPhrasesService{}
|
|
|
+ info, ok := c.CommonPhrasesInfo(in.Id)
|
|
|
+ if info != nil && ok {
|
|
|
+ result.ErrorCode = 0
|
|
|
+ result.ErrorMsg = "查询成功"
|
|
|
+ result.Data = info
|
|
|
+ } else {
|
|
|
+ result.ErrorCode = -1
|
|
|
+ result.ErrorMsg = "查询出错"
|
|
|
+ }
|
|
|
+ return result, nil
|
|
|
+}
|