From 4608d8c5c8f8e645207e2f00e400a5b4c116372a Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 2 Sep 2024 17:40:50 +0800 Subject: [PATCH] update --- rule/honey_dividend/contribution.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/honey_dividend/contribution.go b/rule/honey_dividend/contribution.go index 08d2c82..bc7b00b 100644 --- a/rule/honey_dividend/contribution.go +++ b/rule/honey_dividend/contribution.go @@ -41,13 +41,13 @@ func CollectContributionExchangeData(eg *xorm.Engine, masterId string, ch *rabbi nowHoneys := zhios_order_relate_utils.IntToStr(base.ContributionExchangeLowerLimit) //当前贡献值总量 //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 > 0", base.CoinIdForContribution) results2, _ := db.QueryNativeString(eg, sql2) nowUsers := results2[0]["total"] //当前用户总量 //3、计算数据 honeyContributionExchangeRecords := new(models.HoneyContributionExchangeRecords) - has, err := eg.Where("state =?", 0).Desc("id").Get(&honeyContributionExchangeRecords) + has, err := eg.Where("state =?", 0).Desc("id").Get(honeyContributionExchangeRecords) if err != nil { return }