dev_aagame_provider
zhora 2 months ago
parent 0c52e3ee04
commit 3a14ff4352
  1. 8
      call/share.go
  2. 4
      modules/backend/handler/examine/examine.go
  3. 2
      modules/backend/handler/statistics/reviewAppSummary.go
  4. 1
      modules/backend/values/examine.go
  5. 1
      modules/web/handler/share.go
  6. 2
      modules/web/values/shareNew.go

@ -667,8 +667,10 @@ func ShareRankHandler() {
}
timer := time.NewTimer(nextSettleAt.Sub(now))
<-timer.C
shareRankAward()
nextSettleAt = util.GetWeekZeroTime(now).AddDate(0, 0, 7).Add(30 * time.Minute)
log.Debug("next share rank at: %s", nextSettleAt.Format(time.DateTime))
timer.Reset(nextSettleAt.Sub(time.Now()))
}
})
})
@ -900,6 +902,10 @@ func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err
RewardAt: now.Unix(),
}
awardCount = updateValue
if awardCount == 0 { // 绑定的时候不关心奖励数
awardCount = amount
updateValue = amount
}
updateValues["reward"] = gorm.Expr("reward + ?", amount)
updateValues["withdrawable"] = gorm.Expr("withdrawable + ?", amount)
}

@ -67,7 +67,9 @@ func WithdrawList(c *gin.Context) {
if req.Operator != nil {
table1Condition += fmt.Sprintf(" AND operator = %s ", *req.Operator)
}
if req.OrderId != nil {
table1Condition += fmt.Sprintf(" AND orderid = '%s' ", *req.OrderId)
}
// 表2的查询条件
table2Condition := ""
if req.Platform != nil {

@ -56,7 +56,7 @@ func ReviewAppSummary(c *gin.Context) {
group := new(sync.WaitGroup)
group.Add(len(tempChannelArr))
resp.PlatformData = make([]*values.ReviewData, len(tempChannelArr))
if su >= zero {
if eu >= zero {
for m := 0; m < len(tempChannelArr); m++ {
index := m
util.Go(func() {

@ -29,6 +29,7 @@ type WithdrawListReq struct {
PayChannel *int `json:"PayChannel"`
Operator *string `json:"Operator"`
Sort int `json:"Sort"`
OrderId *string `json:"OrderId"`
}
// WithdrawListResp 退出列表返回

@ -758,6 +758,7 @@ func RankDetails(c *gin.Context) {
rankAt = rankAt.AddDate(0, 0, -7)
}
log.Debug("share rankDetails, %+v rankAt:%d", req, rankAt.Unix())
shareRankUsers, count, err := call.ShareRankUserGet(req.Page, req.PageSize, rankAt, true)
if err != nil {
log.Error("get rank user err, %s", err.Error())

@ -287,7 +287,7 @@ type RewardResp struct {
}
type RankDetailsReq struct {
Previous bool `json:"previous"` // 历史列表
Previous bool `json:"Pervious"` // 历史列表
Page int `json:"page"`
PageSize int `json:"pageSize"`
}

Loading…
Cancel
Save