소스 검색

更新

master
huangjiajun 3 달 전
부모
커밋
77cd85a065
20개의 변경된 파일3595개의 추가작업 그리고 121개의 파일을 삭제
  1. +9
    -0
      app/enum/adunit_enum.go
  2. +98
    -0
      app/hdl/hdl_data_center.go
  3. +59
    -0
      app/hdl/hdl_invoice_center.go
  4. +15
    -0
      app/hdl/hdl_login.go
  5. +105
    -0
      app/hdl/hdl_settle_center.go
  6. +11
    -0
      app/md/comm.go
  7. +1
    -0
      app/md/md__applet_application_ad_space_list.go
  8. +45
    -0
      app/md/md_data_center.go
  9. +32
    -0
      app/md/md_invoice_center.go
  10. +104
    -0
      app/md/md_settle_center.go
  11. +22
    -2
      app/router/router.go
  12. +2
    -7
      app/svc/svc_applet_application_ad_space.go
  13. +205
    -0
      app/svc/svc_data_center.go
  14. +55
    -0
      app/svc/svc_invoice_center.go
  15. +147
    -0
      app/svc/svc_settle_center.go
  16. +11
    -16
      app/utils/rand.go
  17. +1011
    -47
      docs/docs.go
  18. +1011
    -47
      docs/swagger.json
  19. +650
    -0
      docs/swagger.yaml
  20. +2
    -2
      go.mod

+ 9
- 0
app/enum/adunit_enum.go 파일 보기

@@ -1,6 +1,15 @@
package enum

import "applet/app/md"

type AdunitType string //广告单元类型
var AdTypeList = []md.SelectData{
{Name: "banner", Value: AdunitTypeForBanner},
{Name: "激励视频", Value: AdunitTypeForRewardVideo},
{Name: "插屏广告", Value: AdunitTypeForInterstitial},
{Name: "视频广告", Value: AdunitTypeForVideoFeeds},
//{Name: "视频贴片广告", Value: "5"},
}

const (
AdunitTypeForBanner = "SLOT_ID_WEAPP_BANNER"


+ 98
- 0
app/hdl/hdl_data_center.go 파일 보기

@@ -0,0 +1,98 @@
package hdl

import (
"applet/app/e"
"applet/app/lib/validate"
"applet/app/md"
"applet/app/svc"
"github.com/gin-gonic/gin"
)

// DataCenterTable
// @Summary 数据图表
// @Tags 数据中心------嘉俊
// @Description 数据中心-数据图表
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.DataCenterTableReq true "请求参数"
// @Success 200 {object} md.DataCenterTableRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/dataCenter/table [POST]
func DataCenterTable(c *gin.Context) {
var req md.DataCenterTableReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.DataCenterTable(c, req)
e.OutSuc(c, res, nil)
return
}

// DataCenterRecordTotal
// @Summary 数据明细合计
// @Tags 数据中心------嘉俊
// @Description 数据中心-数据明细合计
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.DataCenterTableReq true "请求参数"
// @Success 200 {object} md.DataCenterTotalData "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/dataCenter/record/total [POST]
func DataCenterRecordTotal(c *gin.Context) {
var req md.DataCenterTableReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.DataCenterRecordTotal(c, req)
e.OutSuc(c, res, nil)
return
}

// DataCenterRecordList
// @Summary 数据明细
// @Tags 数据中心------嘉俊
// @Description 数据中心-数据明细
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.DataCenterRecordReq true "请求参数"
// @Success 200 {object} md.DataCenterRecordRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/dataCenter/record/list [POST]
func DataCenterRecordList(c *gin.Context) {
var req md.DataCenterRecordReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.DataCenterRecordList(c, req)
e.OutSuc(c, res, nil)
return
}

// DataCenterSelectData
// @Summary 筛选条件
// @Tags 数据中心------嘉俊
// @Description 数据中心-筛选条件
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Success 200 {string} "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/dataCenter/select/data [GET]
func DataCenterSelectData(c *gin.Context) {
svc.DataCenterSelectData(c)
}

+ 59
- 0
app/hdl/hdl_invoice_center.go 파일 보기

@@ -0,0 +1,59 @@
package hdl

import (
"applet/app/e"
"applet/app/lib/validate"
"applet/app/md"
"applet/app/svc"
"github.com/gin-gonic/gin"
)

// InvoiceCenterList
// @Summary 发票列表
// @Tags 发票中心------嘉俊
// @Description 发票中心-发票列表
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.InvoiceCenterDataReq true "请求参数"
// @Success 200 {object} md.InvoiceCenterDataRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/invoiceCenter/list [POST]
func InvoiceCenterList(c *gin.Context) {
var req md.InvoiceCenterDataReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.InvoiceCenterList(c, req)
e.OutSuc(c, res, nil)
return
}

// InvoiceCenterDetail
// @Summary 发票详情
// @Tags 发票中心------嘉俊
// @Description 发票中心-发票详情
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.CommDetailReq true "请求参数"
// @Success 200 {object} md.InvoiceCenterDataDetailRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/invoiceCenter/detail [POST]
func InvoiceCenterDetail(c *gin.Context) {
var req md.CommDetailReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.InvoiceCenterDetail(c, req)
e.OutSuc(c, res, nil)
return
}

+ 15
- 0
app/hdl/hdl_login.go 파일 보기

@@ -200,6 +200,21 @@ func Register(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, "新增 medium 记录失败")
return
}
//4、新增 MediumDivisionStrategy 记录
MediumDivisionStrategyModel := model.MediumDivisionStrategy{
MediumId: utils.StrToInt(mediumId),
Uuid: utils.StrToInt(c.GetString("mid")),
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
}
insertAffected, err = db.Db.Insert(&MediumDivisionStrategyModel)
if err != nil {
return
}
if insertAffected <= 0 {
e.OutErr(c, e.ERR_DB_ORM, "新增 记录失败")
return
}
ip := utils.GetIP(c.Request)
key := fmt.Sprintf(md.JwtTokenKey, ip, utils.AnyToString(mediumModel.Id))
token, err := svc.HandleLoginToken(key, &mediumModel)


