12345678910111213141516171819202122232425262728293031323334353637383940 |
- package logic
- import (
- "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/service"
- "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledge"
- "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 *knowledge.CommonPhrasesInfoReq) (*knowledge.CommonPhrasesInfoResp, error) {
- result := &knowledge.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
- }
|