huangjiajun 2 місяці тому
джерело
коміт
a2ae05991c
7 змінених файлів з 150 додано та 0 видалено
  1. +14
    -0
      app/hdl/hdl_agent_qualification.go
  2. +11
    -0
      app/md/md_agent_qualification.go
  3. +4
    -0
      app/router/router.go
  4. +20
    -0
      app/svc/svc_agent_qualification.go
  5. +38
    -0
      docs/docs.go
  6. +38
    -0
      docs/swagger.json
  7. +25
    -0
      docs/swagger.yaml

+ 14
- 0
app/hdl/hdl_agent_qualification.go Переглянути файл

@@ -8,6 +8,20 @@ import (
"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
// @Summary 主体资质
// @Tags 渠道资质------嘉俊


+ 11
- 0
app/md/md_agent_qualification.go Переглянути файл

@@ -1,5 +1,16 @@
package md

var Country = []map[string]string{
{
"value": "1", "name": "中国/国内",
},
}
var CurrencyConf = []map[string]string{
{
"value": "0", "name": "人民币",
},
}

type AgentQualificationEnterpriseReq struct {
Limit string `json:"limit"`
Page string `json:"page" `


+ 4
- 0
app/router/router.go Переглянути файл

@@ -64,6 +64,7 @@ func route(r *gin.RouterGroup) {

r.Use(mw.Auth) // 以下接口需要JWT验证
rRole(r.Group("/role")) //权限管理
rQualification(r.Group("/qualification")) //资质认证公共数据
rAgentQualification(r.Group("/agentQualification")) //渠道-资质
rMediumQualification(r.Group("/mediumQualification")) //媒体-资质
rSetCenter(r.Group("/setCenter")) //设置中心
@@ -91,6 +92,9 @@ func rRole(r *gin.RouterGroup) {
r.GET("/adminInfo", hdl.AdminInfo) //获取管理员信息
r.POST("/bindAdminRole", hdl.BindAdminRole) //绑定角色
}
func rQualification(r *gin.RouterGroup) {
r.GET("/select/base", hdl.QualificationSelectBase) //资质认证-认证选择内容
}
func rAgentQualification(r *gin.RouterGroup) {
r.POST("/enterprise", hdl.AgentQualificationEnterprise) //企业主体资质
r.POST("/enterprise/audit", hdl.AgentQualificationEnterpriseAudit) //企业主体资质审核


+ 20
- 0
app/svc/svc_agent_qualification.go Переглянути файл

@@ -12,6 +12,26 @@ import (
"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 {

engine := db.Db


+ 38
- 0
docs/docs.go Переглянути файл

@@ -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": {
"post": {
"description": "注册模块-渠道代理注册",


+ 38
- 0
docs/swagger.json Переглянути файл

@@ -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": {
"post": {
"description": "注册模块-渠道代理注册",


+ 25
- 0
docs/swagger.yaml Переглянути файл

@@ -3418,6 +3418,31 @@ paths:
summary: 主体资质审核
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:
post:
consumes:


Завантаження…
Відмінити
Зберегти