+ 105
- 0
app/hdl/hdl_settle_center.go 파일 보기

@@ -0,0 +1,105 @@
package hdl

import (
"applet/app/e"
"applet/app/lib/validate"
"applet/app/md"
"applet/app/svc"
"github.com/gin-gonic/gin"
)

// SettleCenterList
// @Summary 结算报表
// @Tags 结算中心------嘉俊
// @Description 结算中心-结算报表
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.SettleCenterDataReq true "请求参数"
// @Success 200 {object} md.SettleCenterDataRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settleCenter/list [POST]
func SettleCenterList(c *gin.Context) {
var req md.SettleCenterDataReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.SettleCenterList(c, req)
e.OutSuc(c, res, nil)
return
}

// SettleCenterDetail
// @Summary 结算报表-详情
// @Tags 结算中心------嘉俊
// @Description 结算中心-结算报表-详情
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.CommDetailReq true "请求参数"
// @Success 200 {object} md.SettleCenterDataDetailRes "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settleCenter/detail [POST]
func SettleCenterDetail(c *gin.Context) {
var req md.CommDetailReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
res := svc.SettleCenterDetail(c, req)
e.OutSuc(c, res, nil)
return
}

// SettleCenterSettleFileSave
// @Summary 媒体详情-结算单保存
// @Tags 财务中心------嘉俊
// @Description 财务中心-媒体详情-结算单保存
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.SettleFileReq true "请求参数"
// @Success 200 {string} "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settleCenter/settle/file/save [POST]
func SettleCenterSettleFileSave(c *gin.Context) {
var req md.SettleFileReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
svc.SettleCenterSettleFileSave(c, req)
}

// SettleCenterInvoiceSave
// @Summary 媒体详情-发票上传
// @Tags 财务中心------嘉俊
// @Description 财务中心-媒体详情-发票上传
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.InvoiceReq true "请求参数"
// @Success 200 {string} "具体看返回内容 这是data里面的数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settleCenter/invoice/save [POST]
func SettleCenterInvoiceSave(c *gin.Context) {
var req md.InvoiceReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
svc.SettleCenterInvoiceSave(c, req)
}

+ 11
- 0
app/md/comm.go 파일 보기

@@ -1,6 +1,17 @@
package md

var AppletPlatform = []SelectData{
{Name: "微信小程序", Value: "wx_applet"},
}

var AppletPlatformMap = map[string]string{
"wx_applet": "微信小程序",
}

type SelectData struct {
Name string `json:"name" example:"名称"`
Value string `json:"value" example:"值"`
}
type CommDetailReq struct {
Id string `json:"id" example:"列表id"`
}

+ 1
- 0
app/md/md__applet_application_ad_space_list.go 파일 보기

