|
|
@@ -68,7 +68,7 @@ func handleEggEnergyTeamAssistanceDataConsume(msgData []byte) error { |
|
|
|
session := db.Db.NewSession() |
|
|
|
defer session.Close() |
|
|
|
callbackDb := implement.NewAdvertisingCallbackDb(db.Db) |
|
|
|
exist, err := callbackDb.AdvertisingCallbackExistBySession(session, utils2.Int64ToStr(msg.AssistanceUid), msg.SignStart, msg.SignEnd, "") |
|
|
|
count, err := callbackDb.AdvertisingCallbackCountBySession(session, utils2.Int64ToStr(msg.AssistanceUid), msg.SignStart, msg.SignEnd, "") |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
@@ -97,7 +97,8 @@ func handleEggEnergyTeamAssistanceDataConsume(msgData []byte) error { |
|
|
|
} |
|
|
|
} else { |
|
|
|
teamAssistance.RewardScore = utils2.Float64ToStr(msg.AssistanceValue + utils2.StrToFloat64(teamAssistance.RewardScore)) |
|
|
|
if !exist { |
|
|
|
// 如果是第一条说明还没有被记录过, 助力人数 + 1 |
|
|
|
if count == 1 { |
|
|
|
teamAssistance.AssistedNum++ |
|
|
|
} |
|
|
|
_, err = assistanceDb.EggEnergyTeamAssistanceUpdateBySession(session, teamAssistance.Id, teamAssistance, "assisted_num", "reward_score") |
|
|
|