广告平台(站长使用)
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_financial_dynamics.go 5.6 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. // FinancialDynamicsMediumTotal
  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.FinancialDynamicsMediumTotalReq true "请求参数"
  17. // @Success 200 {object} md.FinancialDynamicsMediumTotalRes "具体看返回内容 这是data里面的数据"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/financialDynamics/medium/total [POST]
  20. func FinancialDynamicsMediumTotal(c *gin.Context) {
  21. var req md.FinancialDynamicsMediumTotalReq
  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.FinancialDynamicsMediumTotal(c, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // FinancialDynamicsMediumList
  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.FinancialDynamicsMediumListReq true "请求参数"
  41. // @Success 200 {object} md.FinancialDynamicsMediumListRes "具体看返回内容 这是data里面的数据"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/financialDynamics/medium/list [POST]
  44. func FinancialDynamicsMediumList(c *gin.Context) {
  45. var req md.FinancialDynamicsMediumListReq
  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.FinancialDynamicsMediumList(c, req)
  54. e.OutSuc(c, res, nil)
  55. return
  56. }
  57. // FinancialDynamicsMediumSave
  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.FinancialDynamicsMediumSaveReq true "请求参数"
  65. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  66. // @Failure 400 {object} md.Response "具体错误"
  67. // @Router /api/financialDynamics/medium/save [POST]
  68. func FinancialDynamicsMediumSave(c *gin.Context) {
  69. var req md.FinancialDynamicsMediumSaveReq
  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. svc.FinancialDynamicsMediumSave(c, req)
  78. }
  79. // FinancialDynamicsAgentTotal
  80. // @Summary 代理预付-统计
  81. // @Tags 资产动态------嘉俊
  82. // @Description 资产动态-代理预付-统计
  83. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  84. // @Accept json
  85. // @Produce json
  86. // @Param args body md.FinancialDynamicsAgentTotalReq true "请求参数"
  87. // @Success 200 {object} md.FinancialDynamicsAgentTotalRes "具体看返回内容 这是data里面的数据"
  88. // @Failure 400 {object} md.Response "具体错误"
  89. // @Router /api/financialDynamics/agent/total [POST]
  90. func FinancialDynamicsAgentTotal(c *gin.Context) {
  91. var req md.FinancialDynamicsAgentTotalReq
  92. err := c.ShouldBindJSON(&req)
  93. if err != nil {
  94. err = validate.HandleValidateErr(err)
  95. err1 := err.(e.E)
  96. e.OutErr(c, err1.Code, err1.Error())
  97. return
  98. }
  99. res := svc.FinancialDynamicsAgentTotal(c, req)
  100. e.OutSuc(c, res, nil)
  101. return
  102. }
  103. // FinancialDynamicsAgentList
  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.FinancialDynamicsAgentListReq true "请求参数"
  111. // @Success 200 {object} md.FinancialDynamicsAgentListRes "具体看返回内容 这是data里面的数据"
  112. // @Failure 400 {object} md.Response "具体错误"
  113. // @Router /api/financialDynamics/agent/list [POST]
  114. func FinancialDynamicsAgentList(c *gin.Context) {
  115. var req md.FinancialDynamicsAgentListReq
  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. res := svc.FinancialDynamicsAgentList(c, req)
  124. e.OutSuc(c, res, nil)
  125. return
  126. }
  127. // FinancialDynamicsAgentSave
  128. // @Summary 代理预付-创建
  129. // @Tags 资产动态------嘉俊
  130. // @Description 资产动态-代理预付-创建
  131. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  132. // @Accept json
  133. // @Produce json
  134. // @Param args body md.FinancialDynamicsAgentSaveReq true "请求参数"
  135. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  136. // @Failure 400 {object} md.Response "具体错误"
  137. // @Router /api/financialDynamics/agent/save [POST]
  138. func FinancialDynamicsAgentSave(c *gin.Context) {
  139. var req md.FinancialDynamicsAgentSaveReq
  140. err := c.ShouldBindJSON(&req)
  141. if err != nil {
  142. err = validate.HandleValidateErr(err)
  143. err1 := err.(e.E)
  144. e.OutErr(c, err1.Code, err1.Error())
  145. return
  146. }
  147. svc.FinancialDynamicsAgentSave(c, req)
  148. }