Browse Source

资质

master
huangjiajun 2 months ago
parent
commit
9b94c3b4f0
11 changed files with 1287 additions and 5 deletions
  1. +124
    -0
      app/hdl/hdl_qualification.go
  2. +14
    -0
      app/md/medium_bank_info.go
  3. +13
    -0
      app/md/medium_contact_info.go
  4. +26
    -0
      app/md/medium_list.go
  5. +11
    -2
      app/router/router.go
  6. +151
    -0
      app/svc/svc_qualification.go
  7. +1
    -1
      build.sh
  8. +355
    -0
      docs/docs.go
  9. +355
    -0
      docs/swagger.json
  10. +234
    -0
      docs/swagger.yaml
  11. +3
    -2
      go.mod

+ 124
- 0
app/hdl/hdl_qualification.go View File

@@ -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.MediumList true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/qualification/enterprise/save [POST]
func QualificationEnterpriseSave(c *gin.Context) {
var req md.MediumList
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.MediumBankInfo true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/qualification/bank/save [POST]
func QualificationBankSave(c *gin.Context) {
var req md.MediumBankInfo
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.MediumContactInfo true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/qualification/contact/save [POST]
func QualificationContactSave(c *gin.Context) {
var req md.MediumContactInfo
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
}

+ 14
- 0
app/md/medium_bank_info.go View File

@@ -0,0 +1,14 @@
package md

type MediumBankInfo 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)"`
MediumId int `json:"medium_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)"`
}

+ 13
- 0
app/md/medium_contact_info.go View File

@@ -0,0 +1,13 @@
package md

type MediumContactInfo 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)"`
MediumId int `json:"medium_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)"`
}

+ 26
- 0
app/md/medium_list.go View File

@@ -0,0 +1,26 @@
package md

type MediumList 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)"`
MediumId int `json:"medium_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)"`
}

+ 11
- 2
app/router/router.go View File

@@ -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) //资质认证-联系方式保存
}

+ 151
- 0
app/svc/svc_qualification.go View File

@@ -0,0 +1,151 @@
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)
MediumListDb := implement.NewMediumListDb(db.Db)
medium, _ := MediumListDb.GetMediumList(admin.MediumId)
if medium == nil {
medium = &model2.MediumList{Uuid: utils.StrToInt(c.GetString("mid")), MediumId: admin.MediumId}
}
enterprise := map[string]interface{}{
"state": medium.State,
"data": medium,
}

