123456789101112131415161718192021222324252627282930313233343536373839 |
- 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 CommonPhrasesDelLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewCommonPhrasesDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommonPhrasesDelLogic {
- return &CommonPhrasesDelLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // CommonPhrasesDel 客服话术删除
- func (l *CommonPhrasesDelLogic) CommonPhrasesDel(in *knowledgeclient.CommonPhrasesInfoReq) (*knowledgeclient.AddResponse, error) {
- result := &knowledgeclient.AddResponse{}
- c := service.CommonPhrasesService{}
- ok := c.CommonPhrasesDel(in.Id)
- if ok {
- result.ErrorCode = 0
- result.ErrorMsg = "删除成功"
- } else {
- result.ErrorCode = -1
- result.ErrorMsg = "删除失败"
- }
- return result, nil
- }
|