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

3 months ago
2 months ago
3 months ago
1 month ago
3 months ago
1 month ago
3 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
3 months ago
2 months ago
2 months ago
2 months ago
3 months ago
1 month ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. package hdl
  2. import (
  3. "applet/app/e"
  4. "applet/app/lib/validate"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "fmt"
  8. "github.com/gin-gonic/gin"
  9. )
  10. // GenerateDataList
  11. // @Summary 分成数据-列表
  12. // @Tags 数据中心------嘉俊
  13. // @Description 数据中心-分成数据-列表
  14. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  15. // @Accept json
  16. // @Produce json
  17. // @Param args body md.DataCenterGenerateDataReq true "请求参数"
  18. // @Success 200 {object} md.DataCenterGenerateDataRes "具体看返回内容 这是data里面的数据"
  19. // @Failure 400 {object} md.Response "具体错误"
  20. // @Router /api/dataCenter/generate/data/list [POST]
  21. func GenerateDataList(c *gin.Context) {
  22. var req md.DataCenterGenerateDataReq
  23. err := c.ShouldBindJSON(&req)
  24. if err != nil {
  25. err = validate.HandleValidateErr(err)
  26. err1 := err.(e.E)
  27. e.OutErr(c, err1.Code, err1.Error())
  28. return
  29. }
  30. res := svc.DataCenterGenerateDataList(c, req)
  31. e.OutSuc(c, res, nil)
  32. return
  33. }
  34. // IncomeDataList
  35. // @Summary 收益报表-列表
  36. // @Tags 数据中心------嘉俊
  37. // @Description 数据中心-收益报表-列表
  38. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  39. // @Accept json
  40. // @Produce json
  41. // @Param args body md.DataCenterGenerateDataReq true "请求参数"
  42. // @Success 200 {object} md.DataCenterIncomeDataRes "具体看返回内容 这是data里面的数据"
  43. // @Failure 400 {object} md.Response "具体错误"
  44. // @Router /api/dataCenter/income/data/list [POST]
  45. func IncomeDataList(c *gin.Context) {
  46. var req md.DataCenterGenerateDataReq
  47. err := c.ShouldBindJSON(&req)
  48. if err != nil {
  49. err = validate.HandleValidateErr(err)
  50. err1 := err.(e.E)
  51. e.OutErr(c, err1.Code, err1.Error())
  52. return
  53. }
  54. res := svc.DataCenterIncomeDataList(c, req)
  55. e.OutSuc(c, res, nil)
  56. return
  57. }
  58. // IncomeDataListForOpen
  59. // @Summary 收益报表-列表
  60. // @Tags 数据中心-----OPEN
  61. // @Description 数据中心-收益报表-列表
  62. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  63. // @Accept json
  64. // @Produce json
  65. // @Param args body md.DataCenterGenerateDataForOpenReq true "请求参数"
  66. // @Success 200 {object} md.DataCenterIncomeDataRes "具体看返回内容 这是data里面的数据"
  67. // @Failure 400 {object} md.Response "具体错误"
  68. // @Router /api/dataCenter/income/data/listForOpen [POST]
  69. func IncomeDataListForOpen(c *gin.Context) {
  70. var req md.DataCenterGenerateDataForOpenReq
  71. err := c.ShouldBindJSON(&req)
  72. if err != nil {
  73. err = validate.HandleValidateErr(err)
  74. err1 := err.(e.E)
  75. e.OutErr(c, err1.Code, err1.Error())
  76. return
  77. }
  78. res := svc.DataCenterIncomeDataListForOpen(c, req)
  79. e.OutSuc(c, res, nil)
  80. return
  81. }
  82. func IncomeDataListOutPut(c *gin.Context) {
  83. var req md.DataCenterGenerateDataReq
  84. err := c.ShouldBindJSON(&req)
  85. if err != nil {
  86. err = validate.HandleValidateErr(err)
  87. err1 := err.(e.E)
  88. e.OutErr(c, err1.Code, err1.Error())
  89. return
  90. }
  91. svc.DataCenterIncomeDataListOutput(c, req)
  92. }
  93. // IncomeDataDetail
  94. // @Summary 收益报表-详情
  95. // @Tags 数据中心------嘉俊
  96. // @Description 数据中心-收益报表-详情
  97. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  98. // @Accept json
  99. // @Produce json
  100. // @Param args body md.DataCenterGenerateDataCommReq true "请求参数"
  101. // @Success 200 {object} md.DataCenterIncomeDataDetail "具体看返回内容 这是data里面的数据"
  102. // @Failure 400 {object} md.Response "具体错误"
  103. // @Router /api/dataCenter/income/data/detail [POST]
  104. func IncomeDataDetail(c *gin.Context) {
  105. var req md.DataCenterGenerateDataCommReq
  106. err := c.ShouldBindJSON(&req)
  107. if err != nil {
  108. err = validate.HandleValidateErr(err)
  109. err1 := err.(e.E)
  110. e.OutErr(c, err1.Code, err1.Error())
  111. return
  112. }
  113. svc.DataCenterIncomeDataDetail(c, req)
  114. }
  115. // GenerateDataDel
  116. // @Summary 分成数据-删除
  117. // @Tags 数据中心------嘉俊
  118. // @Description 数据中心-分成数据-删除
  119. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  120. // @Accept json
  121. // @Produce json
  122. // @Param args body md.DataCenterGenerateDataCommReq true "请求参数"
  123. // @Success 200 {string} "具体看返回内容 "
  124. // @Failure 400 {object} md.Response "具体错误"
  125. // @Router /api/dataCenter/generate/data/del [POST]
  126. func GenerateDataDel(c *gin.Context) {
  127. var req md.DataCenterGenerateDataCommReq
  128. err := c.ShouldBindJSON(&req)
  129. if err != nil {
  130. err = validate.HandleValidateErr(err)
  131. err1 := err.(e.E)
  132. e.OutErr(c, err1.Code, err1.Error())
  133. return
  134. }
  135. res := svc.DataCenterGenerateDataDel(c, req)
  136. e.OutSuc(c, res, nil)
  137. return
  138. }
  139. // GenerateDataDoing
  140. // @Summary 分成数据-应用操作
  141. // @Tags 数据中心------嘉俊
  142. // @Description 数据中心-分成数据-应用操作
  143. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  144. // @Accept json
  145. // @Produce json
  146. // @Param args body md.DataCenterGenerateDataCommReq true "请求参数"
  147. // @Success 200 {string} "具体看返回内容 "
  148. // @Failure 400 {object} md.Response "具体错误"
  149. // @Router /api/dataCenter/generate/data/doing [POST]
  150. func GenerateDataDoing(c *gin.Context) {
  151. var req md.DataCenterGenerateDataCommReq
  152. err := c.ShouldBindJSON(&req)
  153. if err != nil {
  154. err = validate.HandleValidateErr(err)
  155. err1 := err.(e.E)
  156. e.OutErr(c, err1.Code, err1.Error())
  157. return
  158. }
  159. err = svc.DataCenterGenerateDataDoing(c, req)
  160. if err != nil {
  161. fmt.Println(err.Error())
  162. e.OutErr(c, e.ERR, err.Error())
  163. return
  164. }
  165. e.OutSuc(c, "success", nil)
  166. return
  167. }
  168. // GenerateDataDetail
  169. // @Summary 分成数据-详情
  170. // @Tags 数据中心------嘉俊
  171. // @Description 数据中心-分成数据-详情
  172. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  173. // @Accept json
  174. // @Produce json
  175. // @Param args body md.DataCenterGenerateDataCommReq true "请求参数"
  176. // @Success 200 {object} md.DataCenterGenerateDataDetailData "具体看返回内容 "
  177. // @Failure 400 {object} md.Response "具体错误"
  178. // @Router /api/dataCenter/generate/data/detail [POST]
  179. func GenerateDataDetail(c *gin.Context) {
  180. var req md.DataCenterGenerateDataCommReq
  181. err := c.ShouldBindJSON(&req)
  182. if err != nil {
  183. err = validate.HandleValidateErr(err)
  184. err1 := err.(e.E)
  185. e.OutErr(c, err1.Code, err1.Error())
  186. return
  187. }
  188. svc.DataCenterGenerateDataDetail(c, req)
  189. }
  190. func DataCenterSelectData(c *gin.Context) {
  191. svc.DataCenterSelectData(c)
  192. }
  193. func DataCenterTable(c *gin.Context) {
  194. var req md.DataCenterTableReq
  195. err := c.ShouldBindJSON(&req)
  196. if err != nil {
  197. err = validate.HandleValidateErr(err)
  198. err1 := err.(e.E)
  199. e.OutErr(c, err1.Code, err1.Error())
  200. return
  201. }
  202. res := svc.DataCenterTable(c, req)
  203. e.OutSuc(c, res, nil)
  204. return
  205. }