|
@@ -19,11 +19,18 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) { |
|
|
fmt.Println("egg_energy_deal_platform_revenue_data...") |
|
|
fmt.Println("egg_energy_deal_platform_revenue_data...") |
|
|
defer func() { |
|
|
defer func() { |
|
|
if err := recover(); err != nil { |
|
|
if err := recover(); err != nil { |
|
|
fmt.Println(err) |
|
|
|
|
|
|
|
|
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}() |
|
|
}() |
|
|
|
|
|
|
|
|
|
|
|
ch, err := rabbit.Cfg.Pool.GetChannel() |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
defer ch.Release() |
|
|
|
|
|
|
|
|
// 悲观锁防止串行 |
|
|
// 悲观锁防止串行 |
|
|
getString, _ := cache.GetString(EggEnergyDealPlatformRevenueDataKey) |
|
|
getString, _ := cache.GetString(EggEnergyDealPlatformRevenueDataKey) |
|
|
if getString != "" { |
|
|
if getString != "" { |
|
@@ -41,13 +48,6 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ch, err := rabbit.Cfg.Pool.GetChannel() |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
fmt.Println("EggEnergyDealPlatformRevenueDataGetRabbitChannel_ERR:::::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
defer ch.Release() |
|
|
|
|
|
|
|
|
|
|
|
now := time.Now() |
|
|
now := time.Now() |
|
|
recordsDb := implement.NewPlatformRevenueDataRecordsDb(eg) |
|
|
recordsDb := implement.NewPlatformRevenueDataRecordsDb(eg) |
|
|
for _, data := range platformRevenueDataList { |
|
|
for _, data := range platformRevenueDataList { |
|
|