Pārlūkot izejas kodu

recharge record add by people

abiao 4 gadi atpakaļ
vecāks
revīzija
6ef42f46df

+ 3 - 2
go/gopath/src/fohow.com/apps/helpers/benefit_helper.go

@@ -55,9 +55,10 @@ func NewSendInviterBenefit(wxUser *user_model.WxUser, orderId, source string) {
 		//下线充值,上线获得540返利
 		if benefitWxUser != nil {
 			count := int64(0)
-			//发放一级收益, 上级群主返利540
+			//读取上级配置收益比例
 			if balanceOrder.PaiedPrice >= base_config.GetBuyCash() {
-				count = base_config.GetCashAward()
+				be_total := balanceOrder.PaiedPrice * base_config.GetCashAward()
+				count = be_total / int64(100)
 			}
 			if count > 0 {
 				inviteOrder := new(user_model.InviteOrder).Create(benefitWxUser.Id, wxUser.Id, wxUser.Id, count, balanceOrder.TotalPrice, user_model.BALANCE_BENEFIT, balanceOrder.OrderId)