Browse Source

update

tags/v0.0.3
dengbiao 2 weeks ago
parent
commit
b77e324a8f
2 changed files with 17 additions and 2 deletions
  1. +16
    -2
      rule/egg_energy/deal_available_green_energy_points.go
  2. +1
    -0
      rule/egg_energy/enum/available_egg_energy_points_flow.go

+ 16
- 2
rule/egg_energy/deal_available_green_energy_points.go View File

@@ -13,7 +13,6 @@ import (
) )


func DealAvailableEggEnergyCoin(session *xorm.Session, kind int, eggEnergyCoreData *model.EggEnergyCoreData, req md2.DealAvailableEggEnergyCoinReq) error { func DealAvailableEggEnergyCoin(session *xorm.Session, kind int, eggEnergyCoreData *model.EggEnergyCoreData, req md2.DealAvailableEggEnergyCoinReq) error {

if eggEnergyCoreData == nil { //TODO::存在使用风险 if eggEnergyCoreData == nil { //TODO::存在使用风险
// 查找 `egg_energy_core_data` 基础设置 // 查找 `egg_energy_core_data` 基础设置
eggEnergyCoreDataModel, cb, err := svc.GetEggEnergyCoreData(session.Engine()) eggEnergyCoreDataModel, cb, err := svc.GetEggEnergyCoreData(session.Engine())
@@ -90,7 +89,6 @@ func DealAvailableEggEnergyCoin(session *xorm.Session, kind int, eggEnergyCoreDa
eggEnergyAvailableEnergyFlow.AfterDestructionQuantityValues = eggEnergyCoreData.DestructionQuantityNums eggEnergyAvailableEnergyFlow.AfterDestructionQuantityValues = eggEnergyCoreData.DestructionQuantityNums
break break
case int(enum.EggEnergyExchangeAccountBalance): //蛋蛋能量兑换余额 case int(enum.EggEnergyExchangeAccountBalance): //蛋蛋能量兑换余额
//查找`egg_energy_basic_setting` 基础设置
eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(session.Engine()) eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(session.Engine())
eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{ eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{
"key": "is_open", "key": "is_open",
@@ -246,6 +244,22 @@ func DealAvailableEggEnergyCoin(session *xorm.Session, kind int, eggEnergyCoreDa
eggEnergyAvailableEnergyFlow.BeforeMarketplaceMerchantFundValues = eggEnergyCoreData.MarketplaceMerchantFunds eggEnergyAvailableEnergyFlow.BeforeMarketplaceMerchantFundValues = eggEnergyCoreData.MarketplaceMerchantFunds
eggEnergyAvailableEnergyFlow.AfterMarketplaceMerchantFundValues = marketplaceMerchantFunds.Sub(amountValue).RoundFloor(8).String() eggEnergyAvailableEnergyFlow.AfterMarketplaceMerchantFundValues = marketplaceMerchantFunds.Sub(amountValue).RoundFloor(8).String()


eggEnergyAvailableEnergyFlow.BeforeDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee //发展委员会
eggEnergyAvailableEnergyFlow.AfterDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee
eggEnergyAvailableEnergyFlow.BeforePublicWelfareAndCharityValues = eggEnergyCoreData.PublicWelfareAndCharity //公益慈善
eggEnergyAvailableEnergyFlow.AfterPublicWelfareAndCharityValues = eggEnergyCoreData.PublicWelfareAndCharity
eggEnergyAvailableEnergyFlow.BeforeStarLevelDividendsValues = eggEnergyCoreData.StarLevelDividends //星级分红
eggEnergyAvailableEnergyFlow.AfterStarLevelDividendsValues = eggEnergyCoreData.StarLevelDividends
eggEnergyAvailableEnergyFlow.BeforeCommunityDividends = eggEnergyCoreData.CommunityDividends //社区分红
eggEnergyAvailableEnergyFlow.AfterCommunityDividends = eggEnergyCoreData.CommunityDividends
eggEnergyAvailableEnergyFlow.BeforeDestructionQuantityValues = eggEnergyCoreData.DestructionQuantityNums //销毁数量
eggEnergyAvailableEnergyFlow.AfterDestructionQuantityValues = eggEnergyCoreData.DestructionQuantityNums
break
case int(enum.CapitalInjection): //资金汇入
eggEnergyAvailableEnergyFlow.BeforeMarketplaceMerchantValues = eggEnergyCoreData.MarketplaceMerchantNums //市商数量
eggEnergyAvailableEnergyFlow.AfterMarketplaceMerchantValues = eggEnergyCoreData.MarketplaceMerchantNums
eggEnergyAvailableEnergyFlow.BeforeMarketplaceMerchantFundValues = eggEnergyCoreData.MarketplaceMerchantFunds //市商资金
eggEnergyAvailableEnergyFlow.AfterMarketplaceMerchantFundValues = eggEnergyCoreData.MarketplaceMerchantFunds
eggEnergyAvailableEnergyFlow.BeforeDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee //发展委员会 eggEnergyAvailableEnergyFlow.BeforeDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee //发展委员会
eggEnergyAvailableEnergyFlow.AfterDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee eggEnergyAvailableEnergyFlow.AfterDevelopmentCommitteeValues = eggEnergyCoreData.DevelopmentCommittee
eggEnergyAvailableEnergyFlow.BeforePublicWelfareAndCharityValues = eggEnergyCoreData.PublicWelfareAndCharity //公益慈善 eggEnergyAvailableEnergyFlow.BeforePublicWelfareAndCharityValues = eggEnergyCoreData.PublicWelfareAndCharity //公益慈善


+ 1
- 0
rule/egg_energy/enum/available_egg_energy_points_flow.go View File

@@ -13,6 +13,7 @@ const (
PlatformProfitability PlatformProfitability
MarketplaceMerchantNumsAutoExchangeMarketplaceMerchantFunds MarketplaceMerchantNumsAutoExchangeMarketplaceMerchantFunds
MarketplaceMerchantFundsAutoExchangeMarketplaceMerchantNums MarketplaceMerchantFundsAutoExchangeMarketplaceMerchantNums
CapitalInjection
) )


func (kind EggEnergyAvailableEnergyFlowKind) String() string { func (kind EggEnergyAvailableEnergyFlowKind) String() string {


Loading…
Cancel
Save