@@ -28,6 +28,7 @@ type AppletApplicationAdSpaceListData struct {
AdId string `json:"ad_id" example:"广告位id"`
State string `json:"state" example:"应用状态 state=2 才能再次编辑"`
CooperateState string `json:"cooperate_state" example:"合作状态"`
AppName string `json:"app_name"`
}
type AppletApplicationAdSpaceSaveReq struct {
Name string `json:"name" example:"应用名称"`


+ 45
- 0
app/md/md_data_center.go 파일 보기

@@ -0,0 +1,45 @@
package md

type DataCenterTableReq struct {
StartDate string `json:"start_date" example:"2024-08-30"`
EndDate string `json:"end_date" example:"2024-08-30"`
Platform string `json:"platform" example:"平台"`
AppId string `json:"app_id" example:"应用"`
AdType string `json:"ad_type" example:"广告位类型"`
}

type DataCenterRecordReq struct {
StartDate string `json:"start_date" example:"2024-08-30"`
EndDate string `json:"end_date" example:"2024-08-30"`
Platform string `json:"platform" example:"平台"`
AppId string `json:"app_id" example:"应用"`
AdType string `json:"ad_type" example:"广告位类型"`
Limit string `json:"limit"`
Page string `json:"page" `
}
type DataCenterTableRes struct {
List []DataCenterTableData `json:"list" `
}

type DataCenterTableData struct {
Date string `json:"date" example:"日期"`
ExposureCount string `json:"exposure_count" example:"曝光量"`
MediaRevenue string `json:"media_revenue" example:"预估收益"`
Ecpm string `json:"ecpm" example:"ecpm"`
}
type DataCenterRecordRes struct {
List []DataCenterTotalData `json:"list" `
Total int64 `json:"total" `
}

type DataCenterTotalData struct {
Date string `json:"date" example:"日期"`
AppName string `json:"app_name"`
PlatformName string `json:"platform_name"`
AdvName string `json:"adv_name"`
ExposureCount string `json:"exposure_count" example:"曝光量"`
MediaRevenue string `json:"media_revenue" example:"预估收益"`
Ecpm string `json:"ecpm" example:"ecpm"`
ClickRate string `json:"click_rate" example:"点击率"`
ClickCount string `json:"click_count" example:"点击量"`
}

+ 32
- 0
app/md/md_invoice_center.go 파일 보기

@@ -0,0 +1,32 @@
package md

type InvoiceCenterDataReq struct {
Limit string `json:"limit"`
Page string `json:"page" `
Type string `json:"type" example:"0电子发票 1纸质发票"`
}

type InvoiceCenterDataRes struct {
List []InvoiceCenterDataData `json:"list" `
Total int64 `json:"total"`
State []SelectData `json:"state"`
}

type InvoiceCenterDataData struct {
Id string `json:"id"`
TimeStr string `json:"time_str" example:"上传时间"`
State string `json:"state" example:"结算单状态(0:待审核 1:审核通过 2:审核拒绝)"`
Count string `json:"count" example:"数量"`
Month string `json:"month" example:"订单月份"`
Amount string `json:"amount" example:"结算金额"`
}
type InvoiceCenterDataDetailRes struct {
Data InvoiceCenterDataDetailData `json:"data" `
State []SelectData `json:"state"`
}
type InvoiceCenterDataDetailData struct {
TimeStr string `json:"time_str" example:"上传时间"`
State string `json:"state" example:"结算单状态(0:待审核 1:审核通过 2:审核拒绝)"`
Count string `json:"count" example:"数量"`
File []InvoiceFile `json:"file"`
}

+ 104
- 0
app/md/md_settle_center.go 파일 보기

@@ -0,0 +1,104 @@
package md

var AccountSettleState = []SelectData{
{Name: "日结", Value: "1"},
{Name: "周结", Value: "2"},
{Name: "月结", Value: "3"},
{Name: "预付", Value: "4"},
}
var BusinessKind = []SelectData{
{Name: "广告合作", Value: "1"},
}
var InvoiceCate = []SelectData{
{Name: "电子发票", Value: "0"},
{Name: "纸质发票", Value: "1"},
}
var SettlePayState = []SelectData{
{Name: "未开始", Value: "0"},
{Name: "待审核发票", Value: "1"},
{Name: "发票审核中", Value: "2"},
{Name: "发票审核拒绝", Value: "3"},
{Name: "付款中", Value: "4"},
{Name: "已付款", Value: "5"},
}
var SettleState = []SelectData{
{Name: "未开始", Value: "0"},
{Name: "核算中", Value: "1"},
{Name: "待签订", Value: "2"},
{Name: "完成签订", Value: "3"},
}
var InvoiceState = []SelectData{
{Name: "待审核", Value: "0"},
{Name: "审核通过", Value: "1"},
{Name: "审核拒绝", Value: "2"},
}

type SettleCenterDataReq struct {
Limit string `json:"limit"`
Page string `json:"page" `
StartTime string `json:"start_time" example:"2024-08-29"`
EndTime string `json:"end_time" `
}
type SettleCenterDataRes struct {
List []SettleCenterDataData `json:"list" `
Total int64 `json:"total"`
BusinessKind []SelectData `json:"business_kind"`
SettlePayState []SelectData `json:"settle_pay_state"`
SettleState []SelectData `json:"settle_state"`
SettleType []SelectData `json:"settle_type"`
}

type SettleCenterDataData struct {
Id string `json:"id"`
TimeStr string `json:"time_str" example:"业务时间"`
BusinessKind string `json:"business_kind" example:"业务类型(1:广告合作)"`
SettleType string `json:"settle_type" example:"结算单类型(1:日结 2:周结 3:月结 4:预付)"`
AllIncome string `json:"all_income" example:"合计收益"`
MediumIncome string `json:"medium_income" example:"媒体结算"`
OtherIncome string `json:"other_income" example:"其他调整"`
PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"`
State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"`
Label string `json:"label"`
SettleFile string `json:"settle_file" example:"结算单"`
}

type SettleCenterDataDetailRes struct {
Data SettleCenterDataDetail `json:"data" `
BusinessKind []SelectData `json:"business_kind"`
SettlePayState []SelectData `json:"settle_pay_state"`
InvoiceState []SelectData `json:"invoice_state"`
SettleState []SelectData `json:"settle_state"`
SettleType []SelectData `json:"settle_type"`
InvoiceCate []SelectData `json:"invoice_cate"`
}

type SettleCenterDataDetail struct {
TimeStr string `json:"time_str" example:"业务时间"`
BusinessKind string `json:"business_kind" example:"业务类型(1:广告合作)"`
SettleFile string `json:"settle_file" example:"结算单"`
Invoice Invoice `json:"invoice"`
AllIncome string `json:"all_income" example:"合计收益"`
MediumIncome string `json:"medium_income" example:"媒体结算"`
OtherIncome string `json:"other_income" example:"其他调整"`
PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"`
State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"`
}
type Invoice struct {
Type string `json:"type"`
Time string `json:"time"`
Count string `json:"count"`
File []InvoiceFile `json:"file"`
}
type InvoiceFile struct {
Url string `json:"url"`
State string `json:"state" example:"0待确认 1审核通过 2审核失败"`
}
type SettleFileReq struct {
Id string `json:"id" example:"列表id"`
File string `json:"file" example:"七牛云链接 带http"`
}
type InvoiceReq struct {
Id string `json:"id" example:"列表id"`
Type string `json:"type" example:"0电子发票 1纸质发票"`
File []InvoiceFile `json:"file"`
}

+ 22
- 2
app/router/router.go 파일 보기

@@ -67,8 +67,11 @@ func route(r *gin.RouterGroup) {
r.Use(mw.Auth) // 以下接口需要JWT验证
rRole(r.Group("/role")) //权限管理

rApplication(r.Group("/application")) //应用管理
rAccount(r.Group("/account")) //账号中心
rApplication(r.Group("/application")) //应用管理
rAccount(r.Group("/account")) //账号中心
rSettleCenter(r.Group("/settleCenter")) //结算中心
rInvoiceCenter(r.Group("/invoiceCenter")) //发票中心
rDataCenter(r.Group("/dataCenter")) //数据中心
}

func rRole(r *gin.RouterGroup) {
@@ -102,3 +105,20 @@ func rApplication(r *gin.RouterGroup) {
r.POST("/applet/ad/space/list", hdl.AppletApplicationAdSpaceList) //小程序应用-广告位列表数据
r.POST("/applet/ad/space/save", hdl.AppletApplicationAdSpaceSave) //小程序应用-广告位新增
}
func rSettleCenter(r *gin.RouterGroup) {
r.POST("/list", hdl.SettleCenterList) //结算中心-结算报表
r.POST("/detail", hdl.SettleCenterDetail) //结算中心-结算报表-详情
r.POST("/settle/file/save", hdl.SettleCenterSettleFileSave) //结算中心-结算报表-结算单上传
r.POST("/invoice/save", hdl.SettleCenterInvoiceSave) //结算中心-结算报表-发票上传
}
func rInvoiceCenter(r *gin.RouterGroup) {
r.POST("/list", hdl.InvoiceCenterList) //发票中心-列表
r.POST("/detail", hdl.InvoiceCenterDetail) //发票中心-详情
}

func rDataCenter(r *gin.RouterGroup) {
r.GET("/select/data", hdl.DataCenterSelectData) //数据中心-筛选条件
r.POST("/table", hdl.DataCenterTable) //数据中心-数据图表
r.POST("/record/total", hdl.DataCenterRecordTotal) //数据中心-数据明细合计
r.POST("/record/list", hdl.DataCenterRecordList) //数据中心-数据明细
}

+ 2
- 7
app/svc/svc_applet_application_ad_space.go 파일 보기

@@ -32,6 +32,7 @@ func AppletApplicationAdSpaceList(c *gin.Context) {
var tmp = md.AppletApplicationAdSpaceListData{
Id: utils.IntToStr(v.AppletApplicationAdSpaceList.Id),
Name: v.AppletApplicationAdSpaceList.Name,
AppName: v.AppletApplication.Name,
Platform: v.Platform,
Kind: v.Kind,
Memo: v.AppletApplicationAdSpaceList.Memo,
@@ -60,13 +61,7 @@ func AppletApplicationAdSpaceList(c *gin.Context) {
List: data,
Total: total,
Application: application,
AdType: []md.SelectData{
{Name: "banner", Value: enum.AdunitTypeForBanner},
{Name: "激励视频", Value: enum.AdunitTypeForRewardVideo},
{Name: "插屏广告", Value: enum.AdunitTypeForInterstitial},
{Name: "视频广告", Value: enum.AdunitTypeForVideoFeeds},
//{Name: "视频贴片广告", Value: "5"},
},
AdType: enum.AdTypeList,
Platform: []md.SelectData{
{Name: "微信小程序", Value: "wx_applet"},
},


+ 205
- 0
app/svc/svc_data_center.go 파일 보기

@@ -0,0 +1,205 @@
package svc

import (
"applet/app/e"
"applet/app/enum"
"applet/app/md"
"applet/app/utils"
db "code.fnuoos.com/zhimeng/model.git/src"
"code.fnuoos.com/zhimeng/model.git/src/implement"
model2 "code.fnuoos.com/zhimeng/model.git/src/model"
"fmt"
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"strings"
)

func DataCenterTable(c *gin.Context, req md.DataCenterTableReq) md.DataCenterTableRes {
var req1 md.DataCenterRecordReq
copier.Copy(&req1, &req)
nativeString, _ := comm(c, 0, req1)
list := make([]md.DataCenterTableData, 0)
for _, v := range nativeString {
tmp := md.DataCenterTableData{
Date: v["date"],
ExposureCount: v["exposure_count"],
MediaRevenue: v["media_revenue"],
Ecpm: v["ecpm"],
}
list = append(list, tmp)
}
res := md.DataCenterTableRes{
List: list,
}
return res
}
func DataCenterRecordTotal(c *gin.Context, req md.DataCenterTableReq) md.DataCenterTotalData {
appId := GetAppletId(c, req.AppId, req.Platform)
sql := `
SELECT
SUM(exposure_count) as exposure_count,
SUM(click_count) as click_count,
SUM(click_rate) as click_rate,
SUM(ecpm) as ecpm,
SUM(media_revenue) as media_revenue
FROM generate_wx_ad_data
where %s
`
where := "uuid=" + c.GetString("mid")
if req.AppId != "" || req.Platform != "" {
where += " and app_id in(" + appId + ")"
}
if req.AdType != "" {
where += " and ad_slot='" + req.AdType + "'"
}
if req.StartDate != "" {
where += " and date>='" + req.StartDate + "'"
}
if req.EndDate != "" {
where += " and date<='" + req.EndDate + "'"
}
sql = fmt.Sprintf(sql, where)
nativeString, _ := db.QueryNativeString(db.Db, sql)
res := md.DataCenterTotalData{}
for _, v := range nativeString {
res = md.DataCenterTotalData{
Date: "-",
AppName: "-",
PlatformName: "-",
AdvName: "-",
ExposureCount: v["exposure_count"],
MediaRevenue: v["media_revenue"],
Ecpm: v["ecpm"],
ClickRate: v["click_rate"],
ClickCount: v["click_count"],
}
}
return res
}
func DataCenterRecordList(c *gin.Context, req md.DataCenterRecordReq) md.DataCenterRecordRes {
nativeString, total := comm(c, 1, req)
list := make([]md.DataCenterTotalData, 0)
for _, v := range nativeString {
NewAppletApplicationDb := implement.NewAppletApplicationDb(MasterDb(c))
app, _ := NewAppletApplicationDb.GetAppletApplicationListByAppid(v["app_id"])
platform := ""
name := ""
if app != nil {
name = app.Name
platform = app.Platform
}
tmp := md.DataCenterTotalData{
Date: v["date"],
AppName: name,
PlatformName: md.AppletPlatformMap[platform],
AdvName: enum.AdunitType(v["ad_slot"]).String(),
ExposureCount: v["exposure_count"],
MediaRevenue: v["media_revenue"],
Ecpm: v["ecpm"],
ClickRate: v["click_rate"],
ClickCount: v["click_count"],
}
list = append(list, tmp)
}
res := md.DataCenterRecordRes{
List: list,
Total: total,
}
return res
}
func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string]string, int64) {
appId := GetAppletId(c, req.AppId, req.Platform)
sql := `
SELECT
%s
FROM generate_wx_ad_data
where %s %s
`
where := "uuid=" + c.GetString("mid")
if req.AppId != "" || req.Platform != "" {
where += " and app_id in(" + appId + ")"
}
if req.AdType != "" {
where += " and ad_slot='" + req.AdType + "'"
}
if req.StartDate != "" {
where += " and date>='" + req.StartDate + "'"
}
if req.EndDate != "" {
where += " and date<='" + req.EndDate + "'"
}
field := `*`
start := (utils.StrToInt(req.Page) - 1) * utils.StrToInt(req.Limit)
groupBy := ""
if req.Page != "" {
groupBy = " group by date,app_id,slot_id order by date desc,id desc limit " + utils.IntToStr(start) + "," + req.Limit
} else {
groupBy = " group by date order by date asc"
}

sql1 := fmt.Sprintf(sql, field, where, groupBy)
nativeString, _ := db.QueryNativeString(db.Db, sql1)

var total int64 = 0
if isTotal == 1 {
sqlTotal := fmt.Sprintf(sql, "COUNT(*) as count ", where)
nativeStringTotal, _ := db.QueryNativeString(db.Db, sqlTotal)
for _, v := range nativeStringTotal {
total = utils.StrToInt64(v["count"])
}
}
return nativeString, total
}
func DataCenterSelectData(c *gin.Context) {
NewAppletApplicationDb := implement.NewAppletApplicationDb(MasterDb(c))
appList, _ := NewAppletApplicationDb.FindAllAppletApplicationList()
appMap := make(map[string][]map[string]interface{})
for _, v := range appList {
_, ok := appMap[v.Platform]
if ok == false {
appMap[v.Platform] = make([]map[string]interface{}, 0)
}
tmp := map[string]interface{}{
"name": v.Name,
"app_id": v.AppId,
"ad_type": enum.AdTypeList,
}
appMap[v.Platform] = append(appMap[v.Platform], tmp)
}
platform := []map[string]interface{}{
{
"name": "微信小程序",
"platform": "wx_applet",
"app_list": appMap["wx_applet"],
},
}
e.OutSuc(c, platform, nil)
return
}

// 应用
func GetAppletId(c *gin.Context, appId, platform string) string {
mediumId := ""
sess := MasterDb(c).Where("1=1")
var ids = make([]string, 0)
if appId != "" || platform != "" {
ids = append(ids, "-1")
}
if platform != "" {
var tmp []model2.AppletApplication
if platform != "" {
sess.And("platform = ? ", platform)
}
sess.Find(&tmp)
for _, v := range tmp {
ids = append(ids, utils.IntToStr(v.MediumId))
}
}
if appId != "" {
ids = []string{appId}
}
if appId != "" || platform != "" {
mediumId = strings.Join(ids, ",")
}
return mediumId
}

+ 55
- 0
app/svc/svc_invoice_center.go 파일 보기

@@ -0,0 +1,55 @@
package svc

import (
"applet/app/md"
"applet/app/utils"
db "code.fnuoos.com/zhimeng/model.git/src"
"code.fnuoos.com/zhimeng/model.git/src/super/implement"
"encoding/json"
"github.com/gin-gonic/gin"
)

func InvoiceCenterList(c *gin.Context, req md.InvoiceCenterDataReq) md.InvoiceCenterDataRes {
user := GetUser(c)
engine := db.Db
NewMediumInvoiceDb := implement.NewMediumInvoiceDb(engine)
MediumList, total, _ := NewMediumInvoiceDb.FindMediumInvoiceList(c.GetString("mid"), req.Type, utils.IntToStr(user.MediumId), utils.StrToInt(req.Page), utils.StrToInt(req.Limit))
data := make([]md.InvoiceCenterDataData, 0)
if len(MediumList) > 0 {
for _, v := range MediumList {
var tmp = md.InvoiceCenterDataData{
Id: utils.IntToStr(v.MediumInvoice.Id),
TimeStr: v.MediumInvoice.UpdateAt,
Month: v.StartDate,
Count: utils.IntToStr(v.MediumInvoice.Count),
Amount: utils.Float64ToStr(float64(v.MediumSettlement.OtherIncome+v.MediumSettlement.BasicIncome) / 100),
State: utils.IntToStr(v.MediumInvoice.State),
}
data = append(data, tmp)
}
}
res := md.InvoiceCenterDataRes{
List: data,
Total: total,
State: md.InvoiceState,
}
return res
}
func InvoiceCenterDetail(c *gin.Context, req md.CommDetailReq) md.InvoiceCenterDataDetailRes {
engine := db.Db
NewMediumInvoiceDb := implement.NewMediumInvoiceDb(engine)
data, _ := NewMediumInvoiceDb.GetMediumInvoiceById(utils.StrToInt(req.Id))
file := make([]md.InvoiceFile, 0)
json.Unmarshal([]byte(data.File), &file)
tmp := md.InvoiceCenterDataDetailData{
TimeStr: data.UpdateAt,
State: utils.IntToStr(data.State),
Count: utils.IntToStr(data.Count),
File: file,
}
res := md.InvoiceCenterDataDetailRes{
Data: tmp,
State: md.InvoiceState,
}
return res
}

+ 147
- 0
app/svc/svc_settle_center.go 파일 보기

@@ -0,0 +1,147 @@
package svc

import (
"applet/app/e"
"applet/app/md"
"applet/app/utils"
db "code.fnuoos.com/zhimeng/model.git/src"
"code.fnuoos.com/zhimeng/model.git/src/super/implement"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"encoding/json"
"github.com/gin-gonic/gin"
"time"
)

func SettleCenterList(c *gin.Context, req md.SettleCenterDataReq) md.SettleCenterDataRes {
user := GetUser(c)
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)
MediumList, total, _ := NewMediumSettlementDb.FindMediumSettlementList(c.GetString("mid"), utils.IntToStr(user.MediumId), "", "", "", req.StartTime, req.EndTime, utils.StrToInt(req.Page), utils.StrToInt(req.Limit))
data := make([]md.SettleCenterDataData, 0)
if len(MediumList) > 0 {
for _, v := range MediumList {
var tmp = md.SettleCenterDataData{
Id: utils.IntToStr(v.Id),
AllIncome: utils.Float64ToStr(float64(v.OtherIncome+v.BasicIncome) / 100),
MediumIncome: utils.Float64ToStr(float64(v.BasicIncome) / 100),
OtherIncome: utils.Float64ToStr(float64(v.OtherIncome) / 100),
TimeStr: v.StartDate,
SettleType: utils.IntToStr(v.Kind),
PayState: utils.IntToStr(v.PayState),
State: utils.IntToStr(v.State),
Label: "预估",
SettleFile: v.SettleFile,
}
if v.EndDate != "" && v.EndDate != "0000-00-00" {
if v.EndDate != v.StartDate {
tmp.TimeStr += "~" + v.EndDate
}
tmp.Label = ""
}
data = append(data, tmp)
}
}
res := md.SettleCenterDataRes{
List: data,
Total: total,
SettleType: md.AccountSettleState,
BusinessKind: md.BusinessKind,
SettlePayState: md.SettlePayState,
SettleState: md.SettleState,
}
return res
}
func SettleCenterDetail(c *gin.Context, req md.CommDetailReq) md.SettleCenterDataDetailRes {
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)
data, _ := NewMediumSettlementDb.GetMediumSettlementById(utils.StrToInt(req.Id))
file := make([]md.InvoiceFile, 0)
invoice := md.Invoice{
Type: "0",
Time: "",
Count: "0",
File: file,
}
//发票
NewMediumInvoiceDb := implement.NewMediumInvoiceDb(engine)
invoiceData, _ := NewMediumInvoiceDb.GetMediumInvoice(data.Id)
if invoiceData != nil {
invoice.Type = utils.IntToStr(invoiceData.Type)
invoice.Time = invoiceData.UpdateAt
invoice.Count = utils.IntToStr(invoiceData.Count)
json.Unmarshal([]byte(invoiceData.File), &file)
}
tmp := md.SettleCenterDataDetail{
SettleFile: data.SettleFile,
Invoice: invoice,
AllIncome: utils.Float64ToStr(float64(data.OtherIncome+data.BasicIncome) / 100),
MediumIncome: utils.Float64ToStr(float64(data.BasicIncome) / 100),
OtherIncome: utils.Float64ToStr(float64(data.OtherIncome) / 100),
TimeStr: data.StartDate,
PayState: utils.IntToStr(data.PayState),
State: utils.IntToStr(data.State),
BusinessKind: utils.IntToStr(data.BusinessKind),
}
if data.EndDate != "" && data.EndDate != "0000-00-00" {
if data.EndDate != data.StartDate {
tmp.TimeStr += "~" + data.EndDate
}
}
res := md.SettleCenterDataDetailRes{
Data: tmp,
InvoiceCate: md.InvoiceCate,
SettleType: md.AccountSettleState,
BusinessKind: md.BusinessKind,
SettlePayState: md.SettlePayState,
SettleState: md.SettleState,
InvoiceState: md.InvoiceState,
}
return res
}
func SettleCenterSettleFileSave(c *gin.Context, req md.SettleFileReq) {
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)
data, _ := NewMediumSettlementDb.GetMediumSettlementById(utils.StrToInt(req.Id))
if data.State == 3 {
e.OutErr(c, 400, e.NewErr(400, "已完成签订,不能再调整"))
return
}
data.State = 3
data.PayState = 1
data.SettleFile = req.File
engine.Where("id=?", data.Id).Cols("state,settle_file,pay_state").Update(data)
e.OutSuc(c, "success", nil)
return
}
func SettleCenterInvoiceSave(c *gin.Context, req md.InvoiceReq) {
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)
data, _ := NewMediumSettlementDb.GetMediumSettlementById(utils.StrToInt(req.Id))
if data.PayState > 3 {
e.OutErr(c, 400, e.NewErr(400, "已完成审核,不能再调整"))
return
}
data.PayState = 2
engine.Where("id=?", data.Id).Cols("pay_sate").Update(data)
NewMediumInvoiceDb := implement.NewMediumInvoiceDb(engine)
invoice, _ := NewMediumInvoiceDb.GetMediumInvoice(data.Id)
if invoice == nil {
invoice = &model.MediumInvoice{
SettlementId: data.Id,
CreateAt: time.Now().Format("2006-01-02 15:04:05"),
UpdateAt: time.Now().Format("2006-01-02 15:04:05"),
}
engine.Insert(invoice)
}
for k := range req.File {
req.File[k].State = "0"
}
invoice.File = utils.SerializeStr(req.File)
invoice.UpdateAt = time.Now().Format("2006-01-02 15:04:05")
invoice.State = 0
invoice.Type = utils.StrToInt(req.Type)
invoice.Count = len(req.File)
engine.Where("id=?", invoice.Id).AllCols().Update(invoice)
e.OutSuc(c, "success", nil)
return
}

