diff --git a/app/hdl/institutional_management/egg_energy/hdl_available_energy.go b/app/hdl/institutional_management/egg_energy/hdl_available_energy.go index 72b7ad5..99ebf86 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_available_energy.go +++ b/app/hdl/institutional_management/egg_energy/hdl_available_energy.go @@ -72,40 +72,40 @@ func DynamicDataFlowList(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return } - //list := make([]md.EggEnergyAvailableEnergyFlow, len(flows)) - //for i, flow := range flows { - // list[i] = md.EggEnergyAvailableEnergyFlow{ - // Id: flow.Id, - // Kind: flow.Kind, - // Title: flow.Title, - // BeforePrice: flow.BeforePrice, - // AfterPrice: flow.AfterPrice, - // Amount: flow.Amount, - // BeforeNowEnergyTotalNums: flow.BeforeNowEnergyTotalNums, - // AfterNowEnergyTotalNums: flow.AfterNowEnergyTotalNums, - // AfterPlanetTotalValue: flow.AfterPlanetTotalValue, - // BeforePlanetTotalValue: flow.BeforePlanetTotalValue, - // BeforeMarketplaceMerchantValues: flow.BeforeMarketplaceMerchantValues, - // AfterMarketplaceMerchantValues: flow.AfterMarketplaceMerchantValues, - // BeforeMarketplaceMerchantFundValues: flow.BeforeMarketplaceMerchantFundValues, - // AfterMarketplaceMerchantFundValues: flow.AfterMarketplaceMerchantFundValues, - // BeforeDevelopmentCommitteeValues: flow.BeforeDevelopmentCommitteeValues, - // AfterDevelopmentCommitteeValues: flow.AfterDevelopmentCommitteeValues, - // BeforePublicWelfareAndCharityValues: flow.BeforePublicWelfareAndCharityValues, - // AfterPublicWelfareAndCharityValues: flow.AfterPublicWelfareAndCharityValues, - // BeforeStarLevelDividendsValues: flow.BeforeStarLevelDividendsValues, - // AfterStarLevelDividendsValues: flow.AfterStarLevelDividendsValues, - // BeforeDestructionQuantityValues: flow.BeforeDestructionQuantityValues, - // AfterDestructionQuantityValues: flow.AfterDestructionQuantityValues, - // BeforeCommunityDividends: flow.BeforeCommunityDividends, - // AfterCommunityDividends: flow.AfterCommunityDividends, - // CreateTime: flow.CreateTime, - // } - //} + list := make([]md.EggEnergyAvailableEnergyFlow, len(flows)) + for i, flow := range flows { + list[i] = md.EggEnergyAvailableEnergyFlow{ + Id: flow.Id, + Kind: flow.Kind, + Title: flow.Title, + BeforePrice: flow.BeforePrice, + AfterPrice: flow.AfterPrice, + Amount: flow.Amount, + BeforeNowEnergyTotalNums: flow.BeforeNowEnergyTotalNums, + AfterNowEnergyTotalNums: flow.AfterNowEnergyTotalNums, + AfterPlanetTotalValue: flow.AfterPlanetTotalValue, + BeforePlanetTotalValue: flow.BeforePlanetTotalValue, + BeforeMarketplaceMerchantValues: flow.BeforeMarketplaceMerchantValues, + AfterMarketplaceMerchantValues: flow.AfterMarketplaceMerchantValues, + BeforeMarketplaceMerchantFundValues: flow.BeforeMarketplaceMerchantFundValues, + AfterMarketplaceMerchantFundValues: flow.AfterMarketplaceMerchantFundValues, + BeforeDevelopmentCommitteeValues: flow.BeforeDevelopmentCommitteeValues, + AfterDevelopmentCommitteeValues: flow.AfterDevelopmentCommitteeValues, + BeforePublicWelfareAndCharityValues: flow.BeforePublicWelfareAndCharityValues, + AfterPublicWelfareAndCharityValues: flow.AfterPublicWelfareAndCharityValues, + BeforeStarLevelDividendsValues: flow.BeforeStarLevelDividendsValues, + AfterStarLevelDividendsValues: flow.AfterStarLevelDividendsValues, + BeforeDestructionQuantityValues: flow.BeforeDestructionQuantityValues, + AfterDestructionQuantityValues: flow.AfterDestructionQuantityValues, + BeforeCommunityDividends: flow.BeforeCommunityDividends, + AfterCommunityDividends: flow.AfterCommunityDividends, + CreateTime: flow.CreateTime, + } + } resp := md.DynamicDataFlowListResp{ KindList: kindList, - List: flows, + List: list, Paginate: md.Paginate{ Limit: req.PageSize, Page: req.Page, diff --git a/app/md/institutional_management/egg_energy/md_available_energy.go b/app/md/institutional_management/egg_energy/md_available_energy.go index 879aae2..9113e61 100644 --- a/app/md/institutional_management/egg_energy/md_available_energy.go +++ b/app/md/institutional_management/egg_energy/md_available_energy.go @@ -1,7 +1,5 @@ package md -import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" - type DynamicDataFlowListReq struct { Kind int `json:"kind"` // 持有类型 Page int `json:"page,required"` // 页数 @@ -39,7 +37,7 @@ type EggEnergyAvailableEnergyFlow struct { } type DynamicDataFlowListResp struct { - KindList []map[string]interface{} `json:"kind_list"` - List []*model.EggEnergyAvailableEnergyFlow `json:"list"` - Paginate Paginate `json:"paginate"` + KindList []map[string]interface{} `json:"kind_list"` + List []EggEnergyAvailableEnergyFlow `json:"list"` + Paginate Paginate `json:"paginate"` } diff --git a/docs/docs.go b/docs/docs.go index bf5a807..ee7b739 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1123,7 +1123,7 @@ const docTemplate = `{ "list": { "type": "array", "items": { - "$ref": "#/definitions/model.EggEnergyAvailableEnergyFlow" + "$ref": "#/definitions/md.EggEnergyAvailableEnergyFlow" } }, "paginate": { @@ -1131,6 +1131,86 @@ const docTemplate = `{ } } }, + "md.EggEnergyAvailableEnergyFlow": { + "type": "object", + "properties": { + "after_community_dividends": { + "type": "string" + }, + "after_destruction_quantity_values": { + "type": "string" + }, + "after_development_committee_values": { + "type": "string" + }, + "after_marketplace_merchant_fund_values": { + "type": "string" + }, + "after_marketplace_merchant_values": { + "type": "string" + }, + "after_now_energy_total_nums": { + "type": "string" + }, + "after_planet_total_value": { + "type": "string" + }, + "after_price": { + "type": "string" + }, + "after_public_welfare_and_charity_values": { + "type": "string" + }, + "after_star_level_dividends_values": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "before_community_dividends": { + "type": "string" + }, + "before_destruction_quantity_values": { + "type": "string" + }, + "before_development_committee_values": { + "type": "string" + }, + "before_marketplace_merchant_fund_values": { + "type": "string" + }, + "before_marketplace_merchant_values": { + "type": "string" + }, + "before_now_energy_total_nums": { + "type": "string" + }, + "before_planet_total_value": { + "type": "string" + }, + "before_price": { + "type": "string" + }, + "before_public_welfare_and_charity_values": { + "type": "string" + }, + "before_star_level_dividends_values": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "kind": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, "md.EggEnergyCommunityDividends": { "type": "object", "properties": { @@ -1931,86 +2011,6 @@ const docTemplate = `{ "example": "货币类型名称" } } - }, - "model.EggEnergyAvailableEnergyFlow": { - "type": "object", - "properties": { - "after_community_dividends": { - "type": "string" - }, - "after_destruction_quantity_values": { - "type": "string" - }, - "after_development_committee_values": { - "type": "string" - }, - "after_marketplace_merchant_fund_values": { - "type": "string" - }, - "after_marketplace_merchant_values": { - "type": "string" - }, - "after_now_energy_total_nums": { - "type": "string" - }, - "after_planet_total_value": { - "type": "string" - }, - "after_price": { - "type": "string" - }, - "after_public_welfare_and_charity_values": { - "type": "string" - }, - "after_star_level_dividends_values": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "before_community_dividends": { - "type": "string" - }, - "before_destruction_quantity_values": { - "type": "string" - }, - "before_development_committee_values": { - "type": "string" - }, - "before_marketplace_merchant_fund_values": { - "type": "string" - }, - "before_marketplace_merchant_values": { - "type": "string" - }, - "before_now_energy_total_nums": { - "type": "string" - }, - "before_planet_total_value": { - "type": "string" - }, - "before_price": { - "type": "string" - }, - "before_public_welfare_and_charity_values": { - "type": "string" - }, - "before_star_level_dividends_values": { - "type": "string" - }, - "create_time": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "kind": { - "type": "integer" - }, - "title": { - "type": "string" - } - } } }, "securityDefinitions": { diff --git a/docs/swagger.json b/docs/swagger.json index cc2ee33..184e591 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1116,7 +1116,7 @@ "list": { "type": "array", "items": { - "$ref": "#/definitions/model.EggEnergyAvailableEnergyFlow" + "$ref": "#/definitions/md.EggEnergyAvailableEnergyFlow" } }, "paginate": { @@ -1124,6 +1124,86 @@ } } }, + "md.EggEnergyAvailableEnergyFlow": { + "type": "object", + "properties": { + "after_community_dividends": { + "type": "string" + }, + "after_destruction_quantity_values": { + "type": "string" + }, + "after_development_committee_values": { + "type": "string" + }, + "after_marketplace_merchant_fund_values": { + "type": "string" + }, + "after_marketplace_merchant_values": { + "type": "string" + }, + "after_now_energy_total_nums": { + "type": "string" + }, + "after_planet_total_value": { + "type": "string" + }, + "after_price": { + "type": "string" + }, + "after_public_welfare_and_charity_values": { + "type": "string" + }, + "after_star_level_dividends_values": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "before_community_dividends": { + "type": "string" + }, + "before_destruction_quantity_values": { + "type": "string" + }, + "before_development_committee_values": { + "type": "string" + }, + "before_marketplace_merchant_fund_values": { + "type": "string" + }, + "before_marketplace_merchant_values": { + "type": "string" + }, + "before_now_energy_total_nums": { + "type": "string" + }, + "before_planet_total_value": { + "type": "string" + }, + "before_price": { + "type": "string" + }, + "before_public_welfare_and_charity_values": { + "type": "string" + }, + "before_star_level_dividends_values": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "kind": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + }, "md.EggEnergyCommunityDividends": { "type": "object", "properties": { @@ -1924,86 +2004,6 @@ "example": "货币类型名称" } } - }, - "model.EggEnergyAvailableEnergyFlow": { - "type": "object", - "properties": { - "after_community_dividends": { - "type": "string" - }, - "after_destruction_quantity_values": { - "type": "string" - }, - "after_development_committee_values": { - "type": "string" - }, - "after_marketplace_merchant_fund_values": { - "type": "string" - }, - "after_marketplace_merchant_values": { - "type": "string" - }, - "after_now_energy_total_nums": { - "type": "string" - }, - "after_planet_total_value": { - "type": "string" - }, - "after_price": { - "type": "string" - }, - "after_public_welfare_and_charity_values": { - "type": "string" - }, - "after_star_level_dividends_values": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "before_community_dividends": { - "type": "string" - }, - "before_destruction_quantity_values": { - "type": "string" - }, - "before_development_committee_values": { - "type": "string" - }, - "before_marketplace_merchant_fund_values": { - "type": "string" - }, - "before_marketplace_merchant_values": { - "type": "string" - }, - "before_now_energy_total_nums": { - "type": "string" - }, - "before_planet_total_value": { - "type": "string" - }, - "before_price": { - "type": "string" - }, - "before_public_welfare_and_charity_values": { - "type": "string" - }, - "before_star_level_dividends_values": { - "type": "string" - }, - "create_time": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "kind": { - "type": "integer" - }, - "title": { - "type": "string" - } - } } }, "securityDefinitions": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 344f803..7066352 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -128,11 +128,64 @@ definitions: type: array list: items: - $ref: '#/definitions/model.EggEnergyAvailableEnergyFlow' + $ref: '#/definitions/md.EggEnergyAvailableEnergyFlow' type: array paginate: $ref: '#/definitions/applet_app_md_institutional_management_egg_energy.Paginate' type: object + md.EggEnergyAvailableEnergyFlow: + properties: + after_community_dividends: + type: string + after_destruction_quantity_values: + type: string + after_development_committee_values: + type: string + after_marketplace_merchant_fund_values: + type: string + after_marketplace_merchant_values: + type: string + after_now_energy_total_nums: + type: string + after_planet_total_value: + type: string + after_price: + type: string + after_public_welfare_and_charity_values: + type: string + after_star_level_dividends_values: + type: string + amount: + type: string + before_community_dividends: + type: string + before_destruction_quantity_values: + type: string + before_development_committee_values: + type: string + before_marketplace_merchant_fund_values: + type: string + before_marketplace_merchant_values: + type: string + before_now_energy_total_nums: + type: string + before_planet_total_value: + type: string + before_price: + type: string + before_public_welfare_and_charity_values: + type: string + before_star_level_dividends_values: + type: string + create_time: + type: string + id: + type: integer + kind: + type: integer + title: + type: string + type: object md.EggEnergyCommunityDividends: properties: coin_id: @@ -684,59 +737,6 @@ definitions: example: 货币类型名称 type: string type: object - model.EggEnergyAvailableEnergyFlow: - properties: - after_community_dividends: - type: string - after_destruction_quantity_values: - type: string - after_development_committee_values: - type: string - after_marketplace_merchant_fund_values: - type: string - after_marketplace_merchant_values: - type: string - after_now_energy_total_nums: - type: string - after_planet_total_value: - type: string - after_price: - type: string - after_public_welfare_and_charity_values: - type: string - after_star_level_dividends_values: - type: string - amount: - type: string - before_community_dividends: - type: string - before_destruction_quantity_values: - type: string - before_development_committee_values: - type: string - before_marketplace_merchant_fund_values: - type: string - before_marketplace_merchant_values: - type: string - before_now_energy_total_nums: - type: string - before_planet_total_value: - type: string - before_price: - type: string - before_public_welfare_and_charity_values: - type: string - before_star_level_dividends_values: - type: string - create_time: - type: string - id: - type: integer - kind: - type: integer - title: - type: string - type: object host: localhost:4001 info: contact: