新增药品订单详情
This commit is contained in:
@@ -6,8 +6,10 @@ import (
|
||||
"hospital-admin-api/api/requests"
|
||||
"hospital-admin-api/api/responses"
|
||||
"hospital-admin-api/api/responses/orderProductResponse"
|
||||
"hospital-admin-api/api/service"
|
||||
"hospital-admin-api/global"
|
||||
"hospital-admin-api/utils"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type OrderProduct struct{}
|
||||
@@ -57,32 +59,32 @@ func (r *OrderProduct) GetOrderProductPage(c *gin.Context) {
|
||||
responses.OkWithData(result, c)
|
||||
}
|
||||
|
||||
// // GetOrderProduct 药品订单详情
|
||||
// func (r *OrderProduct) GetOrderProduct(c *gin.Context) {
|
||||
// id := c.Param("order_inquiry_id")
|
||||
// if id == "" {
|
||||
// responses.FailWithMessage("缺少参数", c)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 将 id 转换为 int64 类型
|
||||
// orderInquiryId, err := strconv.ParseInt(id, 10, 64)
|
||||
// if err != nil {
|
||||
// responses.Fail(c)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 业务处理
|
||||
// orderInquiryService := service.OrderProductService{}
|
||||
// getUserDoctorResponses, err := orderInquiryService.GetOrderProduct(orderInquiryId)
|
||||
// if err != nil {
|
||||
// responses.FailWithMessage(err.Error(), c)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// responses.OkWithData(getUserDoctorResponses, c)
|
||||
// }
|
||||
//
|
||||
// GetOrderProduct 药品订单详情
|
||||
func (r *OrderProduct) GetOrderProduct(c *gin.Context) {
|
||||
id := c.Param("order_product_id")
|
||||
if id == "" {
|
||||
responses.FailWithMessage("缺少参数", c)
|
||||
return
|
||||
}
|
||||
|
||||
// 将 id 转换为 int64 类型
|
||||
orderProductId, err := strconv.ParseInt(id, 10, 64)
|
||||
if err != nil {
|
||||
responses.Fail(c)
|
||||
return
|
||||
}
|
||||
|
||||
// 业务处理
|
||||
orderProductService := service.OrderProductService{}
|
||||
getUserDoctorResponses, err := orderProductService.GetOrderProduct(orderProductId)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
responses.OkWithData(getUserDoctorResponses, c)
|
||||
}
|
||||
|
||||
// // CancelOrderProduct 取消药品订单
|
||||
// func (r *OrderProduct) CancelOrderProduct(c *gin.Context) {
|
||||
// id := c.Param("order_inquiry_id")
|
||||
|
||||
Reference in New Issue
Block a user