|
- package hdl
-
- import (
- "applet/app/e"
- "applet/app/lib/validate"
- "applet/app/md"
- "applet/app/svc"
- "github.com/gin-gonic/gin"
- )
-
- // AgentQualificationEnterprise
- // @Summary 主体资质
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-主体资质
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.AgentQualificationEnterpriseRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/enterprise [POST]
- func AgentQualificationEnterprise(c *gin.Context) {
- var req md.AgentQualificationEnterpriseReq
- 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.AgentQualificationEnterprise(c, 1, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // AgentQualificationEnterpriseAudit
- // @Summary 主体资质审核
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-主体资质审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/enterprise/audit [POST]
- func AgentQualificationEnterpriseAudit(c *gin.Context) {
- var req md.AgentQualificationEnterpriseAuditReq
- 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.AgentQualificationEnterpriseAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
-
- // AgentQualificationBank
- // @Summary 银行资质
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-银行资质
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.AgentQualificationBankRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/bank [POST]
- func AgentQualificationBank(c *gin.Context) {
- var req md.AgentQualificationEnterpriseReq
- 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.AgentQualificationBank(c, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // AgentQualificationBankAudit
- // @Summary 银行资质审核
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-银行资质审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/bank/audit [POST]
- func AgentQualificationBankAudit(c *gin.Context) {
- var req md.AgentQualificationEnterpriseAuditReq
- 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.AgentQualificationBankAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
-
- // AgentQualificationContactInfo
- // @Summary 联系方式
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-联系方式
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseReq true "请求参数"
- // @Success 200 {object} md.AgentQualificationContactRes "具体看返回内容 这是data里面的数据"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/contact [POST]
- func AgentQualificationContactInfo(c *gin.Context) {
- var req md.AgentQualificationEnterpriseReq
- 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.AgentQualificationContactInfo(c, req)
- e.OutSuc(c, res, nil)
- return
- }
-
- // AgentQualificationContactInfoAudit
- // @Summary 联系方式审核
- // @Tags 渠道资质------嘉俊
- // @Description 渠道资质-联系方式审核
- // @param Authorization header string true "验证参数Bearer和token空格拼接"
- // @Accept json
- // @Produce json
- // @Param args body md.AgentQualificationEnterpriseAuditReq true "请求参数"
- // @Success 200 {string} "具体看返回内容"
- // @Failure 400 {object} md.Response "具体错误"
- // @Router /api/agentQualification/contact/audit [POST]
- func AgentQualificationContactInfoAudit(c *gin.Context) {
- var req md.AgentQualificationEnterpriseAuditReq
- 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.AgentQualificationContactInfoAudit(c, req)
- if err != nil {
- e.OutErr(c, 400, err)
- return
- }
- e.OutSuc(c, "success", nil)
- return
- }
|