@@ -0,0 +1,124 @@ | |||
package hdl | |||
import ( | |||
"applet/app/e" | |||
"applet/app/lib/validate" | |||
"applet/app/md" | |||
"applet/app/svc" | |||
"github.com/gin-gonic/gin" | |||
) | |||
// QualificationInfo | |||
// @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/info [GET] | |||
func QualificationInfo(c *gin.Context) { | |||
svc.QualificationInfo(c) | |||
} | |||
// 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) | |||
} | |||
// QualificationEnterpriseSave | |||
// @Summary 企业认证保存 | |||
// @Tags 资质认证------嘉俊 | |||
// @Description 资质认证-企业认证保存 | |||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||
// @Accept json | |||
// @Produce json | |||
// @Param args body md.AgentList true "请求参数" | |||
// @Success 200 {string} "具体看返回内容" | |||
// @Failure 400 {object} md.Response "具体错误" | |||
// @Router /api/qualification/enterprise/save [POST] | |||
func QualificationEnterpriseSave(c *gin.Context) { | |||
var req md.AgentList | |||
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.QualificationEnterpriseSave(c, req) | |||
if err != nil { | |||
e.OutErr(c, 400, err) | |||
return | |||
} | |||
e.OutSuc(c, "success", nil) | |||
return | |||
} | |||
// QualificationBankSave | |||
// @Summary 银行资质保存 | |||
// @Tags 资质认证------嘉俊 | |||
// @Description 资质认证-银行资质保存 | |||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||
// @Accept json | |||
// @Produce json | |||
// @Param args body md.AgentBankInfo true "请求参数" | |||
// @Success 200 {string} "具体看返回内容" | |||
// @Failure 400 {object} md.Response "具体错误" | |||
// @Router /api/qualification/bank/save [POST] | |||
func QualificationBankSave(c *gin.Context) { | |||
var req md.AgentBankInfo | |||
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.QualificationBankSave(c, req) | |||
if err != nil { | |||
e.OutErr(c, 400, err) | |||
return | |||
} | |||
e.OutSuc(c, "success", nil) | |||
return | |||
} | |||
// QualificationContactSave | |||
// @Summary 联系方式保存 | |||
// @Tags 资质认证------嘉俊 | |||
// @Description 资质认证-联系方式保存 | |||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||
// @Accept json | |||
// @Produce json | |||
// @Param args body md.AgentContactInfo true "请求参数" | |||
// @Success 200 {string} "具体看返回内容" | |||
// @Failure 400 {object} md.Response "具体错误" | |||
// @Router /api/qualification/contact/save [POST] | |||
func QualificationContactSave(c *gin.Context) { | |||
var req md.AgentContactInfo | |||
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.QualificationContactSave(c, req) | |||
if err != nil { | |||
e.OutErr(c, 400, err) | |||
return | |||
} | |||
e.OutSuc(c, "success", nil) | |||
return | |||
} |
@@ -0,0 +1,14 @@ | |||
package md | |||
type AgentBankInfo struct { | |||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"` | |||
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"` | |||
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"` | |||
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"` | |||
CurrencyConf int `json:"currency_conf" xorm:"default 0 comment('结算币种 1人民币') TINYINT(1)"` | |||
Bank string `json:"bank" xorm:"comment('开户银行') VARCHAR(255)"` | |||
BankBranch string `json:"bank_branch" xorm:"comment('开户银行分行') VARCHAR(255)"` | |||
BankNo string `json:"bank_no" xorm:"comment('银行卡号') VARCHAR(255)"` | |||
Licence string `json:"licence" xorm:"comment('开户许可证') VARCHAR(255)"` | |||
} |
@@ -0,0 +1,13 @@ | |||
package md | |||
type AgentContactInfo struct { | |||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"` | |||
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"` | |||
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"` | |||
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"` | |||
Name string `json:"name" xorm:"comment('联系人') VARCHAR(255)"` | |||
Email string `json:"email" xorm:"comment('邮箱地址') VARCHAR(255)"` | |||
Phone string `json:"phone" xorm:"comment('联系电话') VARCHAR(255)"` | |||
Address string `json:"address" xorm:"comment('联系地址') VARCHAR(255)"` | |||
} |
@@ -0,0 +1,26 @@ | |||
package md | |||
type AgentList struct { | |||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"` | |||
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"` | |||
Kind int `json:"kind" xorm:"not null default 1 comment('类型(1:企业 2:个人)') TINYINT(1)"` | |||
CompanyName string `json:"company_name" xorm:"not null default '' comment('公司名称') VARCHAR(255)"` | |||
CompanyAbbreviation string `json:"company_abbreviation" xorm:"not null default '' comment('公司简称') VARCHAR(255)"` | |||
UnifiedSocialCreditCode string `json:"unified_social_credit_code" xorm:"not null default '' comment('统一社会信用代码') VARCHAR(255)"` | |||
CertificateType int `json:"certificate_type" xorm:"not null default 1 comment('证件类型 2级类目id') TINYINT(1)"` | |||
CertificateFirstType int `json:"certificate_first_type" xorm:"not null default 1 comment('证件类型 1级类目id') TINYINT(1)"` | |||
BusinessLicenseImgUrl string `json:"business_license_img_url" xorm:"not null default '' comment('营业执照照片') VARCHAR(255)"` | |||
LegalRepresentative string `json:"legal_representative" xorm:"not null default '' comment('法定代表人') CHAR(50)"` | |||
CountryRegionId int `json:"country_region_id" xorm:"not null default 1 comment('国家地区id') TINYINT(3)"` | |||
CountryRegion string `json:"country_region" xorm:"not null default '' comment('国家地区') CHAR(50)"` | |||
RegisteredAddressCountryId int `json:"registered_address_country_id" xorm:"not null default 0 comment('注册地址-国家id') INT(11)"` | |||
RegisteredAddressProvinceId int `json:"registered_address_province_id" xorm:"not null default 0 comment('注册地址-省份id') INT(11)"` | |||
RegisteredAddressCityId int `json:"registered_address_city_id" xorm:"not null default 0 comment('注册地址-市id') INT(11)"` | |||
RegisteredAddressCountyId int `json:"registered_address_county_id" xorm:"not null default 0 comment('注册地址-县/区id') INT(11)"` | |||
RegisteredAddress string `json:"registered_address" xorm:"not null default '' comment('注册地址') VARCHAR(255)"` | |||
BusinessLicenseAddress string `json:"business_license_address" xorm:"not null default '' comment('营业执照地址') VARCHAR(255)"` | |||
CertificateValidity string `json:"certificate_validity" xorm:"not null default '0000-00-00' comment('证件有效期') CHAR(50)"` | |||
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"` | |||
Memo string `json:"memo" xorm:"not null default '' comment('备注') VARCHAR(255)"` | |||
} |
@@ -59,8 +59,10 @@ func route(r *gin.RouterGroup) { | |||
r.Use(mw.CheckBody) //body参数转换 | |||
r.Use(mw.CheckSign) //签名校验 | |||
r.Use(mw.Auth) // 以下接口需要JWT验证 | |||
rRole(r.Group("/role")) //权限管理 | |||
r.Use(mw.Auth) // 以下接口需要JWT验证 | |||
rRole(r.Group("/role")) //权限管理 | |||
rQualification(r.Group("/qualification")) //资质 | |||
} | |||
func rRole(r *gin.RouterGroup) { | |||
@@ -79,3 +81,10 @@ func rRole(r *gin.RouterGroup) { | |||
r.GET("/adminInfo", hdl.AdminInfo) //获取管理员信息 | |||
r.POST("/bindAdminRole", hdl.BindAdminRole) //绑定角色 | |||
} | |||
func rQualification(r *gin.RouterGroup) { | |||
r.GET("/info", hdl.QualificationInfo) //资质认证-基本信息 | |||
r.GET("/select/base", hdl.QualificationSelectBase) //资质认证-认证选择内容 | |||
r.POST("/enterprise/save", hdl.QualificationEnterpriseSave) //资质认证-企业认证保存 | |||
r.POST("/bank/save", hdl.QualificationBankSave) //资质认证-银行资质保存 | |||
r.POST("/contact/save", hdl.QualificationContactSave) //资质认证-联系方式保存 | |||
} |
@@ -0,0 +1,149 @@ | |||
package svc | |||
import ( | |||
"applet/app/e" | |||
"applet/app/md" | |||
"applet/app/utils" | |||
db "code.fnuoos.com/zhimeng/model.git/src" | |||
"code.fnuoos.com/zhimeng/model.git/src/super/implement" | |||
model2 "code.fnuoos.com/zhimeng/model.git/src/super/model" | |||
"github.com/gin-gonic/gin" | |||
"github.com/jinzhu/copier" | |||
"time" | |||
) | |||
func QualificationInfo(c *gin.Context) { | |||
admin := GetUser(c) | |||
AgentListDb := implement.NewAgentListDb(db.Db) | |||
Agent, _ := AgentListDb.GetAgentList(admin.AgentId) | |||
if Agent == nil { | |||
Agent = &model2.AgentList{Uuid: utils.StrToInt(c.GetString("mid")), AgentId: admin.AgentId} | |||
} | |||
enterprise := map[string]interface{}{ | |||
"state": Agent.State, | |||
"data": Agent, | |||
} | |||
NewAgentBankInfoDb := implement.NewAgentBankInfoDb(db.Db) | |||
bank, _ := NewAgentBankInfoDb.GetAgentBankInfoList(admin.AgentId) | |||
if bank == nil { | |||
bank = &model2.AgentBankInfo{Uuid: Agent.Uuid, AgentId: Agent.AgentId} | |||
} | |||
bankInfo := map[string]interface{}{ | |||
"state": bank.State, | |||
"data": bank, | |||
} | |||
NewAgentContactInfoDb := implement.NewAgentContactInfoDb(db.Db) | |||
contact, _ := NewAgentContactInfoDb.GetAgentContactInfoList(admin.AgentId) | |||
if contact == nil { | |||
contact = &model2.AgentContactInfo{Uuid: Agent.Uuid, AgentId: Agent.AgentId} | |||
} | |||
contactInfo := map[string]interface{}{ | |||
"state": 0, | |||
"data": contact, | |||
} | |||
res := map[string]interface{}{ | |||
"enterprise": enterprise, | |||
"bank_info": bankInfo, | |||
"contact_info": contactInfo, | |||
"state_list": []map[string]interface{}{ | |||
{"value": "0", "name": "待提交"}, | |||
{"value": "1", "name": "待审核"}, | |||
{"value": "2", "name": "审核通过"}, | |||
{"value": "3", "name": "审核拒绝"}, | |||
}, | |||
} | |||
e.OutSuc(c, res, nil) | |||
return | |||
} | |||
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": []map[string]interface{}{ | |||
{ | |||
"value": "1", "name": "中国/国内", | |||
}, | |||
}, | |||
"user_type": []map[string]interface{}{ | |||
{ | |||
"value": "1", "name": "企业", | |||
}, | |||
}, | |||
"currency_conf": []map[string]interface{}{ | |||
{ | |||
"value": "0", "name": "人民币", | |||
}, | |||
}, | |||
} | |||
e.OutSuc(c, res, nil) | |||
return | |||
} | |||
func QualificationEnterpriseSave(c *gin.Context, req md.AgentList) error { | |||
req.State = 1 | |||
var data model2.AgentList | |||
copier.Copy(&data, &req) | |||
data.UpdateAt = time.Now().Format("2006-01-02 15:04:05") | |||
if req.Id > 0 { | |||
listDb := implement.NewAgentListDb(db.Db) | |||
list, _ := listDb.GetAgentList(req.AgentId) | |||
if list.State == 1 { | |||
return e.NewErr(400, "该记录已提交审核") | |||
} | |||
if list.State == 2 { | |||
return e.NewErr(400, "该记录已审核通过") | |||
} | |||
db.Db.Where("id=?", req.Id).Update(&data) | |||
} else { | |||
data.CreateAt = time.Now().Format("2006-01-02 15:04:05") | |||
db.Db.InsertOne(&data) | |||
} | |||
return nil | |||
} | |||
func QualificationBankSave(c *gin.Context, req md.AgentBankInfo) error { | |||
req.State = 1 | |||
var data model2.AgentBankInfo | |||
copier.Copy(&data, &req) | |||
data.UpdateAt = time.Now() | |||
if req.Id > 0 { | |||
listDb := implement.NewAgentBankInfoDb(db.Db) | |||
list, _ := listDb.GetAgentBankInfoList(req.AgentId) | |||
if list.State == 1 { | |||
return e.NewErr(400, "该记录已提交审核") | |||
} | |||
if list.State == 2 { | |||
return e.NewErr(400, "该记录已审核通过") | |||
} | |||
db.Db.Where("id=?", req.Id).Update(&data) | |||
} else { | |||
data.CreateAt = time.Now() | |||
db.Db.InsertOne(&data) | |||
} | |||
return nil | |||
} | |||
func QualificationContactSave(c *gin.Context, req md.AgentContactInfo) error { | |||
req.State = 1 | |||
var data model2.AgentContactInfo | |||
copier.Copy(&data, &req) | |||
data.UpdateAt = time.Now() | |||
if req.Id > 0 { | |||
listDb := implement.NewAgentContactInfoDb(db.Db) | |||
list, _ := listDb.GetAgentContactInfoList(req.AgentId) | |||
if list.State == 1 { | |||
return e.NewErr(400, "该记录已提交审核") | |||
} | |||
if list.State == 2 { | |||
return e.NewErr(400, "该记录已审核通过") | |||
} | |||
db.Db.Where("id=?", req.Id).Update(&data) | |||
} else { | |||
data.CreateAt = time.Now() | |||
db.Db.InsertOne(&data) | |||
} | |||
return nil | |||
} |
@@ -9,7 +9,7 @@ echo "GET the Commit ID for git -> $ZYOS_APP_COMMIT_ID" | |||
echo "Start build image " | |||
image_name=registry-vpc.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-mall:${ZYOS_APP_COMMIT_ID} | |||
image_name=registry-vpc.cn-shenzhen.aliyuncs.com/fnuoos-prd/advertisement-agent:${ZYOS_APP_COMMIT_ID} | |||
#final_image_name=registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos:${ZYOS_APP_COMMIT_ID} | |||
docker build -t ${image_name} . | |||
@@ -65,6 +65,129 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"/api/qualification/enterprise/save": { | |||
"post": { | |||
"description": "资质认证-企业认证保存", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"资质认证" | |||
], | |||
"summary": "企业认证保存", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
}, | |||
{ | |||
"description": "请求参数", | |||
"name": "args", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"$ref": "#/definitions/md.AgentList" | |||
} | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "具体看返回内容", | |||
"schema": { | |||
"type": "string" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/qualification/info": { | |||
"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/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/role/addAdmin": { | |||
"post": { | |||
"description": "新增管理员", | |||
@@ -706,6 +829,83 @@ const docTemplate = `{ | |||
} | |||
} | |||
}, | |||
"md.AgentList": { | |||
"type": "object", | |||
"properties": { | |||
"agent_id": { | |||
"type": "integer" | |||
}, | |||
"business_license_address": { | |||
"type": "string" | |||
}, | |||
"business_license_img_url": { | |||
"type": "string" | |||
}, | |||
"certificate_first_type": { | |||
"type": "integer" | |||
}, | |||
"certificate_type": { | |||
"type": "integer" | |||
}, | |||
"certificate_validity": { | |||
"type": "string" | |||
}, | |||
"company_abbreviation": { | |||
"type": "string" | |||
}, | |||
"company_name": { | |||
"type": "string" | |||
}, | |||
"country_region": { | |||
"type": "string" | |||
}, | |||
"country_region_id": { | |||
"type": "integer" | |||
}, | |||
"create_at": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"kind": { | |||
"type": "integer" | |||
}, | |||
"legal_representative": { | |||
"type": "string" | |||
}, | |||
"memo": { | |||
"type": "string" | |||
}, | |||
"registered_address": { | |||
"type": "string" | |||
}, | |||
"registered_address_city_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_country_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_county_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_province_id": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"unified_social_credit_code": { | |||
"type": "string" | |||
}, | |||
"update_at": { | |||
"type": "string" | |||
}, | |||
"uuid": { | |||
"type": "integer" | |||
} | |||
} | |||
}, | |||
"md.BindAdminRoleReq": { | |||
"type": "object", | |||
"required": [ | |||
@@ -57,6 +57,129 @@ | |||
} | |||
} | |||
}, | |||
"/api/qualification/enterprise/save": { | |||
"post": { | |||
"description": "资质认证-企业认证保存", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"资质认证" | |||
], | |||
"summary": "企业认证保存", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
}, | |||
{ | |||
"description": "请求参数", | |||
"name": "args", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"$ref": "#/definitions/md.AgentList" | |||
} | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "具体看返回内容", | |||
"schema": { | |||
"type": "string" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/qualification/info": { | |||
"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/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/role/addAdmin": { | |||
"post": { | |||
"description": "新增管理员", | |||
@@ -698,6 +821,83 @@ | |||
} | |||
} | |||
}, | |||
"md.AgentList": { | |||
"type": "object", | |||
"properties": { | |||
"agent_id": { | |||
"type": "integer" | |||
}, | |||
"business_license_address": { | |||
"type": "string" | |||
}, | |||
"business_license_img_url": { | |||
"type": "string" | |||
}, | |||
"certificate_first_type": { | |||
"type": "integer" | |||
}, | |||
"certificate_type": { | |||
"type": "integer" | |||
}, | |||
"certificate_validity": { | |||
"type": "string" | |||
}, | |||
"company_abbreviation": { | |||
"type": "string" | |||
}, | |||
"company_name": { | |||
"type": "string" | |||
}, | |||
"country_region": { | |||
"type": "string" | |||
}, | |||
"country_region_id": { | |||
"type": "integer" | |||
}, | |||
"create_at": { | |||
"type": "string" | |||
}, | |||
"id": { | |||
"type": "integer" | |||
}, | |||
"kind": { | |||
"type": "integer" | |||
}, | |||
"legal_representative": { | |||
"type": "string" | |||
}, | |||
"memo": { | |||
"type": "string" | |||
}, | |||
"registered_address": { | |||
"type": "string" | |||
}, | |||
"registered_address_city_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_country_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_county_id": { | |||
"type": "integer" | |||
}, | |||
"registered_address_province_id": { | |||
"type": "integer" | |||
}, | |||
"state": { | |||
"type": "integer" | |||
}, | |||
"unified_social_credit_code": { | |||
"type": "string" | |||
}, | |||
"update_at": { | |||
"type": "string" | |||
}, | |||
"uuid": { | |||
"type": "integer" | |||
} | |||
} | |||
}, | |||
"md.BindAdminRoleReq": { | |||
"type": "object", | |||
"required": [ | |||
@@ -32,6 +32,57 @@ definitions: | |||
username: | |||
type: string | |||
type: object | |||
md.AgentList: | |||
properties: | |||
agent_id: | |||
type: integer | |||
business_license_address: | |||
type: string | |||
business_license_img_url: | |||
type: string | |||
certificate_first_type: | |||
type: integer | |||
certificate_type: | |||
type: integer | |||
certificate_validity: | |||
type: string | |||
company_abbreviation: | |||
type: string | |||
company_name: | |||
type: string | |||
country_region: | |||
type: string | |||
country_region_id: | |||
type: integer | |||
create_at: | |||
type: string | |||
id: | |||
type: integer | |||
kind: | |||
type: integer | |||
legal_representative: | |||
type: string | |||
memo: | |||
type: string | |||
registered_address: | |||
type: string | |||
registered_address_city_id: | |||
type: integer | |||
registered_address_country_id: | |||
type: integer | |||
registered_address_county_id: | |||
type: integer | |||
registered_address_province_id: | |||
type: integer | |||
state: | |||
type: integer | |||
unified_social_credit_code: | |||
type: string | |||
update_at: | |||
type: string | |||
uuid: | |||
type: integer | |||
type: object | |||
md.BindAdminRoleReq: | |||
properties: | |||
id: | |||
@@ -173,6 +224,87 @@ paths: | |||
summary: 登陆 | |||
tags: | |||
- ADMIN | |||
/api/qualification/enterprise/save: | |||
post: | |||
consumes: | |||
- application/json | |||
description: 资质认证-企业认证保存 | |||
parameters: | |||
- description: 验证参数Bearer和token空格拼接 | |||
in: header | |||
name: Authorization | |||
required: true | |||
type: string | |||
- description: 请求参数 | |||
in: body | |||
name: args | |||
required: true | |||
schema: | |||
$ref: '#/definitions/md.AgentList' | |||
produces: | |||
- application/json | |||
responses: | |||
"200": | |||
description: 具体看返回内容 | |||
schema: | |||
type: string | |||
"400": | |||
description: 具体错误 | |||
schema: | |||
$ref: '#/definitions/md.Response' | |||
summary: 企业认证保存 | |||
tags: | |||
- 资质认证 | |||
/api/qualification/info: | |||
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/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/role/addAdmin: | |||
post: | |||
consumes: | |||
@@ -5,9 +5,8 @@ go 1.18 | |||
//replace code.fnuoos.com/zhimeng/model.git => E:/company/ad/models | |||
require ( | |||
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240817100708-dde162209cee | |||
code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240820125928-6ce4c06dda24 | |||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | |||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 | |||
github.com/boombuler/barcode v1.0.1 | |||
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 | |||
github.com/dgrijalva/jwt-go v3.2.0+incompatible | |||
@@ -21,6 +20,7 @@ require ( | |||
github.com/gocolly/colly v1.2.0 | |||
github.com/gomodule/redigo v2.0.0+incompatible | |||
github.com/iGoogle-ink/gopay v1.5.36 | |||
github.com/jinzhu/copier v0.4.0 | |||
github.com/makiuchi-d/gozxing v0.0.0-20210324052758-57132e828831 | |||
github.com/qiniu/api.v7/v7 v7.8.2 | |||
github.com/robfig/cron/v3 v3.0.1 | |||