DengBiao преди 8 месеца
родител
ревизия
7ddce27e65
променени са 1 файла, в които са добавени 23 реда и са изтрити 25 реда
  1. +23
    -25
      app/admin/svc/order/svc_central_kitchen_for_school_order.go

+ 23
- 25
app/admin/svc/order/svc_central_kitchen_for_school_order.go Целия файл

@@ -402,32 +402,30 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context, req md.CentralKitch
fmt.Println(">>>>wxRefund<<<<", resp)

if err6 != nil {
if err6 != nil {
fmt.Println("dealReturnOrdMapForWx_ERR::::", err6.Error())
//TODO::1、将 central_kitchen_for_school_user_refund_day 审核状态修改为`退款中`
var sql string
parts := strings.Split(err6.Error(), "Message: ")
if len(parts) > 1 {
// 去除"Message:"后面的换行符和空格
message := strings.TrimSpace(parts[1])
sql = fmt.Sprintf("update central_kitchen_for_school_user_refund_day set state =5, memo = '%s' where out_request_no = '%s'", message, v.OutRequestNo)
} else {
sql = fmt.Sprintf("update central_kitchen_for_school_user_refund_day set state =5, memo = '%s' where out_request_no = '%s'", err6.Error(), v.OutRequestNo)
}
db.ExecuteOriginalSql(db.Db, sql)

//TODO::2、将 central_kitchen_for_school_user_with_day 修改状态为退款中
sql1 := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
idsStr := strings.Join(dealReturnOrd[k], ",")
sql1 = fmt.Sprintf(sql, enum.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
db.ExecuteOriginalSql(db.Db, sql1)

utils.FilePutContents("dealReturnOrdMapForWx_ERR", utils.SerializeStr(map[string]interface{}{
"sql": sql,
"sql1": sql1,
"err": err6.Error(),
}))
fmt.Println("dealReturnOrdMapForWx_ERR::::", err6.Error())
//TODO::1、将 central_kitchen_for_school_user_refund_day 审核状态修改为`退款中`
var sql string
parts := strings.Split(err6.Error(), "Message: ")
if len(parts) > 1 {
// 去除"Message:"后面的换行符和空格
message := strings.TrimSpace(parts[1])
sql = fmt.Sprintf("update central_kitchen_for_school_user_refund_day set state =5, memo = '%s' where out_request_no = '%s'", message, v.OutRequestNo)
} else {
sql = fmt.Sprintf("update central_kitchen_for_school_user_refund_day set state =5, memo = '%s' where out_request_no = '%s'", err6.Error(), v.OutRequestNo)
}
db.ExecuteOriginalSql(db.Db, sql)

//TODO::2、将 central_kitchen_for_school_user_with_day 修改状态为退款中
sql1 := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
idsStr := strings.Join(dealReturnOrd[k], ",")
sql1 = fmt.Sprintf(sql, enum.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
db.ExecuteOriginalSql(db.Db, sql1)

utils.FilePutContents("dealReturnOrdMapForWx_ERR", utils.SerializeStr(map[string]interface{}{
"sql": sql,
"sql1": sql1,
"err": err6.Error(),
}))
} else {
//TODO::处理订单状态
err = svc.JudgePackageOrdOrdState(k)


Зареждане…
Отказ
Запис