+ 11
- 16
app/utils/rand.go 파일 보기

@@ -31,22 +31,16 @@ func RandNum() string {
return fmt.Sprintf("%05v", rand.New(rand.NewSource(seed)).Int31n(1000000))
}
func GenerateUniqueRandomNumbers(n int) string {
rand.Seed(time.Now().UnixNano()) // 初始化随机种子
numbers := make([]int, n) // 创建一个切片来保存随机数
for i := range numbers {
j := 0
for {
b := rand.Intn(10) // 生成0-9之间的随机数
numbers[i] = b
for _, num := range numbers[:i] {
if num == b {
j++
break
}
}
if j == 0 {
break
}
rand.Seed(time.Now().UnixNano() + rand.Int63()) // 初始化随机种子

numbers := make([]int, 0, n) // 创建一个切片来保存随机数,初始容量为n
used := make(map[int]bool) // 跟踪已使用的数字

for len(numbers) < n {
b := rand.Intn(10) // 生成0-9之间的随机数
if !used[b] {
numbers = append(numbers, b)
used[b] = true
}
}

@@ -54,5 +48,6 @@ func GenerateUniqueRandomNumbers(n int) string {
for _, v := range numbers {
numbersStr += strconv.Itoa(v)
}

return numbersStr
}

+ 1011
- 47
docs/docs.go
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1011
- 47
docs/swagger.json
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 650
- 0
docs/swagger.yaml 파일 보기

@@ -85,6 +85,8 @@ definitions:
app_id:
example: 小程序appid
type: string
app_name:
type: string
cooperate_state:
example: 合作状态
type: string
@@ -267,6 +269,110 @@ definitions:
required:
- id
type: object
md.CommDetailReq:
properties:
id:
example: 列表id
type: string
type: object
md.DataCenterRecordReq:
properties:
ad_type:
example: 广告位类型
type: string
app_id:
example: 应用
type: string
end_date:
example: "2024-08-30"
type: string
limit:
type: string
page:
type: string
platform:
example: 平台
type: string
start_date:
example: "2024-08-30"
type: string
type: object
md.DataCenterRecordRes:
properties:
list:
items:
$ref: '#/definitions/md.DataCenterTotalData'
type: array
total:
type: integer
type: object
md.DataCenterTableData:
properties:
date:
example: 日期
type: string
ecpm:
example: ecpm
type: string
exposure_count:
example: 曝光量
type: string
media_revenue:
example: 预估收益
type: string
type: object
md.DataCenterTableReq:
properties:
ad_type:
example: 广告位类型
type: string
app_id:
example: 应用
type: string
end_date:
example: "2024-08-30"
type: string
platform:
example: 平台
type: string
start_date:
example: "2024-08-30"
type: string
type: object
md.DataCenterTableRes:
properties:
list:
items:
$ref: '#/definitions/md.DataCenterTableData'
type: array
type: object
md.DataCenterTotalData:
properties:
adv_name:
type: string
app_name:
type: string
click_count:
example: 点击量
type: string
click_rate:
example: 点击率
type: string
date:
example: 日期
type: string
ecpm:
example: ecpm
type: string
exposure_count:
example: 曝光量
type: string
media_revenue:
example: 预估收益
type: string
platform_name:
type: string
type: object
md.ImgReqUpload:
properties:
dir:
@@ -277,6 +383,108 @@ definitions:
description: 文件大小, 单位byte
type: integer
type: object
md.Invoice:
properties:
count:
type: string
file:
items:
$ref: '#/definitions/md.InvoiceFile'
type: array
time:
type: string
type:
type: string
type: object
md.InvoiceCenterDataData:
properties:
amount:
example: 结算金额
type: string
count:
example: 数量
type: string
id:
type: string
month:
example: 订单月份
type: string
state:
example: 结算单状态(0:待审核 1:审核通过 2:审核拒绝)
type: string
time_str:
example: 上传时间
type: string
type: object
md.InvoiceCenterDataDetailData:
properties:
count:
example: 数量
type: string
file:
items:
$ref: '#/definitions/md.InvoiceFile'
type: array
state:
example: 结算单状态(0:待审核 1:审核通过 2:审核拒绝)
type: string
time_str:
example: 上传时间
type: string
type: object
md.InvoiceCenterDataDetailRes:
properties:
data:
$ref: '#/definitions/md.InvoiceCenterDataDetailData'
state:
items:
$ref: '#/definitions/md.SelectData'
type: array
type: object
md.InvoiceCenterDataReq:
properties:
limit:
type: string
page:
type: string
type:
example: 0电子发票 1纸质发票
type: string
type: object
md.InvoiceCenterDataRes:
properties:
list:
items:
$ref: '#/definitions/md.InvoiceCenterDataData'
type: array
state:
items:
$ref: '#/definitions/md.SelectData'
type: array
total:
type: integer
type: object
md.InvoiceFile:
properties:
state:
example: 0待确认 1审核通过 2审核失败
type: string
url:
type: string
type: object
md.InvoiceReq:
properties:
file:
items:
$ref: '#/definitions/md.InvoiceFile'
type: array
id:
example: 列表id
type: string
type:
example: 0电子发票 1纸质发票
type: string
type: object
md.LoginPhoneReq:
properties:
captcha:
@@ -431,6 +639,144 @@ definitions:
example: 值
type: string
type: object
md.SettleCenterDataData:
properties:
all_income:
example: 合计收益
type: string
business_kind:
example: 业务类型(1:广告合作)
type: string
id:
type: string
label:
type: string
medium_income:
example: 媒体结算
type: string
other_income:
example: 其他调整
type: string
pay_state:
example: 结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)
type: string
settle_file:
example: 结算单
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.SettleCenterDataDetail:
properties:
all_income:
example: 合计收益
type: string
business_kind:
example: 业务类型(1:广告合作)
type: string
invoice:
$ref: '#/definitions/md.Invoice'
medium_income:
example: 媒体结算
type: string
other_income:
example: 其他调整
type: string
pay_state:
example: 结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)
type: string
settle_file:
example: 结算单
type: string
state:
example: 结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)
type: string
time_str:
example: 业务时间
type: string
type: object
md.SettleCenterDataDetailRes:
properties:
business_kind:
items:
$ref: '#/definitions/md.SelectData'
type: array
data:
$ref: '#/definitions/md.SettleCenterDataDetail'
invoice_cate:
items:
$ref: '#/definitions/md.SelectData'
type: array
invoice_state:
items:
$ref: '#/definitions/md.SelectData'
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
type: object
md.SettleCenterDataReq:
properties:
end_time:
type: string
limit:
type: string
page:
type: string
start_time:
example: "2024-08-29"
type: string
type: object
md.SettleCenterDataRes:
properties:
business_kind:
items:
$ref: '#/definitions/md.SelectData'
type: array
list:
items:
$ref: '#/definitions/md.SettleCenterDataData'
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.SettleFileReq:
properties:
file:
example: 七牛云链接 带http
type: string
id:
example: 列表id
type: string
type: object
md.SmsReq:
properties:
phone:
@@ -824,6 +1170,186 @@ paths:
summary: 新增或保存
tags:
- 小程序应用------嘉俊
/api/dataCenter/record/list:
post:
consumes:
- application/json
description: 数据中心-数据明细
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.DataCenterRecordReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.DataCenterRecordRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 数据明细
tags:
- 数据中心------嘉俊
/api/dataCenter/record/total:
post:
consumes:
- application/json
description: 数据中心-数据明细合计
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.DataCenterTableReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.DataCenterTotalData'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 数据明细合计
tags:
- 数据中心------嘉俊
/api/dataCenter/select/data:
get:
consumes:
- application/json
description: 数据中心-筛选条件
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 筛选条件
tags:
- 数据中心------嘉俊
/api/dataCenter/table:
post:
consumes:
- application/json
description: 数据中心-数据图表
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.DataCenterTableReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.DataCenterTableRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 数据图表
tags:
- 数据中心------嘉俊
/api/invoiceCenter/detail:
post:
consumes:
- application/json
description: 发票中心-发票详情
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.CommDetailReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.InvoiceCenterDataDetailRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 发票详情
tags:
- 发票中心------嘉俊
/api/invoiceCenter/list:
post:
consumes:
- application/json
description: 发票中心-发票列表
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.InvoiceCenterDataReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.InvoiceCenterDataRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 发票列表
tags:
- 发票中心------嘉俊
/api/login:
post:
consumes:
@@ -1352,6 +1878,130 @@ paths:
summary: 修改角色状态
tags:
- ADMIN-权限管理
/api/settleCenter/detail:
post:
consumes:
- application/json
description: 结算中心-结算报表-详情
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.CommDetailReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.SettleCenterDataDetailRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 结算报表-详情
tags:
- 结算中心------嘉俊
/api/settleCenter/invoice/save:
post:
consumes:
- application/json
description: 财务中心-媒体详情-发票上传
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.InvoiceReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 媒体详情-发票上传
tags:
- 财务中心------嘉俊
/api/settleCenter/list:
post:
consumes:
- application/json
description: 结算中心-结算报表
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.SettleCenterDataReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
$ref: '#/definitions/md.SettleCenterDataRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 结算报表
tags:
- 结算中心------嘉俊
/api/settleCenter/settle/file/save:
post:
consumes:
- application/json
description: 财务中心-媒体详情-结算单保存
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.SettleFileReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容 这是data里面的数据
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 媒体详情-结算单保存
tags:
- 财务中心------嘉俊
/api/sms:
post:
consumes:


+ 2
- 2
go.mod 파일 보기

@@ -3,9 +3,9 @@ module applet
go 1.18

//replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models
//
require (
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240828073010-6ec681bcb45d
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240830085315-046c30582759
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5


불러오는 중...
취소
저장