searchCriteriaLogic.go 798 B

1234567891011121314151617181920212223242526272829303132333435
  1. package logic
  2. import (
  3. "context"
  4. "jyBXCore/rpc/type/bxcore"
  5. "jyBXCore/api/internal/svc"
  6. "jyBXCore/api/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type SearchCriteriaLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewSearchCriteriaLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SearchCriteriaLogic {
  15. return &SearchCriteriaLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *SearchCriteriaLogic) SearchCriteria() (resp *types.CommonResp, err error) {
  22. // todo: add your logic here and delete this line
  23. res, err := l.svcCtx.BxCore.PropertySearchCriteria(l.ctx, &bxcore.SearchReq{})
  24. return &types.CommonResp{
  25. Err_code: res.ErrCode,
  26. Err_msg: res.ErrMsg,
  27. Data: res.Data,
  28. }, nil
  29. }