fusenapi/server/backend/internal/handler/quotationdetailhandler.go

35 lines
754 B
Go
Raw Normal View History

2023-06-25 10:30:39 +00:00
package handler
import (
"net/http"
"reflect"
2023-06-25 10:30:39 +00:00
"fusenapi/utils/basic"
"fusenapi/server/backend/internal/logic"
"fusenapi/server/backend/internal/svc"
"fusenapi/server/backend/internal/types"
)
func QuotationDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.RequestQuotationId
userinfo, err := basic.RequestParseBackend(w, r, svcCtx, &req)
2023-06-25 10:30:39 +00:00
if err != nil {
2023-06-28 11:32:41 +00:00
return
2023-06-25 10:30:39 +00:00
}
// 创建一个业务逻辑层实例
l := logic.NewQuotationDetailLogic(r.Context(), svcCtx)
rl := reflect.ValueOf(l)
basic.BeforeLogic(w, r, rl)
2023-06-25 10:30:39 +00:00
resp := l.QuotationDetail(&req, userinfo)
2023-07-21 06:20:21 +00:00
2023-07-24 05:17:02 +00:00
if !basic.AfterLogic(w, r, rl, resp) {
basic.NormalAfterLogic(w, r, resp)
}
2023-06-25 10:30:39 +00:00
}
}