|
@@ -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 //公益慈善 |
|
|