增加了药品订单详情的优惠卷数据

This commit is contained in:
2024-05-21 10:49:42 +08:00
parent 931d2def98
commit e19316cfc3
6 changed files with 191 additions and 4 deletions
+7
View File
@@ -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
}