广告平台(站长使用)
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_settle_center_medium.go 2.8 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
2 months ago
3 months ago
2 months ago
3 months ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. // SettleCenterMediumList
  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.SettleCenterDataReq true "请求参数"
  17. // @Success 200 {object} md.SettleCenterDataRes "具体看返回内容 这是data里面的数据"
  18. // @Failure 400 {object} md.Response "具体错误"
  19. // @Router /api/settleCenter/medium/list [POST]
  20. func SettleCenterMediumList(c *gin.Context) {
  21. var req md.SettleCenterDataReq
  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.SettleCenterMediumList(c, req)
  30. e.OutSuc(c, res, nil)
  31. return
  32. }
  33. // SettleCenterMediumSave
  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.SettleCenterDataSaveReq true "请求参数"
  41. // @Success 200 {string} "具体看返回内容 这是data里面的数据"
  42. // @Failure 400 {object} md.Response "具体错误"
  43. // @Router /api/settleCenter/medium/save [POST]
  44. func SettleCenterMediumSave(c *gin.Context) {
  45. var req md.SettleCenterDataSaveReq
  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. svc.SettleCenterMediumSave(c, req)
  54. }
  55. // SettleCenterMediumDetail
  56. // @Summary 媒体详情
  57. // @Tags 结算中心------嘉俊
  58. // @Description 结算中心-媒体详情
  59. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  60. // @Accept json
  61. // @Produce json
  62. // @Param args body md.SettleCenterDataDetailReq true "请求参数"
  63. // @Success 200 {object} md.SettleCenterDataDetailRes "具体看返回内容 这是data里面的数据"
  64. // @Failure 400 {object} md.Response "具体错误"
  65. // @Router /api/settleCenter/medium/detail [POST]
  66. func SettleCenterMediumDetail(c *gin.Context) {
  67. var req md.SettleCenterDataDetailReq
  68. err := c.ShouldBindJSON(&req)
  69. if err != nil {
  70. err = validate.HandleValidateErr(err)
  71. err1 := err.(e.E)
  72. e.OutErr(c, err1.Code, err1.Error())
  73. return
  74. }
  75. res := svc.SettleCenterMediumDetail(c, req)
  76. e.OutSuc(c, res, nil)
  77. return
  78. }