commonphraseslistlogic.go 1019 B

1234567891011121314151617181920212223242526272829303132333435
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/service"
  4. "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledge"
  5. "context"
  6. "github.com/zeromicro/go-zero/core/logx"
  7. "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/svc"
  8. )
  9. type CommonPhrasesListLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewCommonPhrasesListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommonPhrasesListLogic {
  15. return &CommonPhrasesListLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // CommonPhrasesList 客服话术列表
  22. func (l *CommonPhrasesListLogic) CommonPhrasesList(in *knowledge.CommonPhrasesListReq) (*knowledge.CommonPhrasesListResp, error) {
  23. result := &knowledge.CommonPhrasesListResp{}
  24. c := service.CommonPhrasesService{}
  25. commonPhrasesList := c.CommonPhrasesList(in)
  26. result.ErrorCode = 0
  27. result.Data = commonPhrasesList
  28. return result, nil
  29. }