Sfoglia il codice sorgente

银豆抵扣逻辑

abiao 3 anni fa
parent
commit
2dd0c26052

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

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