|
|
@@ -1,8 +1,6 @@
|
|
|
package balance_controller
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
- "fohow.com/libs/lib_redis"
|
|
|
"github.com/astaxie/beego"
|
|
|
|
|
|
// "crypto/md5"
|
|
|
@@ -159,6 +157,11 @@ func (self *BalanceController) TakeCash() {
|
|
|
/* if user.IsCertification != 1 {
|
|
|
self.ReturnError(403, []string{"notCertificate", "用户尚未认证"}, "", nil)
|
|
|
}*/
|
|
|
+ user := self.GetCurrentUser(false)
|
|
|
+
|
|
|
+ if user.BankAccount == "" || user.AccountName == "" {
|
|
|
+ self.ReturnError(403, []string{"notBindbank", "请完善您的银行卡信息"}, "", nil)
|
|
|
+ }
|
|
|
|
|
|
wxUser := self.GetCurrentWxUser(false)
|
|
|
todayOrderList := balance_model.GetTakeCashOrderListByWxUIdAndTime(wxUser.Id, time.Now(), false)
|
|
|
@@ -187,12 +190,15 @@ func (self *BalanceController) TakeCash() {
|
|
|
o.OrderId, balance_model.CASH_SOURCE_TAKE_CASH_NAME)
|
|
|
o.AuditState = balance_model.AUTOTAKE_STATE
|
|
|
o.ExpcPayAt = time.Now().Add(time.Minute * 5)
|
|
|
+ o.AccountName = user.AccountName
|
|
|
+ o.BankAccount = user.BankAccount
|
|
|
+ o.BankName = user.BankName
|
|
|
o.Save()
|
|
|
}
|
|
|
//提现成功加入提现处理队列
|
|
|
- cashKey := lib_redis.GetAutoTakeCashList()
|
|
|
- takeId := fmt.Sprintf("%d", o.Id)
|
|
|
- lib_redis.ThrowInRedisList(cashKey, takeId)
|
|
|
+ //cashKey := lib_redis.GetAutoTakeCashList()
|
|
|
+ //takeId := fmt.Sprintf("%d", o.Id)
|
|
|
+ //lib_redis.ThrowInRedisList(cashKey, takeId)
|
|
|
|
|
|
self.Data["json"] = o
|
|
|
self.ServeJSON()
|