|
|
- orderData, err := g.DB().GetOne(ctx, fmt.Sprintf(`SELECT user_phone,buy_subject,company_name,signing_subject,procedures_money,order_money,commission+(select IFNULL(sum(commission),0) as return_money from moneyCorrection where orderCode= '%s') as commission,(IFNULL(CASE WHEN is_backstage_order = 1 THEN pay_money ELSE order_money END, 0)) as pay_money+(select IFNULL(sum(payMoney),0) as return_money from moneyCorrection where orderCode='%s') as pay_money FROM dataexport_order WHERE order_code = '%s'`, params.OrderCode, params.OrderCode, params.OrderCode))
|
|
|
+ orderData, err := g.DB().GetOne(ctx, fmt.Sprintf(`SELECT user_phone,buy_subject,company_name,signing_subject,procedures_money,order_money,commission+(select IFNULL(sum(commission),0) as return_money from moneyCorrection where orderCode= '%s') as commission,(IFNULL(CASE WHEN is_backstage_order = 1 THEN pay_money ELSE order_money END, 0)) +(select IFNULL(sum(payMoney),0) as return_money from moneyCorrection where orderCode='%s') as pay_money FROM dataexport_order WHERE order_code = '%s'`, params.OrderCode, params.OrderCode, params.OrderCode))
|