feat(users): calculate the user hourly scores income

This commit is contained in:
OldHawk
2018-06-03 23:51:31 +08:00
parent 717acfc98b
commit b9900a9b7c
23 changed files with 385 additions and 47 deletions

View File

@@ -21,7 +21,7 @@
#### :white_small_square: Data calculation and scores count
1. Seed uploaders calculate the upload volume of `* %(salesGlobalConfig.uploader.value.Ur).2f`
1. Seed uploaders calculate the upload volume of `* %(salesGlobalConfig.uploader.value.Ur).2f`, and calculate the upload scores of `* %(scoreConfig.action.seedUpDownload.uploaderRatio).2f`.
1. Other users calculate the normal upload and download amount.
1. All users of all the seed upload and download volume enjoy promotion bonus, in case of global promotion, they enjoy the overall promotion bonus.
1. VIP users can enjoy additional bonuses for uploading and downloading as well as seeding scores. For details, please refer to [VIP Rights Rules Detail](/about/manual/vipRules)。

View File

@@ -21,7 +21,7 @@
#### :white_small_square: 流量計算與積分統計
1. 種子釋出者按 `%(salesGlobalConfig.uploader.value.Ur).2f` 倍的上傳量計算。
1. 種子釋出者按 `%(salesGlobalConfig.uploader.value.Ur).2f` 倍的上傳量計算,並獲得 `%(scoreConfig.action.seedUpDownload.uploaderRatio).2f` 倍的上傳量積分
1. 分流者按正常上傳下載量計算。
1. 所有用戶所有種子上傳下載量享有促銷加成,如遇全局促銷則享有全局促銷加成。
1. VIP 用戶的上傳下載量以及做種積分享有額外的加成,詳情請參考 [VIP 用戶者權益細則](/about/manual/vipRules)。

View File

@@ -21,7 +21,7 @@
#### :white_small_square: 流量计算与积分统计
1. 种子发布者按 `%(salesGlobalConfig.uploader.value.Ur).2f` 倍的上传量计算。
1. 种子发布者按 `%(salesGlobalConfig.uploader.value.Ur).2f` 倍的上传量计算,并获得 `%(scoreConfig.action.seedUpDownload.uploaderRatio).2f` 倍的上传量积分
1. 分流者按正常上传下载量计算。
1. 所有用户所有种子上传下载量享有促销加成,如遇全局促销则享有全局促销加成。
1. VIP 用户的上传下载量以及做种积分享有额外的加成,详情请参考 [VIP 用户权益细则](/about/manual/vipRules)。

View File

@@ -25,6 +25,7 @@
none vip user get uploaded scores: 2 * 1 * 10 = 20, downloaded scores: 2 * 0.5 * 15 = 15.
vip user get uploaded scores: 20 * 1.5 = 30, downloaded scores: 15 * 1.5 = 22.5.
```
* Seed uploaders calculate the upload scores of `* %(scoreConfig.action.seedUpDownload.uploaderRatio).2f`.
* In the seeding state, the seeding scores will be get from the seeding time. For every seed, `%(scoreConfig.action.seedTimed.timedValue).2f` scores per `%(scoreConfig.action.seedTimed.additionTime_str)s`, vip user extra addition ratio is `%(scoreConfig.action.seedTimed.vipRatio).2f`.
* Scores got for the above two items, will get extra addition based on the seed life and seeding users, <mark>And two kinds of addition are available at the same time</mark>.
```javascript
@@ -33,7 +34,7 @@
Coefficient is: %(scoreConfig.action.seedSeederAndLife.seederCoefficient).2f
Seecer count less than: %(scoreConfig.action.seedSeederAndLife.seederCount)d
For 1 seeding user, the extra addition ratio is: 3, [for 2 is 2.8], [for 3 is 2.6], [for 4 is 2.4], [for 5 is 2.2], [for 6 is 2.0], [for 7 is 1.8], [for 8 is 1.6], [for 9 is 1.4], [for 10 is 1.2], [more than 10 is 1, same as no extra addition].
For 1 seeding user, the extra addition ratio is: 2, [for 2 is 1.9], [for 3 is 1.8], [for 4 is 1.7], [for 5 is 1.6], [for 6 is 1.5], [for 7 is 1.4], [for 8 is 1.3], [for 9 is 1.2], [for 10 is 1.1], [more than 10 is 1, same as no extra addition].
```
```javascript
With seed life:
@@ -42,7 +43,7 @@
Max ratio is: %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
The basic ratio is %(scoreConfig.action.seedSeederAndLife.lifeBasicRatio).2f, increase %(scoreConfig.action.seedSeederAndLife.lifeCoefficientOfDay).3f every day.
For 10 days life ratio is 1.02, [100 days is 1.2], [200 days is 1.4] etc, the max ratio is %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f.
For 10 days life ratio is 1.01, [100 days is 1.1], [200 days is 1.2] etc, the max ratio is %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f.
```
* At the end of each month, the system will award scores to users who have successfully sent invitations. the score number limit is the percentage `%(scoreConfig.transferToInviter.transRatio)f` of the monthly got of the invited users, the current award function enable status is
```javascript

View File

