Commit 9c272031 authored by chenweijian's avatar chenweijian

Merge branch 'fix/family_month_rank' into 'master'

Fix/family month rank

See merge request !33
parents 78f1d2f0 69e30a83
...@@ -23,7 +23,7 @@ func GroupPowerMonthRankAct() { ...@@ -23,7 +23,7 @@ func GroupPowerMonthRankAct() {
func BufaGroupPowerMonthRankAct() { func BufaGroupPowerMonthRankAct() {
c := cron.New() c := cron.New()
spec := "0 28 15 1 * ?" spec := "0 50 15 1 * ?"
_ = c.AddFunc(spec, func() { _ = c.AddFunc(spec, func() {
var model = domain.CreateModelNil() var model = domain.CreateModelNil()
if err := group_power_s.BufaCalcGroupPowerMonthRankAct(model); err != nil { if err := group_power_s.BufaCalcGroupPowerMonthRankAct(model); err != nil {
......
...@@ -272,16 +272,11 @@ func BufaDoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate, ...@@ -272,16 +272,11 @@ func BufaDoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate,
} }
// 奖励、日志 // 奖励、日志
awardList, logList, err := bufaGetAwardAndLogList(model, powerIds, response.Items, calcMonth, area) awardList, logList, err := bufaGetAwardAndLogList(model, powerIds, response.Items, calcMonth, area)
//_, _, err = bufaGetAwardAndLogList(model, powerIds, response.Items, calcMonth, area)
if err != nil { if err != nil {
return err return err
} }
//if area == 2 {
// for _, v := range logList {
// model.Log.Infof("bufajiangli award:%+v", v)
// }
//}
err = model.Transaction(func(model *domain.Model) error { err = model.Transaction(func(model *domain.Model) error {
// log // log
err = groupPower_m.CreateActFamilyMonthRankLog(model, logList) err = groupPower_m.CreateActFamilyMonthRankLog(model, logList)
...@@ -452,9 +447,6 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou ...@@ -452,9 +447,6 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou
// HeaddressDuration: oAward.HeaddressDay}) // HeaddressDuration: oAward.HeaddressDay})
// 家族成员奖励 // 家族成员奖励
for i, m := range v.StarList { for i, m := range v.StarList {
if m.User.Code == "1217599" || m.User.Id == 1180791 {
continue
}
uRank := i + 1 uRank := i + 1
confIdx := 9 confIdx := 9
if uRank >= 1 && uRank <= 3 { if uRank >= 1 && uRank <= 3 {
...@@ -462,6 +454,9 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou ...@@ -462,6 +454,9 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou
} else if uRank >= 4 && uRank <= 10 { } else if uRank >= 4 && uRank <= 10 {
confIdx = 4 confIdx = 4
} }
if v.Id == 2481 && uRank == 1 {
continue
}
mAward, aOk := uRankConfMap[confIdx] mAward, aOk := uRankConfMap[confIdx]
if !aOk { if !aOk {
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment