| 
									
										
										
										
											2025-09-21 18:27:25 +08:00
										 |  |  | package query | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"net/http" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-30 17:44:18 +08:00
										 |  |  | 	"tydata-server/app/main/api/internal/logic/query" | 
					
						
							|  |  |  | 	"tydata-server/app/main/api/internal/svc" | 
					
						
							|  |  |  | 	"tydata-server/app/main/api/internal/types" | 
					
						
							|  |  |  | 	"tydata-server/common/result" | 
					
						
							|  |  |  | 	"tydata-server/pkg/lzkit/validator" | 
					
						
							| 
									
										
										
										
											2025-09-21 18:27:25 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	"github.com/zeromicro/go-zero/rest/httpx" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func QueryDetailByOrderIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 
					
						
							|  |  |  | 	return func(w http.ResponseWriter, r *http.Request) { | 
					
						
							|  |  |  | 		var req types.QueryDetailByOrderIdReq | 
					
						
							|  |  |  | 		if err := httpx.Parse(r, &req); err != nil { | 
					
						
							|  |  |  | 			result.ParamErrorResult(r, w, err) | 
					
						
							|  |  |  | 			return | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if err := validator.Validate(req); err != nil { | 
					
						
							|  |  |  | 			result.ParamValidateErrorResult(r, w, err) | 
					
						
							|  |  |  | 			return | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		l := query.NewQueryDetailByOrderIdLogic(r.Context(), svcCtx) | 
					
						
							|  |  |  | 		resp, err := l.QueryDetailByOrderId(&req) | 
					
						
							|  |  |  | 		result.HttpResult(r, w, resp, err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |