增加了药品订单详情的优惠卷数据
This commit is contained in:
@@ -76,7 +76,7 @@ func (r *OrderInquiryService) CancelOrderInquiry(req requests.CancelOrderInquiry
|
||||
}
|
||||
|
||||
// 检测退款金额
|
||||
if req.RefundAmount > orderInquiry.PaymentAmountTotal {
|
||||
if *req.RefundAmount > orderInquiry.PaymentAmountTotal {
|
||||
return false, errors.New("退款金额不可超过实付金额")
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func (r *OrderInquiryService) CancelOrderInquiry(req requests.CancelOrderInquiry
|
||||
OutTradeNo: orderInquiry.InquiryNo,
|
||||
OutRefundNo: refundNo,
|
||||
Reason: "客服取消",
|
||||
RefundAmount: int64(req.RefundAmount * 100),
|
||||
RefundAmount: int64(*req.RefundAmount * 100),
|
||||
PaymentAmountTotal: int64(orderInquiry.PaymentAmountTotal * 100),
|
||||
NotifyUrl: config.C.Wechat.RefundNotifyDomain + config.C.Wechat.PatientInquiryRefundNotifyUrl,
|
||||
}
|
||||
@@ -218,7 +218,7 @@ func (r *OrderInquiryService) CancelOrderInquiry(req requests.CancelOrderInquiry
|
||||
RefundNo: refundNo,
|
||||
RefundId: refundId,
|
||||
RefundStatus: refundStatus,
|
||||
RefundTotal: req.RefundAmount,
|
||||
RefundTotal: *req.RefundAmount,
|
||||
RefundReason: req.CancelRemarks,
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ func (r *OrderInquiryService) CancelOrderInquiry(req requests.CancelOrderInquiry
|
||||
InquiryRefundNo: refundNo,
|
||||
RefundId: refundId,
|
||||
InquiryRefundStatus: refundStatus,
|
||||
RefundTotal: req.RefundAmount,
|
||||
RefundTotal: *req.RefundAmount,
|
||||
RefundReason: req.CancelRemarks,
|
||||
SuccessTime: model.LocalTime(successTime),
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ func (r *OrderProductService) GetOrderProduct(orderProductId int64) (g *dto.Orde
|
||||
return nil, errors.New(err.Error())
|
||||
}
|
||||
|
||||
// 获取药品订单优惠卷
|
||||
orderProductCouponDao := dao.OrderProductCouponDao{}
|
||||
orderProductCoupon, err := orderProductCouponDao.GetOrderProductCouponByOrderProductId(orderProduct.OrderProductId)
|
||||
|
||||
// 处理返回值
|
||||
g = dto.GetOrderProductDto(orderProduct)
|
||||
|
||||
@@ -79,6 +83,9 @@ func (r *OrderProductService) GetOrderProduct(orderProductId int64) (g *dto.Orde
|
||||
// 加载退款数据
|
||||
g.LoadOrderProductRefund(orderProductRefund)
|
||||
|
||||
// 加载药品订单优惠卷数据
|
||||
g.LoadOrderProductCoupon(orderProductCoupon)
|
||||
|
||||
return g, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user