|
@@ -451,11 +451,7 @@ WHERE eo.wait_empower_id = %s and jod.is_service_open =1 and jod.status =1 and d
|
|
|
if gconv.Int(orderMap["return_status"]) == 1 {
|
|
|
returnMoney = gconv.Int(orderMap["pay_money"])
|
|
|
}
|
|
|
- result["returnRes"] = map[string]interface{}{
|
|
|
- "returnMoney": returnMoney,
|
|
|
- "remainingMoney": gconv.Int(orderMap["pay_money"]) - returnMoney,
|
|
|
- "returnInfo": returnArr,
|
|
|
- }
|
|
|
+
|
|
|
//回款计划
|
|
|
returnMoneyPlant, err := g.DB().GetOne(ctx, "SELECT * from return_money_plant where order_code = ? order by create_time desc", param.OrderCode)
|
|
|
if !returnMoneyPlant.IsEmpty() {
|
|
@@ -501,6 +497,12 @@ LEFT JOIN jy_product_class jc on ji.product_class_id = jc.id WHERE de.id =? and
|
|
|
refundList = append(refundList, datum)
|
|
|
}
|
|
|
}
|
|
|
+ result["returnRes"] = map[string]interface{}{
|
|
|
+ "returnMoney": returnMoney - refundMoney,
|
|
|
+ "remainingMoney": gconv.Int(orderMap["pay_money"]) - returnMoney + refundMoney,
|
|
|
+ "returnInfo": returnArr,
|
|
|
+ }
|
|
|
+
|
|
|
if gconv.Int(orderMap["is_backstage_order"]) == 0 && gconv.Int(orderMap["order_status"]) == 1 &&
|
|
|
gconv.Int(orderMap["pay_money"]) > 0 {
|
|
|
returnMoney = gconv.Int(orderMap["pay_money"])
|