From 5a7ca9535f6b4854f1be49ed3deae491c4006086 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 6 Sep 2024 08:49:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_index.go | 2 +- docs/docs.go | 77 +++++++++++++++++++++++++++++++++++++++++++- docs/swagger.json | 77 +++++++++++++++++++++++++++++++++++++++++++- docs/swagger.yaml | 54 ++++++++++++++++++++++++++++++- 4 files changed, 206 insertions(+), 4 deletions(-) diff --git a/app/svc/svc_index.go b/app/svc/svc_index.go index a542a1d..a642c33 100644 --- a/app/svc/svc_index.go +++ b/app/svc/svc_index.go @@ -86,7 +86,7 @@ func IndexAppList(c *gin.Context, req md.IndexAppListReq) md.IndexAppListRes { } dataList := []md.IndexAppListDataList{ {Name: "广告预估收益", Type: "media_revenue", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "media_revenue"), Value: utils.Float64ToStr(utils.StrToFloat64(v["media_revenue"]) / 100)}, - {Name: "ECPM", Type: "ecpm", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "ecpm"), Value: v["ecpm"]}, + {Name: "ECPM", Type: "ecpm", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "ecpm"), Value: utils.Float64ToStr(utils.StrToFloat64(v["ecpm"]) / float64(day))}, {Name: "曝光量", Type: "exposure_count", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "exposure_count"), Value: v["exposure_count"]}, {Name: "点击量", Type: "click_count", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "click_count"), Value: v["click_count"]}, {Name: "点击率", Type: "click_rate", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "click_rate"), Value: utils.GetPrec(v["click_rate"], "2") + "%"}, diff --git a/docs/docs.go b/docs/docs.go index 4077afb..1a845e0 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -4601,7 +4601,7 @@ const docTemplate = `{ "200": { "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.SettleCenterDataDetailRes" } }, "400": { @@ -8070,6 +8070,43 @@ const docTemplate = `{ } } }, + "md.SettleCenterDataDetailData": { + "type": "object", + "properties": { + "all_income": { + "type": "string", + "example": "总计" + }, + "basic_income": { + "type": "string", + "example": "基础收益" + }, + "business_kind": { + "type": "string", + "example": "业务类型(1:广告合作)" + }, + "other_income": { + "type": "string", + "example": "其他收益" + }, + "pay_state": { + "type": "string", + "example": "结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)" + }, + "settle_type": { + "type": "string", + "example": "结算单类型(1:日结 2:周结 3:月结 4:预付)" + }, + "state": { + "type": "string", + "example": "结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)" + }, + "time_str": { + "type": "string", + "example": "业务时间" + } + } + }, "md.SettleCenterDataDetailReq": { "type": "object", "properties": { @@ -8091,6 +8128,44 @@ const docTemplate = `{ } } }, + "md.SettleCenterDataDetailRes": { + "type": "object", + "properties": { + "business_kind": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SettleCenterDataDetailData" + } + }, + "settle_pay_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "settle_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "settle_type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, "md.SettleCenterDataReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index aca59c2..bf69d46 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4593,7 +4593,7 @@ "200": { "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.SettleCenterDataDetailRes" } }, "400": { @@ -8062,6 +8062,43 @@ } } }, + "md.SettleCenterDataDetailData": { + "type": "object", + "properties": { + "all_income": { + "type": "string", + "example": "总计" + }, + "basic_income": { + "type": "string", + "example": "基础收益" + }, + "business_kind": { + "type": "string", + "example": "业务类型(1:广告合作)" + }, + "other_income": { + "type": "string", + "example": "其他收益" + }, + "pay_state": { + "type": "string", + "example": "结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)" + }, + "settle_type": { + "type": "string", + "example": "结算单类型(1:日结 2:周结 3:月结 4:预付)" + }, + "state": { + "type": "string", + "example": "结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)" + }, + "time_str": { + "type": "string", + "example": "业务时间" + } + } + }, "md.SettleCenterDataDetailReq": { "type": "object", "properties": { @@ -8083,6 +8120,44 @@ } } }, + "md.SettleCenterDataDetailRes": { + "type": "object", + "properties": { + "business_kind": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SettleCenterDataDetailData" + } + }, + "settle_pay_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "settle_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "settle_type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, "md.SettleCenterDataReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index dc77f09..cf8c5c6 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -2284,6 +2284,33 @@ definitions: update_at: type: string type: object + md.SettleCenterDataDetailData: + properties: + all_income: + example: 总计 + type: string + basic_income: + example: 基础收益 + type: string + business_kind: + example: 业务类型(1:广告合作) + type: string + other_income: + example: 其他收益 + type: string + pay_state: + example: 结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款) + type: string + settle_type: + example: 结算单类型(1:日结 2:周结 3:月结 4:预付) + type: string + state: + example: 结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订) + type: string + time_str: + example: 业务时间 + type: string + type: object md.SettleCenterDataDetailReq: properties: end_time: @@ -2298,6 +2325,31 @@ definitions: example: "2024-08-29" type: string type: object + md.SettleCenterDataDetailRes: + properties: + business_kind: + items: + $ref: '#/definitions/md.SelectData' + type: array + list: + items: + $ref: '#/definitions/md.SettleCenterDataDetailData' + type: array + settle_pay_state: + items: + $ref: '#/definitions/md.SelectData' + type: array + settle_state: + items: + $ref: '#/definitions/md.SelectData' + type: array + settle_type: + items: + $ref: '#/definitions/md.SelectData' + type: array + total: + type: integer + type: object md.SettleCenterDataReq: properties: account: @@ -5479,7 +5531,7 @@ paths: "200": description: 具体看返回内容 这是data里面的数据 schema: - type: string + $ref: '#/definitions/md.SettleCenterDataDetailRes' "400": description: 具体错误 schema: