|
|
@@ -6,6 +6,7 @@ import ( |
|
|
|
svc "applet/app/admin/svc/enterprise_manage" |
|
|
|
svc2 "applet/app/admin/svc/order" |
|
|
|
"applet/app/db" |
|
|
|
"applet/app/db/model" |
|
|
|
"applet/app/e" |
|
|
|
"applet/app/enum" |
|
|
|
"applet/app/utils" |
|
|
@@ -105,8 +106,6 @@ func CentralKitchenForSchoolOrderRefundList(c *gin.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context) { |
|
|
|
e.OutSuc(c, "success", nil) |
|
|
|
return |
|
|
|
var req md.CentralKitchenForSchoolOrderRefundAuditReq |
|
|
|
err := c.ShouldBindJSON(&req) |
|
|
|
if err != nil { |
|
|
@@ -213,14 +212,21 @@ func CentralKitchenForSchoolOrderRefundAudit(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
go func() { |
|
|
|
err1 := svc2.CentralKitchenForSchoolOrderRefundAudit(c, req) |
|
|
|
if err1 != nil { |
|
|
|
logx.Error(err1) |
|
|
|
println("<<<<CentralKitchenForSchoolOrderRefundAudit>>>>>Error:::", err1.Error()) |
|
|
|
} |
|
|
|
cache.Del(md.AuditLockKeyForCentralKitchenLockKey) |
|
|
|
}() |
|
|
|
if req.State == 1 { |
|
|
|
//TODO::审核通过,进行退款处理 |
|
|
|
go func() { |
|
|
|
err1 := svc2.CentralKitchenForSchoolOrderRefundAudit(c, req) |
|
|
|
if err1 != nil { |
|
|
|
logx.Error(err1) |
|
|
|
println("<<<<CentralKitchenForSchoolOrderRefundAudit>>>>>Error:::", err1.Error()) |
|
|
|
var m model.CentralKitchenForSchoolUserRefundDay |
|
|
|
m.Memo = "退款处理失败:(" + err1.Error() + ")" |
|
|
|
m.State = enum.CentralKitchenForSchoolUserRefundDayStateForAuditing |
|
|
|
db.Db.In("id", req.Ids).Cols("memo", "state").Update(&m) |
|
|
|
} |
|
|
|
cache.Del(md.AuditLockKeyForCentralKitchenLockKey) |
|
|
|
}() |
|
|
|
} |
|
|
|
|
|
|
|
e.OutSuc(c, "success", nil) |
|
|
|
return |
|
|
|