DengBiao преди 1 година
родител
ревизия
e484c8de88
променени са 2 файла, в които са добавени 24 реда и са изтрити 16 реда
  1. +8
    -8
      app/admin/hdl/hdl_audit_center.go
  2. +16
    -8
      app/admin/svc/order/svc_central_kitchen_for_school_order.go

+ 8
- 8
app/admin/hdl/hdl_audit_center.go Целия файл

@@ -165,6 +165,14 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, errors.New("更新退款就餐记录状态失败2"))
return
}

//2、处理订单状态
err5 := svc.JudgePackageOrdOrdState(returnDay.OutTradeNo)
if err5 != nil {
_ = session.Rollback()
e.OutErr(c, e.ERR, err5.Error())
return
}
}

returnDay.Memo = req.Memo
@@ -179,14 +187,6 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, errors.New("更新退款订单记录状态失败1"))
return
}

//2、处理订单状态
err5 := svc.JudgePackageOrdOrdState(returnDay.OutTradeNo)
if err5 != nil {
_ = session.Rollback()
e.OutErr(c, e.ERR, err5.Error())
return
}
}

err = session.Commit()


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

@@ -261,13 +261,6 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context, req md.CentralKitch
return
}

//2、处理订单状态
err5 := svc.JudgePackageOrdOrdState(returnDay.OutTradeNo)
if err5 != nil {
_ = session.Rollback()
return err5
}

updateAck1, err4 := centralKitchenForSchoolUserWithDayDb.CentralKitchenForSchoolUserWithDayUpdate(userWithDay.Id, userWithDay, "state")
if err4 != nil {
_ = session.Rollback()
@@ -335,5 +328,20 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context, req md.CentralKitch
time.Sleep(20 * time.Millisecond) //TODO::避免频繁调用
}

return session.Commit()
session.Commit()

//TODO:: 处理订单状态
for k, _ := range dealReturnOrdMap {
err = svc.JudgePackageOrdOrdState(k)
if err != nil {
return err
}
}
for k, _ := range dealReturnOrdMapForWx {
err = svc.JudgePackageOrdOrdState(k)
if err != nil {
return err
}
}
return
}

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