@@ -91,4 +91,9 @@ func initTasks() { | |||||
jobs[taskMd.CronEggEnergyDealPlatformRevenueData] = taskEggEnergyDealPlatformRevenueData | jobs[taskMd.CronEggEnergyDealPlatformRevenueData] = taskEggEnergyDealPlatformRevenueData | ||||
jobs[taskMd.CronEggEnergyDealFundData] = taskEggEnergyDealFundData | jobs[taskMd.CronEggEnergyDealFundData] = taskEggEnergyDealFundData | ||||
jobs[taskMd.CronEggEnergyUserEggScore] = taskCronEggEnergyUserEggScore | jobs[taskMd.CronEggEnergyUserEggScore] = taskCronEggEnergyUserEggScore | ||||
jobs[taskMd.CornEggEnergyAutoReleaseTeamEggEnergy] = taskEggEnergyAutoReleaseTeamEggEnergy // 蛋蛋能量-自动释放团队蛋蛋能量到个人能量 | |||||
jobs[taskMd.CornSettlementStarLevelDividends] = taskEggEnergySettlementStarLevelDividends // 蛋蛋能量-结算星级分红 | |||||
jobs[taskMd.CornEggEnergyDealUserPublicPlatoonPunish] = taskEggEnergyDealUserPublicPlatoonPunish // 蛋蛋能量-公排处罚 | |||||
jobs[taskMd.CornEggEnergyAutoAdjustPrice] = taskEggEnergyAutoAdjustPrice // 蛋蛋能量-自动调整价格 | |||||
jobs[taskMd.CornEggEnergyAutoCommunityDividends] = taskEggEnergyCommunityDividends // 蛋蛋能量-社区分红 | |||||
} | } |
@@ -1,8 +1,14 @@ | |||||
package md | package md | ||||
const ( | const ( | ||||
CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格 | |||||
CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益 | |||||
CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入 | |||||
CronEggEnergyUserEggScore = "cron_egg_energy_user_egg_score" // 处理蛋蛋分 | |||||
CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格 | |||||
CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益 | |||||
CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入 | |||||
CronEggEnergyUserEggScore = "cron_egg_energy_user_egg_score" // 处理蛋蛋分 | |||||
CornEggEnergyAutoReleaseTeamEggEnergy = "cron_egg_energy_auto_release_team_egg_energy" // 处理团队蛋蛋能量释放到个人蛋蛋能量 | |||||
CornSettlementStarLevelDividends = "cron_egg_energy_settlement_star_level_dividends" // 结算星级分红 | |||||
CornEggEnergyDealUserPublicPlatoonPunish = "cron_egg_energy_deal_user_public_platoon_punish" // 公排处罚 | |||||
CornEggEnergyAutoAdjustPrice = "cron_egg_energy_auto_adjust_price" // 自动调整价格 | |||||
CornEggEnergyAutoCommunityDividends = "cron_egg_energy_community_dividends" // 社区分红 | |||||
) | ) |
@@ -0,0 +1,21 @@ | |||||
package svc | |||||
import ( | |||||
"applet/app/cfg" | |||||
rule "code.fnuoos.com/EggPlanet/egg_system_rules.git" | |||||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy" | |||||
"fmt" | |||||
"xorm.io/xorm" | |||||
) | |||||
func EggEnergyAutoAdjustPrice(engine *xorm.Engine) { | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>EggEnergyAutoAdjustPrice<<<<<<<<<<<<<<<<<<<") | |||||
rule.Init(cfg.RedisAddr) | |||||
err := egg_energy.AutoAdjustPrice(engine) | |||||
if err != nil { | |||||
fmt.Println("err:::::11111", err.Error()) | |||||
return | |||||
} | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>EggEnergyAutoAdjustPrice----end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") | |||||
return | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package svc | |||||
import ( | |||||
"applet/app/cfg" | |||||
rule "code.fnuoos.com/EggPlanet/egg_system_rules.git" | |||||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy" | |||||
"fmt" | |||||
"xorm.io/xorm" | |||||
) | |||||
func EggEnergyAutoReleaseTeamEggEnergy(engine *xorm.Engine) { | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>EggEnergyAutoReleaseTeamEggEnergy-----<<<<<<<<<<<<<<<<<<<") | |||||
rule.Init(cfg.RedisAddr) | |||||
err := egg_energy.AutoReleaseExchangeTeamEggEnergy(engine) | |||||
if err != nil { | |||||
fmt.Println("err:::::11111", err.Error()) | |||||
return | |||||
} | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>EggEnergyAutoReleaseTeamEggEnergy----end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package svc | |||||
import ( | |||||
"applet/app/cfg" | |||||
rule "code.fnuoos.com/EggPlanet/egg_system_rules.git" | |||||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy" | |||||
"fmt" | |||||
"xorm.io/xorm" | |||||
) | |||||
func EggEnergyCommunityDividends(engine *xorm.Engine) { | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>EggEnergyCommunityDividends<<<<<<<<<<<<<<<<<<<") | |||||
rule.Init(cfg.RedisAddr) | |||||
err := egg_energy.StartCommunityDividends(engine) | |||||
if err != nil { | |||||
fmt.Println("err:::::00000", err.Error()) | |||||
return | |||||
} | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>OneCirclesCommunityDividends----end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") | |||||
return | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package svc | |||||
import ( | |||||
"applet/app/cfg" | |||||
rule1 "code.fnuoos.com/EggPlanet/egg_system_rules.git" | |||||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule" | |||||
"fmt" | |||||
"xorm.io/xorm" | |||||
) | |||||
func EggEnergyDealUserPublicPlatoonPunish(engine *xorm.Engine) { | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>EggEnergyDealUserPublicPlatoonPunish<<<<<<<<<<<<<<<<<<<") | |||||
rule1.Init(cfg.RedisAddr) | |||||
err := rule.DealUserPublicPlatoonPunish(engine) | |||||
if err != nil { | |||||
fmt.Println("err:::::11111", err.Error()) | |||||
return | |||||
} | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>EggEnergyDealUserPublicPlatoonPunish----end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") | |||||
return | |||||
} |
@@ -0,0 +1,27 @@ | |||||
package svc | |||||
import ( | |||||
"applet/app/cfg" | |||||
rule "code.fnuoos.com/EggPlanet/egg_system_rules.git" | |||||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" | |||||
"fmt" | |||||
"xorm.io/xorm" | |||||
) | |||||
func EggEnergySettlementStarLevelDividends(engine *xorm.Engine) { | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>EggEnergySettlementStarLevelDividends<<<<<<<<<<<<<<<<<<<") | |||||
rule.Init(cfg.RedisAddr) | |||||
ch, err := rabbit.Cfg.Pool.GetChannel() | |||||
if err != nil { | |||||
return | |||||
} | |||||
defer ch.Release() | |||||
err = egg_energy.SettlementStarLevelDividends(engine, ch) | |||||
if err != nil { | |||||
fmt.Println("err:::::11111", err.Error()) | |||||
return | |||||
} | |||||
fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>EggEnergySettlementStarLevelDividends----end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") | |||||
return | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package task | |||||
import ( | |||||
"applet/app/task/svc" | |||||
"math/rand" | |||||
"time" | |||||
"xorm.io/xorm" | |||||
) | |||||
func taskEggEnergyAutoAdjustPrice(eg *xorm.Engine) { | |||||
for { | |||||
if len(ch) > workerNum { | |||||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||||
} else { | |||||
goto START | |||||
} | |||||
} | |||||
START: | |||||
ch <- 1 | |||||
svc.EggEnergyAutoAdjustPrice(eg) | |||||
<-ch | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package task | |||||
import ( | |||||
"applet/app/task/svc" | |||||
"math/rand" | |||||
"time" | |||||
"xorm.io/xorm" | |||||
) | |||||
func taskEggEnergyAutoReleaseTeamEggEnergy(eg *xorm.Engine) { | |||||
for { | |||||
if len(ch) > workerNum { | |||||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||||
} else { | |||||
goto START | |||||
} | |||||
} | |||||
START: | |||||
ch <- 1 | |||||
svc.EggEnergyAutoReleaseTeamEggEnergy(eg) | |||||
<-ch | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package task | |||||
import ( | |||||
"applet/app/task/svc" | |||||
"math/rand" | |||||
"time" | |||||
"xorm.io/xorm" | |||||
) | |||||
func taskEggEnergyCommunityDividends(eg *xorm.Engine) { | |||||
for { | |||||
if len(ch) > workerNum { | |||||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||||
} else { | |||||
goto START | |||||
} | |||||
} | |||||
START: | |||||
ch <- 1 | |||||
svc.EggEnergyCommunityDividends(eg) | |||||
<-ch | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package task | |||||
import ( | |||||
"applet/app/task/svc" | |||||
"math/rand" | |||||
"time" | |||||
"xorm.io/xorm" | |||||
) | |||||
func taskEggEnergyDealUserPublicPlatoonPunish(eg *xorm.Engine) { | |||||
for { | |||||
if len(ch) > workerNum { | |||||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||||
} else { | |||||
goto START | |||||
} | |||||
} | |||||
START: | |||||
ch <- 1 | |||||
svc.EggEnergyDealUserPublicPlatoonPunish(eg) | |||||
<-ch | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package task | |||||
import ( | |||||
"applet/app/task/svc" | |||||
"math/rand" | |||||
"time" | |||||
"xorm.io/xorm" | |||||
) | |||||
func taskEggEnergySettlementStarLevelDividends(eg *xorm.Engine) { | |||||
for { | |||||
if len(ch) > workerNum { | |||||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||||
} else { | |||||
goto START | |||||
} | |||||
} | |||||
START: | |||||
ch <- 1 | |||||
svc.EggEnergySettlementStarLevelDividends(eg) | |||||
<-ch | |||||
} |
@@ -34,7 +34,7 @@ require ( | |||||
require ( | require ( | ||||
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205074100-eab6e9316de6 | code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205074100-eab6e9316de6 | ||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241203080408-75cfef2c6334 | |||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241205075006-9c0bf995c788 | |||||
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be | code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | ||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 | github.com/360EntSecGroup-Skylar/excelize v1.4.1 | ||||