|
|
- orderRes, err := g.DB().GetOne(r.Context(), "SELECT buy_subject,user_phone,company_name,product_type,pay_money+(select IFNULL(sum(payMoney),0) as return_money from moneyCorrection where orderCode=?) as pay_money,commission+(select IFNULL(sum(commission),0) as commission from moneyCorrection where orderCode=?) as pay_money FROM dataexport_order WHERE order_code=?", orderCode, orderCode, orderCode)
|
|
|
+ orderRes, err := g.DB().GetOne(r.Context(), "SELECT buy_subject,user_phone,company_name,product_type,pay_money+(select IFNULL(sum(payMoney),0) as return_money from moneyCorrection where orderCode=?) as pay_money,commission+(select IFNULL(sum(commission),0) as commission from moneyCorrection where orderCode=?) as commission FROM dataexport_order WHERE order_code=?", orderCode, orderCode, orderCode)
|