listlogic.go 841 B

123456789101112131415161718192021222324252627282930313233
  1. package logic
  2. import (
  3. "context"
  4. "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/service"
  5. "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/internal/svc"
  6. "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/pb"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type ListLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListLogic {
  15. return &ListLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // 列表
  22. func (l *ListLogic) List(in *pb.DatasmtReqList) (*pb.DatasmtRespList, error) {
  23. // todo: add your logic here and delete this line
  24. var dataSmtService service.DataSmt
  25. data := dataSmtService.List(in.SearchValue, in.DataType, in.PageNum, in.PageSize)
  26. return data, nil
  27. }