@@ -8,6 +8,20 @@ import ( | |||||
"github.com/gin-gonic/gin" | "github.com/gin-gonic/gin" | ||||
) | ) | ||||
// QualificationSelectBase | |||||
// @Summary 认证下拉框选择内容 | |||||
// @Tags 资质认证------嘉俊 | |||||
// @Description 资质认证-认证下拉框选择内容 | |||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||||
// @Accept json | |||||
// @Produce json | |||||
// @Success 200 {string} "具体看返回内容" | |||||
// @Failure 400 {object} md.Response "具体错误" | |||||
// @Router /api/qualification/select/base [GET] | |||||
func QualificationSelectBase(c *gin.Context) { | |||||
svc.QualificationSelectBase(c) | |||||
} | |||||
// AgentQualificationEnterprise | // AgentQualificationEnterprise | ||||
// @Summary 主体资质 | // @Summary 主体资质 | ||||
// @Tags 渠道资质------嘉俊 | // @Tags 渠道资质------嘉俊 | ||||
@@ -1,5 +1,16 @@ | |||||
package md | package md | ||||
var Country = []map[string]string{ | |||||
{ | |||||
"value": "1", "name": "中国/国内", | |||||
}, | |||||
} | |||||
var CurrencyConf = []map[string]string{ | |||||
{ | |||||
"value": "0", "name": "人民币", | |||||
}, | |||||
} | |||||
type AgentQualificationEnterpriseReq struct { | type AgentQualificationEnterpriseReq struct { | ||||
Limit string `json:"limit"` | Limit string `json:"limit"` | ||||
Page string `json:"page" ` | Page string `json:"page" ` | ||||
@@ -64,6 +64,7 @@ func route(r *gin.RouterGroup) { | |||||
r.Use(mw.Auth) // 以下接口需要JWT验证 | r.Use(mw.Auth) // 以下接口需要JWT验证 | ||||
rRole(r.Group("/role")) //权限管理 | rRole(r.Group("/role")) //权限管理 | ||||
rQualification(r.Group("/qualification")) //资质认证公共数据 | |||||
rAgentQualification(r.Group("/agentQualification")) //渠道-资质 | rAgentQualification(r.Group("/agentQualification")) //渠道-资质 | ||||
rMediumQualification(r.Group("/mediumQualification")) //媒体-资质 | rMediumQualification(r.Group("/mediumQualification")) //媒体-资质 | ||||
rSetCenter(r.Group("/setCenter")) //设置中心 | rSetCenter(r.Group("/setCenter")) //设置中心 | ||||
@@ -91,6 +92,9 @@ func rRole(r *gin.RouterGroup) { | |||||
r.GET("/adminInfo", hdl.AdminInfo) //获取管理员信息 | r.GET("/adminInfo", hdl.AdminInfo) //获取管理员信息 | ||||
r.POST("/bindAdminRole", hdl.BindAdminRole) //绑定角色 | r.POST("/bindAdminRole", hdl.BindAdminRole) //绑定角色 | ||||
} | } | ||||
func rQualification(r *gin.RouterGroup) { | |||||
r.GET("/select/base", hdl.QualificationSelectBase) //资质认证-认证选择内容 | |||||
} | |||||
func rAgentQualification(r *gin.RouterGroup) { | func rAgentQualification(r *gin.RouterGroup) { | ||||
r.POST("/enterprise", hdl.AgentQualificationEnterprise) //企业主体资质 | r.POST("/enterprise", hdl.AgentQualificationEnterprise) //企业主体资质 | ||||
r.POST("/enterprise/audit", hdl.AgentQualificationEnterpriseAudit) //企业主体资质审核 | r.POST("/enterprise/audit", hdl.AgentQualificationEnterpriseAudit) //企业主体资质审核 | ||||
@@ -12,6 +12,26 @@ import ( | |||||
"github.com/jinzhu/copier" | "github.com/jinzhu/copier" | ||||
) | ) | ||||
func QualificationSelectBase(c *gin.Context) { | |||||
countryDb := implement.NewCountryDb(db.Db) | |||||
country := countryDb.FindAll() | |||||
IdcardTypeListDb := implement.NewIdcardTypeListDb(db.Db) | |||||
IdcardTypeList := IdcardTypeListDb.FindAll() | |||||
res := map[string]interface{}{ | |||||
"register_area": country, | |||||
"idcard_type": IdcardTypeList, | |||||
"country": md.Country, | |||||
"user_type": []map[string]interface{}{ | |||||
{ | |||||
"value": "1", "name": "企业", | |||||
}, | |||||
}, | |||||
"currency_conf": md.CurrencyConf, | |||||
} | |||||
e.OutSuc(c, res, nil) | |||||
return | |||||
} | |||||
func AgentQualificationEnterprise(c *gin.Context, minState int, req md.AgentQualificationEnterpriseReq) md.AgentQualificationEnterpriseRes { | func AgentQualificationEnterprise(c *gin.Context, minState int, req md.AgentQualificationEnterpriseReq) md.AgentQualificationEnterpriseRes { | ||||
engine := db.Db | engine := db.Db | ||||
@@ -2371,6 +2371,44 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/qualification/select/base": { | |||||
"get": { | |||||
"description": "资质认证-认证下拉框选择内容", | |||||
"consumes": [ | |||||
"application/json" | |||||
], | |||||
"produces": [ | |||||
"application/json" | |||||
], | |||||
"tags": [ | |||||
"资质认证------嘉俊" | |||||
], | |||||
"summary": "认证下拉框选择内容", | |||||
"parameters": [ | |||||
{ | |||||
"type": "string", | |||||
"description": "验证参数Bearer和token空格拼接", | |||||
"name": "Authorization", | |||||
"in": "header", | |||||
"required": true | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体看返回内容", | |||||
"schema": { | |||||
"type": "string" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/registerForAgent": { | "/api/registerForAgent": { | ||||
"post": { | "post": { | ||||
"description": "注册模块-渠道代理注册", | "description": "注册模块-渠道代理注册", | ||||
@@ -2363,6 +2363,44 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/qualification/select/base": { | |||||
"get": { | |||||
"description": "资质认证-认证下拉框选择内容", | |||||
"consumes": [ | |||||
"application/json" | |||||
], | |||||
"produces": [ | |||||
"application/json" | |||||
], | |||||
"tags": [ | |||||
"资质认证------嘉俊" | |||||
], | |||||
"summary": "认证下拉框选择内容", | |||||
"parameters": [ | |||||
{ | |||||
"type": "string", | |||||
"description": "验证参数Bearer和token空格拼接", | |||||
"name": "Authorization", | |||||
"in": "header", | |||||
"required": true | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体看返回内容", | |||||
"schema": { | |||||
"type": "string" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/registerForAgent": { | "/api/registerForAgent": { | ||||
"post": { | "post": { | ||||
"description": "注册模块-渠道代理注册", | "description": "注册模块-渠道代理注册", | ||||
@@ -3418,6 +3418,31 @@ paths: | |||||
summary: 主体资质审核 | summary: 主体资质审核 | ||||
tags: | tags: | ||||
- 媒体资质------嘉俊 | - 媒体资质------嘉俊 | ||||
/api/qualification/select/base: | |||||
get: | |||||
consumes: | |||||
- application/json | |||||
description: 资质认证-认证下拉框选择内容 | |||||
parameters: | |||||
- description: 验证参数Bearer和token空格拼接 | |||||
in: header | |||||
name: Authorization | |||||
required: true | |||||
type: string | |||||
produces: | |||||
- application/json | |||||
responses: | |||||
"200": | |||||
description: 具体看返回内容 | |||||
schema: | |||||
type: string | |||||
"400": | |||||
description: 具体错误 | |||||
schema: | |||||
$ref: '#/definitions/md.Response' | |||||
summary: 认证下拉框选择内容 | |||||
tags: | |||||
- 资质认证------嘉俊 | |||||
/api/registerForAgent: | /api/registerForAgent: | ||||
post: | post: | ||||
consumes: | consumes: | ||||