31 lines
		
	
	
		
			723 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			31 lines
		
	
	
		
			723 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|  | package QYGL | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"net/http" | ||
|  | 
 | ||
|  | 	"github.com/zeromicro/go-zero/rest/httpx" | ||
|  | 	"tianyuan-api/apps/api/internal/logic/QYGL" | ||
|  | 	"tianyuan-api/apps/api/internal/svc" | ||
|  | 	"tianyuan-api/apps/api/internal/types" | ||
|  | 
 | ||
|  | 	xhttp "github.com/zeromicro/x/http" | ||
|  | ) | ||
|  | 
 | ||
|  | func QYGL51BCHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | ||
|  | 	return func(w http.ResponseWriter, r *http.Request) { | ||
|  | 		var req types.Request | ||
|  | 		if err := httpx.Parse(r, &req); err != nil { | ||
|  | 			xhttp.JsonBaseResponseCtx(r.Context(), w, err) | ||
|  | 			return | ||
|  | 		} | ||
|  | 
 | ||
|  | 		l := QYGL.NewQYGL51BCLogic(r.Context(), svcCtx) | ||
|  | 		resp, err := l.QYGL51BC(&req) | ||
|  | 		if err != nil { | ||
|  | 			xhttp.JsonBaseResponseCtx(r.Context(), w, err) | ||
|  | 		} else { | ||
|  | 			xhttp.JsonBaseResponseCtx(r.Context(), w, resp) | ||
|  | 		} | ||
|  | 	} | ||
|  | } |