广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hdl_finance_center_medium.go 6.3 KiB

2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. package hdl
  2. import (
  3. "applet/app/e"
  4. "applet/app/lib/validate"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "github.com/gin-gonic/gin"
  8. )
  9. // FinanceCenterPlatformList
  10. // @Summary 平台报表
  11. // @Tags 财务中心------嘉俊
  12. // @Description 财务中心-平台报表
  13. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  14. // @Accept json
  15. // @Produce json
  16. // @Param args body md.FinanceCenterPlatformDataReq true "请求参数"
  17. // @Success 200 {object} md.FinanceCenterPlatformDataRes "具体看返回内容 这是data里面的数据"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/financeCenter/platform/list [POST]
  20. func FinanceCenterPlatformList(c *gin.Context) {
  21. var req md.FinanceCenterPlatformDataReq
  22. err := c.ShouldBindJSON(&req)
  23. if err != nil {
  24. err = validate.HandleValidateErr(err)
  25. err1 := err.(e.E)
  26. e.OutErr(c, err1.Code, err1.Error())
  27. return
  28. }
  29. res := svc.FinanceCenterPlatformList(c, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // FinanceCenterMediumList
  34. // @Summary 媒体列表
  35. // @Tags 财务中心------嘉俊
  36. // @Description 财务中心-媒体列表
  37. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  38. // @Accept json
  39. // @Produce json
  40. // @Param args body md.FinanceCenterDataReq true "请求参数"
  41. // @Success 200 {object} md.FinanceCenterDataRes "具体看返回内容 这是data里面的数据"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/financeCenter/medium/list [POST]
  44. func FinanceCenterMediumList(c *gin.Context) {
  45. var req md.FinanceCenterDataReq
  46. err := c.ShouldBindJSON(&req)
  47. if err != nil {
  48. err = validate.HandleValidateErr(err)
  49. err1 := err.(e.E)
  50. e.OutErr(c, err1.Code, err1.Error())
  51. return
  52. }
  53. res := svc.FinanceCenterMediumList(c, req)
  54. e.OutSuc(c, res, nil)
  55. return
  56. }
  57. // FinanceCenterMediumDetail
  58. // @Summary 媒体详情
  59. // @Tags 财务中心------嘉俊
  60. // @Description 财务中心-媒体详情
  61. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  62. // @Accept json
  63. // @Produce json
  64. // @Param args body md.CommDetailReq true "请求参数"
  65. // @Success 200 {object} md.FinanceCenterDataDetailRes "具体看返回内容 这是data里面的数据"
  66. // @Failure 400 {object} md.Response "具体错误"
  67. // @Router /api/financeCenter/medium/detail [POST]
  68. func FinanceCenterMediumDetail(c *gin.Context) {
  69. var req md.CommDetailReq
  70. err := c.ShouldBindJSON(&req)
  71. if err != nil {
  72. err = validate.HandleValidateErr(err)
  73. err1 := err.(e.E)
  74. e.OutErr(c, err1.Code, err1.Error())
  75. return
  76. }
  77. res := svc.FinanceCenterMediumDetail(c, req)
  78. e.OutSuc(c, res, nil)
  79. return
  80. }
  81. // FinanceCenterMediumSettleFileSave
  82. // @Summary 媒体详情-结算单保存
  83. // @Tags 财务中心------嘉俊
  84. // @Description 财务中心-媒体详情-结算单保存
  85. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  86. // @Accept json
  87. // @Produce json
  88. // @Param args body md.SettleFileReq true "请求参数"
  89. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  90. // @Failure 400 {object} md.Response "具体错误"
  91. // @Router /api/financeCenter/medium/settle/file/save [POST]
  92. func FinanceCenterMediumSettleFileSave(c *gin.Context) {
  93. var req md.SettleFileReq
  94. err := c.ShouldBindJSON(&req)
  95. if err != nil {
  96. err = validate.HandleValidateErr(err)
  97. err1 := err.(e.E)
  98. e.OutErr(c, err1.Code, err1.Error())
  99. return
  100. }
  101. svc.FinanceCenterMediumSettleFileSave(c, req)
  102. }
  103. // FinanceCenterMediumPaySave
  104. // @Summary 媒体详情-确认支付
  105. // @Tags 财务中心------嘉俊
  106. // @Description 财务中心-媒体详情-确认支付
  107. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  108. // @Accept json
  109. // @Produce json
  110. // @Param args body md.CommDetailReq true "请求参数"
  111. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  112. // @Failure 400 {object} md.Response "具体错误"
  113. // @Router /api/financeCenter/medium/pay/save [POST]
  114. func FinanceCenterMediumPaySave(c *gin.Context) {
  115. var req md.CommDetailReq
  116. err := c.ShouldBindJSON(&req)
  117. if err != nil {
  118. err = validate.HandleValidateErr(err)
  119. err1 := err.(e.E)
  120. e.OutErr(c, err1.Code, err1.Error())
  121. return
  122. }
  123. svc.FinanceCenterMediumPaySave(c, req)
  124. }
  125. // FinanceCenterMediumOtherIncomeSave
  126. // @Summary 媒体详情-其他收益调整
  127. // @Tags 财务中心------嘉俊
  128. // @Description 财务中心-媒体详情-其他收益调整
  129. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  130. // @Accept json
  131. // @Produce json
  132. // @Param args body md.OtherIncomeReq true "请求参数"
  133. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  134. // @Failure 400 {object} md.Response "具体错误"
  135. // @Router /api/financeCenter/medium/other/income/save [POST]
  136. func FinanceCenterMediumOtherIncomeSave(c *gin.Context) {
  137. var req md.OtherIncomeReq
  138. err := c.ShouldBindJSON(&req)
  139. if err != nil {
  140. err = validate.HandleValidateErr(err)
  141. err1 := err.(e.E)
  142. e.OutErr(c, err1.Code, err1.Error())
  143. return
  144. }
  145. svc.FinanceCenterMediumOtherIncomeSave(c, req)
  146. }
  147. // FinanceCenterMediumInvoiceSave
  148. // @Summary 媒体详情-发票保存
  149. // @Tags 财务中心------嘉俊
  150. // @Description 财务中心-媒体详情-发票保存
  151. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  152. // @Accept json
  153. // @Produce json
  154. // @Param args body md.InvoiceReq true "请求参数"
  155. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  156. // @Failure 400 {object} md.Response "具体错误"
  157. // @Router /api/financeCenter/medium/invoice/save [POST]
  158. func FinanceCenterMediumInvoiceSave(c *gin.Context) {
  159. var req md.InvoiceReq
  160. err := c.ShouldBindJSON(&req)
  161. if err != nil {
  162. err = validate.HandleValidateErr(err)
  163. err1 := err.(e.E)
  164. e.OutErr(c, err1.Code, err1.Error())
  165. return
  166. }
  167. svc.FinanceCenterMediumInvoiceSave(c, req)
  168. }