docquerylogic.go 763 B

12345678910111213141516171819202122232425262728293031
  1. package logic
  2. import (
  3. "context"
  4. "app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
  5. "app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib_pb"
  6. "github.com/tal-tech/go-zero/core/logx"
  7. stdlibService "app.yhyue.com/moapp/jydocs/services/stdlib"
  8. )
  9. type DocQueryLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewDocQueryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocQueryLogic {
  15. return &DocQueryLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. func (l *DocQueryLogic) DocQuery(in *stdlib.DocQueryRequest) (*stdlib.DocQueryResponse, error) {
  22. // todo: add your logic here and delete this line
  23. stdlibService.FindDocumentById(0,l.svcCtx.DB)
  24. return &stdlib.DocQueryResponse{}, nil
  25. }