diff --git a/db/model/one_circles_available_green_energy_points_flow.go b/db/model/one_circles_available_green_energy_points_flow.go index 7abf533..c78ee00 100644 --- a/db/model/one_circles_available_green_energy_points_flow.go +++ b/db/model/one_circles_available_green_energy_points_flow.go @@ -11,6 +11,8 @@ type OneCirclesAvailableGreenEnergyPointsFlow struct { Kind int `json:"kind" xorm:"not null default 1 comment('种类(1:个人活跃积分兑换 2:结算绿色能量释放 3:签到奖励 4:账户余额兑换 5:绿色能量兑换余额)') TINYINT(1)"` Title string `json:"title" xorm:"not null default '' comment('标题') VARCHAR(255)"` Amount string `json:"amount" xorm:"not null comment('变更数量') DECIMAL(28,10)"` + BeforePrice string `json:"before_price" xorm:"not null default 0.0000000000 comment('变更前-价格') DECIMAL(28,10)"` + AfterPrice string `json:"after_price" xorm:"not null default 0.0000000000 comment('变更后-价格') DECIMAL(28,10)"` BeforeEcologicalApplicationValues string `json:"before_ecological_application_values" xorm:"not null default 0.0000000000 comment('变更前-生态应用区块币数量') DECIMAL(28,10)"` AfterEcologicalApplicationValues string `json:"after_ecological_application_values" xorm:"not null default 0.0000000000 comment('变更后-生态应用区块币数量') DECIMAL(28,10)"` BeforeTechnicalTeamValues string `json:"before_technical_team_values" xorm:"not null default 0.0000000000 comment('变更前-技术团队区块币数量') DECIMAL(28,10)"` diff --git a/rule/one_circles/one_circles_deal_available_green_energy_points.go b/rule/one_circles/one_circles_deal_available_green_energy_points.go index 463238f..4321c88 100644 --- a/rule/one_circles/one_circles_deal_available_green_energy_points.go +++ b/rule/one_circles/one_circles_deal_available_green_energy_points.go @@ -444,6 +444,10 @@ func DealAvailableGreenEnergyCoin(session *xorm.Session, kind int, amount, amoun chain.OriginalFunds = oneCirclesAvailableGreenEnergyPointsFlow.AfterOriginalQuantityFundValues //原始资金 chain.MarketplaceMerchantFunds = oneCirclesAvailableGreenEnergyPointsFlow.AfterMarketplaceMerchantFundValues //市商资金 + + oneCirclesAvailableGreenEnergyPointsFlow.BeforePrice = chain.NowPrice //价格 + oneCirclesAvailableGreenEnergyPointsFlow.AfterPrice = nowPriceValue + //更新 `one_circles_green_energy_basic_setting` 表 if chain.NowPrice != nowPriceValue { chain.NowPrice = nowPriceValue