Procházet zdrojové kódy

db.Db不能在这里用

master
huangjiajun před 4 týdny
rodič
revize
50c6d64994
2 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. +2
    -3
      rule/egg_energy/activity_coin_ready_exchange_egg_energy.go
  2. +2
    -3
      rule/egg_energy/give_activty_coin.go

+ 2
- 3
rule/egg_energy/activity_coin_ready_exchange_egg_energy.go Zobrazit soubor

@@ -1,7 +1,6 @@
package egg_energy

import (
db "code.fnuoos.com/EggPlanet/egg_models.git/src"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
@@ -102,7 +101,7 @@ func ActivityCoinReadyExchangeEggEnergy(engine *xorm.Engine, uid int64, ch *rabb

//6、插入签到记录
now := time.Now()
eggSignInDb := implement.NewEggSignInDb(db.Db)
eggSignInDb := implement.NewEggSignInDb(engine)
var sign = &model.EggSignIn{
Uid: uid,
StartTime: now.Format("2006-01-02 15:04:05"),
@@ -127,7 +126,7 @@ func ActivityCoinReadyExchangeEggEnergy(engine *xorm.Engine, uid int64, ch *rabb
return err
}
if !has {
eggEnergyUserActivityDb := implement.NewEggEnergyUserActivityDb(db.Db)
eggEnergyUserActivityDb := implement.NewEggEnergyUserActivityDb(engine)
insertAffected, err1 := eggEnergyUserActivityDb.EggEnergyUserActivityInsert(&model.EggEnergyUserActivity{
Uid: uid,
Date: now.Format("2006-01-02"),


+ 2
- 3
rule/egg_energy/give_activty_coin.go Zobrazit soubor

@@ -1,7 +1,6 @@
package egg_energy

import (
db "code.fnuoos.com/EggPlanet/egg_models.git/src"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/enum"
@@ -65,7 +64,7 @@ func SettlementGiveActivityCoin(engine *xorm.Engine, user model.User, ch *rabbit

var rewardValue float64 //TODO::奖励多少个活跃积分(根据ecpm, 新用户机制, 蛋蛋分机制)
redisConn := cache.GetPool().Get()
sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn)
sysCfgDb := implement.NewSysCfgDb(engine, redisConn)
videoRewardUnitPrice := sysCfgDb.SysCfgGetWithDb(enum.VideoRewardUnitPrice)
if videoRewardUnitPrice != "" { //处理ecpm
var coin model.VirtualCoin
@@ -107,7 +106,7 @@ func SettlementGiveActivityCoin(engine *xorm.Engine, user model.User, ch *rabbit
}
score = doc.ScoreValue
}
eggPointPartitionCoefficientManagementDb := implement.NewEggPointPartitionCoefficientManagementDb(db.Db)
eggPointPartitionCoefficientManagementDb := implement.NewEggPointPartitionCoefficientManagementDb(engine)
eggPointPartitionCoefficientManagements, err1 := eggPointPartitionCoefficientManagementDb.EggPointPartitionCoefficientManagementGetAll()
if err1 != nil {
return err1


Načítá se…
Zrušit
Uložit