|
@@ -553,9 +553,6 @@ func ConfirmRefund(context *admin.Context) (interface{}, error) {
|
|
|
orderCode := param.OrderCode
|
|
|
qMap := map[string]interface{}{}
|
|
|
qMap["order_code"] = orderCode
|
|
|
- if param.RefundType == "其他" {
|
|
|
- param.RefundReason = ""
|
|
|
- }
|
|
|
if param.IsOffline == 0 {
|
|
|
ok := util.JysqlDB.Update("dataexport_order", qMap, map[string]interface{}{
|
|
|
"refund_status": param.RefundStatus,
|
|
@@ -563,11 +560,11 @@ func ConfirmRefund(context *admin.Context) (interface{}, error) {
|
|
|
})
|
|
|
if ok {
|
|
|
util.JysqlDB.Insert("refund_record", map[string]interface{}{
|
|
|
- "order_code": orderCode,
|
|
|
- "refund_time": qutil.NowFormat(qutil.Date_Full_Layout),
|
|
|
- "refund_money": param.RefundMoney,
|
|
|
- "refund_reason": param.RefundReason,
|
|
|
- "refund_type": param.RefundType,
|
|
|
+ "order_code": orderCode,
|
|
|
+ "refund_time": qutil.NowFormat(qutil.Date_Full_Layout),
|
|
|
+ "refund_money": param.RefundMoney,
|
|
|
+ "refund_reason": param.RefundReason,
|
|
|
+ "refund_reason_type": param.RefundType,
|
|
|
})
|
|
|
data := util.JysqlDB.Find("invoice", qMap, "", "create_time", 0, 0)
|
|
|
if *data != nil && len(*data) != 0 {
|
|
@@ -601,11 +598,11 @@ func ConfirmRefund(context *admin.Context) (interface{}, error) {
|
|
|
// }
|
|
|
// }
|
|
|
okid := util.JysqlDB.Insert("refund_record", map[string]interface{}{
|
|
|
- "order_code": orderCode,
|
|
|
- "refund_time": qutil.NowFormat(qutil.Date_Full_Layout),
|
|
|
- "refund_money": param.RefundMoney,
|
|
|
- "refund_reason": param.RefundReason,
|
|
|
- "refund_type": param.RefundType,
|
|
|
+ "order_code": orderCode,
|
|
|
+ "refund_time": qutil.NowFormat(qutil.Date_Full_Layout),
|
|
|
+ "refund_money": param.RefundMoney,
|
|
|
+ "refund_reason": param.RefundReason,
|
|
|
+ "refund_reason_type": param.RefundType,
|
|
|
})
|
|
|
if okid > 0 {
|
|
|
return_status := 0
|