@@ -25,6 +25,7 @@
Vip 使用者獲得上傳積分: 2 * 1 * 10 = 20, 下載積分: 2 * 0.5 * 15 = 15
Vip 使用者獲得上傳積分: 20 * 1.5 = 30, 下載積分: 15 * 1.5 = 22.5
```
* 種子發布者按 `%(scoreConfig.action.seedUpDownload.uploaderRatio).2f` 倍計算上傳量積分。
* 在做種狀態下,將會獲得由保種時間帶來的保種積分, 每個種子每 `%(scoreConfig.action.seedTimed.additionTime_str)s` 獲得 `%(scoreConfig.action.seedTimed.timedValue).2f` 積分Vip 使用者額外加成係數為 `%(scoreConfig.action.seedTimed.vipRatio).2f`
* 對於上述兩項獲得的積分, 還會根據種子的生命期和保種人數獲得額外的再次加成,<mark>而且兩種加成疊加生效</mark>。
```javascript
@@ -33,7 +34,7 @@
加成係數: %(scoreConfig.action.seedSeederAndLife.seederCoefficient).2f
最多保種人數: %(scoreConfig.action.seedSeederAndLife.seederCount)d
如果只有 1 個保種使用者: 加成係數為 2, [2 使用者為 2.8], [3 使用者為 2.6], [4 使用者為 2.4], [5 使用者為 2.2], [6 使用者為 2.0], [7 使用者為 1.8], [8 使用者為 1.6], [9 使用者為 1.4], [10 使用者為 1.2], [超過 10 使用者為 1, 相當於沒有加成]
如果只有 1 個保種使用者: 加成係數為 2, [2 使用者為 1.9], [3 使用者為 1.8], [4 使用者為 1.7], [5 使用者為 1.6], [6 使用者為 1.5], [7 使用者為 1.4], [8 使用者為 1.3], [9 使用者為 1.2], [10 使用者為 1.1], [超過 10 使用者為 1, 相當於沒有加成]
```
```javascript
種子生命加成:
@@ -42,7 +43,7 @@
最大加成係數: %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
加成基礎係數為 %(scoreConfig.action.seedSeederAndLife.lifeBasicRatio).2f, 根據種子生命每天增加 %(scoreConfig.action.seedSeederAndLife.lifeCoefficientOfDay).3f
如果種子生命(釋出時間) 10 則加成係數為 1.02, [100 天是 1.2], [200 天是 1.4], 以此類推最大加成係數為 %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
如果種子生命(釋出時間) 10 則加成係數為 1.01, [100 天是 1.1], [200 天是 1.2], 以此類推最大加成係數為 %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
```
* 系統在每個月底會對成功發送過邀請函的用戶進行積分獎勵,獎勵額度為受邀請用戶當月的進帳積分的 `%(scoreConfig.transferToInviter.transRatio)f` 倍,目前該獎勵功能開關狀態為:
```javascript

View File

@@ -25,6 +25,7 @@
Vip 用户获得上传积分: 2 * 1 * 10 = 20, 下载积分: 2 * 0.5 * 15 = 15
Vip 用户获得上传积分: 20 * 1.5 = 30, 下载积分: 15 * 1.5 = 22.5
```
* 种子发布者按 `%(scoreConfig.action.seedUpDownload.uploaderRatio).2f` 倍计算上传量积分。
* 在做种状态下,将会获得由保种时间带来的保种积分, 每个种子每 `%(scoreConfig.action.seedTimed.additionTime_str)s` 获得 `%(scoreConfig.action.seedTimed.timedValue).2f` 积分Vip 用户额外加成系数为 `%(scoreConfig.action.seedTimed.vipRatio).2f`
* 对于上述两项获得的积分, 还会根据种子的生命期和保种人数获得额外的再次加成,<mark>而且两种加成叠加生效</mark>。
```javascript
@@ -33,7 +34,7 @@
加成系数: %(scoreConfig.action.seedSeederAndLife.seederCoefficient).2f
最多保种人数: %(scoreConfig.action.seedSeederAndLife.seederCount)d
如果只有 1 个保种用户: 加成系数为 3, [2 用户为 2.8], [3 用户为 2.6], [4 用户为 2.4], [5 用户为 2.2], [6 用户为 2.0], [7 用户为 1.8], [8 用户为 1.6], [9 用户为 1.4], [10 用户为 1.2], [超过 10 用户为 1, 相当于没有加成]
如果只有 1 个保种用户: 加成系数为 3, [2 用户为 1.9], [3 用户为 1.8], [4 用户为 1.7], [5 用户为 1.6], [6 用户为 1.5], [7 用户为 1.4], [8 用户为 1.3], [9 用户为 1.2], [10 用户为 1.1], [超过 10 用户为 1, 相当于没有加成]
```
```javascript
种子生命加成:
@@ -42,7 +43,7 @@
最大加成系数: %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
加成基础系数为 %(scoreConfig.action.seedSeederAndLife.lifeBasicRatio).2f, 根据种子生命每天增加 %(scoreConfig.action.seedSeederAndLife.lifeCoefficientOfDay).3f
如果种子生命(发布时间) 10 则加成系数为 1.02, [100 天是 1.2], [200 天是 1.4], 以此类推最大加成系数为 %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
如果种子生命(发布时间) 10 则加成系数为 1.01, [100 天是 1.1], [200 天是 1.2], 以此类推最大加成系数为 %(scoreConfig.action.seedSeederAndLife.lifeMaxRatio).2f
```
* 系统在每个月底会对成功发送过邀请函的用户进行积分奖励,奖励额度为受邀请用户当月的进帐积分的 `%(scoreConfig.transferToInviter.transRatio)f` 倍,目前该奖励功能开关状态为:
```javascript