补充活动数据上报;修复bug

dev_aagame_provider
zhora 1 month ago
parent 7143fd807f
commit 9508575d92
  1. 25
      call/activity.go
  2. 1
      call/pay.go
  3. 6
      call/user.go
  4. 2
      modules/pay/richpay/values.go
  5. 1
      modules/web/handler/pdd.go
  6. 6
      modules/web/handler/recharge.go
  7. 1
      modules/web/handler/share.go
  8. 2
      modules/web/handler/weekCard.go
  9. 1
      modules/web/values/pay.go

@ -113,14 +113,35 @@ func ShouldShowActivityFirstRechargeBack(uid int) bool {
if uid == 0 { if uid == 0 {
return true return true
} }
now := time.Now().Unix()
now := time.Now()
conf := GetConfigActivityFirstRechargeBack() conf := GetConfigActivityFirstRechargeBack()
p, _ := GetUserXInfo(uid, "birth") p, _ := GetUserXInfo(uid, "birth")
data := GetUserFirstRechargeBackData(uid) data := GetUserFirstRechargeBackData(uid)
if now > p.Birth+conf.CD { // 超时 if now.Unix() > p.Birth+conf.CD { // 超时
if data.RewardTime == 0 && data.Reward > 0 { // 有奖励 未领取 if data.RewardTime == 0 && data.Reward > 0 { // 有奖励 未领取
return true return true
} }
if data.Reward == 0 { // 判断是不是有奖励未计算
rechargeInfo := GetRechargeInfo(uid)
val := data.Amount - GetUserCurrencyTotal(uid, common.CurrencyINR) - rechargeInfo.WithdrawingCash
if val < 0 {
val = 0
}
val = val * conf.MaxBack / 100
update := map[string]interface{}{
"reward": val,
}
if val == 0 {
update["reward_time"] = now.Unix()
}
db.Mysql().Update(&common.ActivityFirstRechargeBackData{UID: uid}, update)
if val > 0 {
return true
} else {
return false
}
}
return false return false
} }
if data.RewardTime > 0 { // 已经领奖 if data.RewardTime > 0 { // 已经领奖

@ -896,5 +896,6 @@ func ActivityWeekCard(r *common.RechargeOrder, product *common.ConfigPayProduct)
log.Error("update week card err:%v", err.Error()) log.Error("update week card err:%v", err.Error())
return return
} }
UploadActivityData(r.UID, common.ActivityIDWeekCard, common.ActivityDataJoin, r.Amount+r.Bonus)
PushRed(r.UID, pb.RedPointModule_RedPointWeekCard, 1) PushRed(r.UID, pb.RedPointModule_RedPointWeekCard, 1)
} }

@ -863,8 +863,10 @@ func GetRtpControlV1(uid int, withdrawPer ...*int) int {
if int(withdrawRechargePer) > v.WithdrawPer && v.WithdrawPer != -1 { if int(withdrawRechargePer) > v.WithdrawPer && v.WithdrawPer != -1 {
continue continue
} }
if int(personalRtp) > v.PersonalRtp && v.PersonalRtp != -1 { if v.PersonalRtp != 0 {
continue if int(personalRtp) > v.PersonalRtp && v.PersonalRtp != -1 {
continue
}
} }
rtpControl = v rtpControl = v
break break

@ -6,7 +6,7 @@ import (
) )
const ( const (
baseURL = "https://uat-pf.dtpaypro.com" baseURL = "https://uat-pf.dkpaypro.com"
tokenURL = "/auth/def/oauth/token" tokenURL = "/auth/def/oauth/token"
refreshTokenURL = "/auth/def/oauth/refresh_token" refreshTokenURL = "/auth/def/oauth/refresh_token"
payURL = "/open/payin" payURL = "/open/payin"

@ -308,6 +308,7 @@ func PddDraw(c *gin.Context) {
return return
} }
resp.Amount = pdd.WithdrawalAmount resp.Amount = pdd.WithdrawalAmount
call.UploadActivityData(a.UID, common.ActivityIDPDD, common.ActivityDataJoin, int64(pdd.WithdrawalAmount*common.DecimalDigits))
} }
func PddAwardHistory(c *gin.Context) { func PddAwardHistory(c *gin.Context) {

@ -30,8 +30,10 @@ func CheckRechargeOrder(c *gin.Context) {
// log.Debug("req:%+v", *req) // log.Debug("req:%+v", *req)
one := &common.RechargeOrder{OrderID: req.OrderID} one := &common.RechargeOrder{OrderID: req.OrderID}
db.Mysql().Get(one) db.Mysql().Get(one)
resp := values.RechargeOrderResp{} resp := values.RechargeOrderResp{
resp.Status = int(one.Status) Status: int(one.Status),
Amount: one.Amount,
}
a.Data = resp a.Data = resp
// log.Debug("resp:%+v", resp) // log.Debug("resp:%+v", resp)
} }

@ -917,4 +917,5 @@ func ShareWithdraw(c *gin.Context) {
if err != nil { if err != nil {
log.Error("update share withdraw info err, %s", err.Error()) log.Error("update share withdraw info err, %s", err.Error())
} }
call.UploadActivityData(a.UID, common.ActivityIDShare, common.ActivityDataJoin, req.Amount)
} }

@ -213,5 +213,7 @@ func WeekCardDraw(c *gin.Context) {
log.Error("update week card data err, %s", err.Error()) log.Error("update week card data err, %s", err.Error())
} }
resp.Reward = awardCount resp.Reward = awardCount
call.UploadActivityData(a.UID, common.ActivityIDWeekCard, common.ActivityDataJoin, awardCount)
return return
} }

@ -9,6 +9,7 @@ type RechargeOrderReq struct {
type RechargeOrderResp struct { type RechargeOrderResp struct {
Status int Status int
Amount int64
} }
// Amount 充值金额 // Amount 充值金额

Loading…
Cancel
Save