package purchase import ( "net/http" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/api/internal/logic/purchase" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/api/internal/svc" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/api/internal/types" "github.com/zeromicro/go-zero/rest/httpx" ) func PurchaseSearchHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.PurSearchReq if err := httpx.Parse(r, &req); err != nil { httpx.Error(w, err) return } l := purchase.NewPurchaseSearchLogic(r.Context(), svcCtx, r) resp, err := l.PurchaseSearch(&req) if err != nil { httpx.Error(w, err) } else { httpx.OkJson(w, resp) } } }