Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
e484c8de88
2 changed files with 24 additions and 16 deletions
  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 View File

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

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


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

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


err = session.Commit() err = session.Commit()


+ 16
- 8
app/admin/svc/order/svc_central_kitchen_for_school_order.go View File

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


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

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

Loading…
Cancel
Save