浏览代码

退款原因

xuzhiheng 2 年之前
父节点
当前提交
f13c2117ae
共有 1 个文件被更改,包括 10 次插入13 次删除
  1. 10 13
      src/order/orderManageController.go

+ 10 - 13
src/order/orderManageController.go

@@ -553,9 +553,6 @@ func ConfirmRefund(context *admin.Context) (interface{}, error) {
 	orderCode := param.OrderCode
 	orderCode := param.OrderCode
 	qMap := map[string]interface{}{}
 	qMap := map[string]interface{}{}
 	qMap["order_code"] = orderCode
 	qMap["order_code"] = orderCode
-	if param.RefundType == "其他" {
-		param.RefundReason = ""
-	}
 	if param.IsOffline == 0 {
 	if param.IsOffline == 0 {
 		ok := util.JysqlDB.Update("dataexport_order", qMap, map[string]interface{}{
 		ok := util.JysqlDB.Update("dataexport_order", qMap, map[string]interface{}{
 			"refund_status": param.RefundStatus,
 			"refund_status": param.RefundStatus,
@@ -563,11 +560,11 @@ func ConfirmRefund(context *admin.Context) (interface{}, error) {
 		})
 		})
 		if ok {
 		if ok {
 			util.JysqlDB.Insert("refund_record", map[string]interface{}{
 			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)
 			data := util.JysqlDB.Find("invoice", qMap, "", "create_time", 0, 0)
 			if *data != nil && len(*data) != 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{}{
 		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 {
 		if okid > 0 {
 			return_status := 0
 			return_status := 0