Преглед изворни кода

add cash to balance function

abiao пре 5 година
родитељ
комит
c6235f337f

+ 4 - 4
go/gopath/src/fohow.com/apps/controllers/balance_controller/balance_controller.go

@@ -285,9 +285,9 @@ func (self *BalanceController) TransferToBalance() {
 	//单位:分
 	amount, _ := self.GetInt64("amount")
 	useCache, _ := self.GetBool("cache", false)
-	wxUser := user_model.GetWxUserById(27139, useCache)
+	//wxUser := user_model.GetWxUserById(27139, useCache)
 
-	//wxUser := self.GetCurrentWxUser(useCache)
+	wxUser := self.GetCurrentWxUser(useCache)
 	//beego.BeeLogger.Warn("wxUser: %s", wxUser)
 
 	if wxUser == nil {
@@ -339,8 +339,8 @@ func (self *BalanceController) GetCashToBalanceList() {
 	}
 	cache, _ := self.GetBool("cache", false)
 
-	//wxUser := self.GetCurrentWxUser(cache)
-	wxUser := user_model.GetWxUserById(27139, true)
+	wxUser := self.GetCurrentWxUser(cache)
+	//wxUser := user_model.GetWxUserById(27139, true)
 	if wxUser == nil {
 		self.ReturnError(403, apps.UserNeedLogin, "", nil)
 	}

+ 1 - 1
go/gopath/src/fohow.com/apps/controllers/balance_controller/init.go

@@ -17,7 +17,7 @@ import (
 var (
 	//需要校验用户登录的Action
 	exceptCheckUserLoginAction   = []string{"TransferToBalance", "GetCashToBalanceList", "GetTakeCashLimit", "GetCashBalanceList", "GetCashBalanceInfo", "GetBalanceInfo", "GetBalanceDetail", "GetBalanceList", "GetTakeCashOrders"}
-	exceptCheckWxUserLoginAction = []string{"TransferToBalance", "GetCashToBalanceList"}
+	exceptCheckWxUserLoginAction = []string{""}
 )
 
 type BalanceController struct {