Browse Source

update

adv_callback
shenjiachi 1 month ago
parent
commit
9eebd1b085
2 changed files with 6 additions and 8 deletions
  1. +3
    -4
      app/task/svc/svc_deal_fund_data.go
  2. +3
    -4
      app/task/svc/svc_deal_platform_revenue_data.go

+ 3
- 4
app/task/svc/svc_deal_fund_data.go View File

@@ -3,7 +3,6 @@ package svc
import (
"applet/app/utils"
"applet/app/utils/cache"
"applet/app/utils/logx"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
@@ -36,7 +35,7 @@ func DealFundData(eg *xorm.Engine, dbName string, ch *rabbit.Channel) {
fundDataDb := implement.NewEggEnergyFundDataDb(eg)
fundDataList, err := fundDataDb.EggEnergyFundDataFindNotFinish()
if err != nil {
_ = logx.Error(err)
fmt.Println("DealFundData_ERR:::::", err.Error())
return
}

@@ -46,7 +45,7 @@ func DealFundData(eg *xorm.Engine, dbName string, ch *rabbit.Channel) {
// 1、判断是否是第一次执行
lastRecord, err1 := fundDataRecordsDb.EggEnergyFundDataRecordsGetLast(data.Id)
if err1 != nil {
_ = logx.Error(err1)
fmt.Println("DealFundData_ERR:::::", err1.Error())
continue
}
if lastRecord == nil {
@@ -66,7 +65,7 @@ func DealFundData(eg *xorm.Engine, dbName string, ch *rabbit.Channel) {
times := decimal.NewFromInt(int64(data.Hours * 60)).Div(frequency).RoundFloor(8)
totalAmount, err2 := decimal.NewFromString(data.TotalAmount)
if err2 != nil {
fmt.Println(err2)
fmt.Println("DealFundData_ERR:::::", err2.Error())
continue
}
amount := totalAmount.Div(times)


+ 3
- 4
app/task/svc/svc_deal_platform_revenue_data.go View File

@@ -3,7 +3,6 @@ package svc
import (
"applet/app/utils"
"applet/app/utils/cache"
"applet/app/utils/logx"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
@@ -36,7 +35,7 @@ func DealPlatformRevenueData(eg *xorm.Engine, dbName string, ch *rabbit.Channel)
platformRevenueDataDb := implement.NewPlatformRevenueDataDb(eg)
platformRevenueDataList, err := platformRevenueDataDb.PlatformRevenueDataFindNotFinish()
if err != nil {
_ = logx.Error(err)
fmt.Println("DealPlatformRevenueData_ERR:::::", err.Error())
return
}

@@ -46,7 +45,7 @@ func DealPlatformRevenueData(eg *xorm.Engine, dbName string, ch *rabbit.Channel)
// 1、判断是否是第一次执行
lastRecord, err1 := recordsDb.PlatformRevenueDataRecordsGetLast(data.Id)
if err1 != nil {
_ = logx.Error(err1)
fmt.Println("DealPlatformRevenueData_ERR:::::", err1.Error())
continue
}
if lastRecord == nil {
@@ -66,7 +65,7 @@ func DealPlatformRevenueData(eg *xorm.Engine, dbName string, ch *rabbit.Channel)
times := decimal.NewFromInt(int64(data.Hours * 60)).Div(frequency).RoundFloor(8)
totalAmount, err2 := decimal.NewFromString(data.TotalAmount)
if err2 != nil {
fmt.Println(err2)
fmt.Println("DealPlatformRevenueData_ERR:::::", err2.Error())
continue
}
amount := totalAmount.Div(times)


Loading…
Cancel
Save