package logic import ( "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/service" "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/svc" "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledge" "context" "github.com/zeromicro/go-zero/core/logx" ) type KnowledgeListLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewKnowledgeListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *KnowledgeListLogic { return &KnowledgeListLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // KnowledgeList 知识列表 func (l *KnowledgeListLogic) KnowledgeList(in *knowledge.ListRequest) (*knowledge.ListResponse, error) { // todo: add your logic here and delete this line result := &knowledge.ListResponse{} k := service.KnowledgeService{} knowledgeList := k.KnowledgeList(in) result.ErrorCode = 0 result.Data = knowledgeList return result, nil }