|
|
@@ -97,6 +97,13 @@ func WithdrawalDoing(c *gin.Context) { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "金额不正确")) |
|
|
|
return |
|
|
|
} |
|
|
|
masterdb := db.MasterDb{} |
|
|
|
masterdb.Set() |
|
|
|
master := masterdb.GetMaster(mid) |
|
|
|
if master == nil { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "用户不存在")) |
|
|
|
return |
|
|
|
} |
|
|
|
amountMap := masterAmount(mid, args["type"]) |
|
|
|
leaveAmount := utils.StrToFloat64(amountMap["amount"]) - utils.StrToFloat64(args["amount"]) |
|
|
|
if leaveAmount < 0 { |
|
|
@@ -181,6 +188,7 @@ func WithdrawalDoing(c *gin.Context) { |
|
|
|
Oid: "", |
|
|
|
Title: "提现", |
|
|
|
FlowType: "withdrawal", |
|
|
|
ExtendUid: master.ExtendUid, |
|
|
|
} |
|
|
|
flowInsert := db.MasterAmountFlowInsertWithSess(sess, &tmpFlow) |
|
|
|
if flowInsert == false { |
|
|
@@ -201,6 +209,7 @@ func WithdrawalDoing(c *gin.Context) { |
|
|
|
Status: "提现审核", |
|
|
|
HasInvoice: utils.StrToInt(args["has_invoice"]), |
|
|
|
InvoiceBili: args["invoice_bili"], |
|
|
|
ExtendUid: master.ExtendUid, |
|
|
|
} |
|
|
|
insert := db.MasterWithdrawalFlowInsertWithSess(sess, &tmp) |
|
|
|
if insert == false { |
|
|
|