NewMediumBankInfoDb := implement.NewMediumBankInfoDb(db.Db)
bank, _ := NewMediumBankInfoDb.GetMediumBankInfoList(admin.MediumId)
if bank == nil {
bank = &model2.MediumBankInfo{Uuid: medium.Uuid, MediumId: medium.MediumId}
}
bankInfo := map[string]interface{}{
"state": bank.State,
"data": bank,
}
NewMediumContactInfoDb := implement.NewMediumContactInfoDb(db.Db)
contact, _ := NewMediumContactInfoDb.GetMediumContactInfoList(admin.MediumId)
if contact == nil {
contact = &model2.MediumContactInfo{Uuid: medium.Uuid, MediumId: medium.MediumId}
}
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.MediumList) error {
req.State = 1
var data model2.MediumList
copier.Copy(&data, &req)
data.UpdateAt = time.Now().Format("2006-01-02 15:04:05")
if req.Id > 0 {
listDb := implement.NewMediumListDb(db.Db)
list, _ := listDb.GetMediumList(req.MediumId)
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.MediumBankInfo) error {
req.State = 1
var data model2.MediumBankInfo
copier.Copy(&data, &req)
data.UpdateAt = time.Now()
if req.Id > 0 {
listDb := implement.NewMediumBankInfoDb(db.Db)
list, _ := listDb.GetMediumBankInfoList(req.MediumId)
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.MediumContactInfo) error {
req.State = 1
var data model2.MediumContactInfo
copier.Copy(&data, &req)
data.UpdateAt = time.Now()

if req.Id > 0 {
listDb := implement.NewMediumContactInfoDb(db.Db)
list, _ := listDb.GetMediumContactInfoList(req.MediumId)
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
}

+ 1
- 1
build.sh View File

@@ -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-medium:${ZYOS_APP_COMMIT_ID}
#final_image_name=registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos:${ZYOS_APP_COMMIT_ID}
docker build -t ${image_name} .



+ 355
- 0
docs/docs.go View File

@@ -65,6 +65,223 @@ const docTemplate = `{
}
}
},
"/api/qualification/bank/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.MediumBankInfo"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/qualification/contact/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.MediumContactInfo"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/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.MediumList"
}
}
],
"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": "新增管理员",
@@ -752,6 +969,144 @@ const docTemplate = `{
}
}
},
"md.MediumBankInfo": {
"type": "object",
"properties": {
"bank": {
"type": "string"
},
"bank_branch": {
"type": "string"
},
"bank_no": {
"type": "string"
},
"currency_conf": {
"type": "integer"
},
"id": {
"type": "integer"
},
"licence": {
"type": "string"
},
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "integer"
},
"uuid": {
"type": "integer"
}
}
},
"md.MediumContactInfo": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"state": {
"type": "integer"
},
"uuid": {
"type": "integer"
}
}
},
"md.MediumList": {
"type": "object",
"properties": {
"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"
},
"id": {
"type": "integer"
},
"kind": {
"type": "integer"
},
"legal_representative": {
"type": "string"
},
"medium_id": {
"type": "integer"
},
"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"
},
"uuid": {
"type": "integer"
}
}
},
"md.Response": {
"type": "object",
"properties": {


+ 355
- 0
docs/swagger.json View File

@@ -57,6 +57,223 @@
}
}
},
"/api/qualification/bank/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.MediumBankInfo"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/qualification/contact/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.MediumContactInfo"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/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.MediumList"
}
}
],
"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": "新增管理员",
@@ -744,6 +961,144 @@
}
}
},
"md.MediumBankInfo": {
"type": "object",
"properties": {
"bank": {
"type": "string"
},
"bank_branch": {
"type": "string"
},
"bank_no": {
"type": "string"
},
"currency_conf": {
"type": "integer"
},
"id": {
"type": "integer"
},
"licence": {
"type": "string"
},
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "integer"
},
"uuid": {
"type": "integer"
}
}
},
"md.MediumContactInfo": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"state": {
"type": "integer"
},
"uuid": {
"type": "integer"
}
}
},
"md.MediumList": {
"type": "object",
"properties": {
"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"
},
"id": {
"type": "integer"
},
"kind": {
"type": "integer"
},
"legal_representative": {
"type": "string"
},
"medium_id": {
"type": "integer"
},
"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"
},
"uuid": {
"type": "integer"
}
}
},
"md.Response": {
"type": "object",
"properties": {


+ 234
- 0
docs/swagger.yaml View File

@@ -63,6 +63,97 @@ definitions:
token:
type: string
type: object
md.MediumBankInfo:
properties:
bank:
type: string
bank_branch:
type: string
bank_no:
type: string
currency_conf:
type: integer
id:
type: integer
licence:
type: string
medium_id:
type: integer
memo:
type: string
state:
type: integer
uuid:
type: integer
type: object
md.MediumContactInfo:
properties:
address:
type: string
email:
type: string
id:
type: integer
medium_id:
type: integer
memo:
type: string
name:
type: string
phone:
type: string
state:
type: integer
uuid:
type: integer
type: object
md.MediumList:
properties:
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
id:
type: integer
kind:
type: integer
legal_representative:
type: string
medium_id:
type: integer
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
uuid:
type: integer
type: object
md.Response:
properties:
code:
@@ -173,6 +264,149 @@ paths:
summary: 登陆
tags:
- ADMIN
/api/qualification/bank/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.MediumBankInfo'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 银行资质保存
tags:
- 资质认证------嘉俊
/api/qualification/contact/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.MediumContactInfo'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 联系方式保存
tags:
- 资质认证------嘉俊
/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.MediumList'
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:


+ 3
- 2
go.mod View File

@@ -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
@@ -36,6 +35,8 @@ require (
xorm.io/xorm v1.3.1
)

require github.com/jinzhu/copier v0.4.0

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect


Loading…
Cancel
Save