|
- package hdl
-
- import (
- "applet/app/e"
- "applet/app/lib/validate"
- "applet/app/md"
- "applet/app/svc"
- "github.com/gin-gonic/gin"
- )
-
- // MediumQualificationEnterprise
- // @Summary 主体资质
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-主体资质
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.MediumQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/enterprise [POST]
- func MediumQualificationEnterprise(c *gin.Context) {
- var req md.MediumQualificationEnterpriseReq
- 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.MediumQualificationEnterprise(c, 1, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // MediumQualificationEnterpriseAudit
- // @Summary 主体资质审核
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-主体资质审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/enterprise/audit [POST]
- func MediumQualificationEnterpriseAudit(c *gin.Context) {
- var req md.MediumQualificationEnterpriseAuditReq
- err := c.ShouldBindJSON(&req)
- if err != nil {
- err = validate.HandleValidateErr(err)
- err1 := err.(e.E)
- e.OutErr(c, err1.Code, err1.Error())
- return
- }
- err = svc.MediumQualificationEnterpriseAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
-
- // MediumQualificationBank
- // @Summary 银行资质
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-银行资质
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.MediumQualificationBankRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/bank [POST]
- func MediumQualificationBank(c *gin.Context) {
- var req md.MediumQualificationEnterpriseReq
- 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.MediumQualificationBank(c, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // MediumQualificationBankAudit
- // @Summary 银行资质审核
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-银行资质审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/bank/audit [POST]
- func MediumQualificationBankAudit(c *gin.Context) {
- var req md.MediumQualificationEnterpriseAuditReq
- err := c.ShouldBindJSON(&req)
- if err != nil {
- err = validate.HandleValidateErr(err)
- err1 := err.(e.E)
- e.OutErr(c, err1.Code, err1.Error())
- return
- }
- err = svc.MediumQualificationBankAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
-
- // MediumQualificationContactInfo
- // @Summary 联系方式
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-联系方式
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.MediumQualificationContactRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/contact [POST]
- func MediumQualificationContactInfo(c *gin.Context) {
- var req md.MediumQualificationEnterpriseReq
- 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.MediumQualificationContactInfo(c, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // MediumQualificationContactInfoAudit
- // @Summary 联系方式审核
- // @Tags 媒体资质------嘉俊
- // @Description 媒体资质-联系方式审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/mediumQualification/contact/audit [POST]
- func MediumQualificationContactInfoAudit(c *gin.Context) {
- var req md.MediumQualificationEnterpriseAuditReq
- err := c.ShouldBindJSON(&req)
- if err != nil {
- err = validate.HandleValidateErr(err)
- err1 := err.(e.E)
- e.OutErr(c, err1.Code, err1.Error())
- return
- }
- err = svc.MediumQualificationContactInfoAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
|