Bläddra i källkod

update

master
dengbiao 3 månader sedan
förälder
incheckning
622bfd0f64
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. +4
    -3
      rule/honey_dividend/contribution.go

+ 4
- 3
rule/honey_dividend/contribution.go Visa fil

@@ -35,9 +35,10 @@ func CollectContributionExchangeData(eg *xorm.Engine, masterId string, ch *rabbi
} }


//1、统计当前`现有贡献值数量` //1、统计当前`现有贡献值数量`
var sql1 = fmt.Sprintf("SELECT SUM(amount) AS total FROM `user_virtual_amount` WHERE coin_id = %d", base.CoinIdForContribution)
results1, _ := db.QueryNativeString(eg, sql1)
nowHoneys := results1[0]["total"] //当前贡献值总量
//var sql1 = fmt.Sprintf("SELECT SUM(amount) AS total FROM `user_virtual_amount` WHERE coin_id = %d", base.CoinIdForContribution)
//results1, _ := db.QueryNativeString(eg, sql1)
//nowHoneys := results1[0]["total"] //当前贡献值总量
nowHoneys := zhios_order_relate_utils.IntToStr(base.ContributionExchangeLowerLimit) //当前贡献值总量


//2、统计当前`可以兑换`的用户数量 //2、统计当前`可以兑换`的用户数量
var sql2 = fmt.Sprintf("SELECT COUNT(*)AS total FROM `user_virtual_amount` WHERE coin_id = %d and amount >= %d", base.CoinIdForContribution, base.ContributionExchangeLowerLimit) var sql2 = fmt.Sprintf("SELECT COUNT(*)AS total FROM `user_virtual_amount` WHERE coin_id = %d and amount >= %d", base.CoinIdForContribution, base.ContributionExchangeLowerLimit)


Laddar…
Avbryt
Spara