|
@@ -35,6 +35,8 @@ func (self *BalanceController) GetBalanceInfo() {
|
|
|
type BalanceInfo struct {
|
|
type BalanceInfo struct {
|
|
|
Total int64 `orm:"-" json:"total"` //余额,单位分
|
|
Total int64 `orm:"-" json:"total"` //余额,单位分
|
|
|
ShowInviteMode int64 `orm:"-" json:"show_invite_mode"` //是否群主
|
|
ShowInviteMode int64 `orm:"-" json:"show_invite_mode"` //是否群主
|
|
|
|
|
+ SilverTotal int64 `orm:"-" json:"silver_total"` //银豆余额,单位分
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//user := self.GetCurrentUser(true)
|
|
//user := self.GetCurrentUser(true)
|
|
|
wxUId := self.GetCurrentWxUserIdByToken()
|
|
wxUId := self.GetCurrentWxUserIdByToken()
|
|
@@ -44,6 +46,7 @@ func (self *BalanceController) GetBalanceInfo() {
|
|
|
}
|
|
}
|
|
|
info := new(BalanceInfo)
|
|
info := new(BalanceInfo)
|
|
|
info.Total = balance_model.GetUserTotalBalance(wxUId)
|
|
info.Total = balance_model.GetUserTotalBalance(wxUId)
|
|
|
|
|
+ info.SilverTotal = balance_model.GetUserTotalSilver(wxUId)
|
|
|
info.ShowInviteMode = wxUser.ShowInviteMode
|
|
info.ShowInviteMode = wxUser.ShowInviteMode
|
|
|
self.Data["json"] = info
|
|
self.Data["json"] = info
|
|
|
self.ServeJSON()
|
|
self.ServeJSON()
|