huangjiajun pirms 2 mēnešiem
vecāks
revīzija
ebafcff135
13 mainītis faili ar 2284 papildinājumiem un 4 dzēšanām
  1. +40
    -0
      app/enum/enum_qualification.go
  2. +171
    -0
      app/hdl/hdl_agent_qualification.go
  3. +171
    -0
      app/hdl/hdl_medium_qualification.go
  4. +13
    -0
      app/md/md_agent_qualification.go
  5. +13
    -0
      app/md/md_medium_qualification.go
  6. +20
    -2
      app/router/router.go
  7. +220
    -0
      app/svc/svc_agent_qualification.go
  8. +220
    -0
      app/svc/svc_medium_qualification.go
  9. +1
    -1
      build.sh
  10. +532
    -0
      docs/docs.go
  11. +532
    -0
      docs/swagger.json
  12. +350
    -0
      docs/swagger.yaml
  13. +1
    -1
      go.mod

+ 40
- 0
app/enum/enum_qualification.go Parādīt failu

@@ -0,0 +1,40 @@
package enum

type QualificationState int32

const (
QualificationStateForWait = 1
QualificationStateForNormal = 2
QualificationStateForFail = 3
)

func (gt QualificationState) String() string {
switch gt {
case QualificationStateForNormal:
return "审核成功"
case QualificationStateForFail:
return "审核失败"
case QualificationStateForWait:
return "待审核"
default:
return "待审核"
}
}

type QualificationType int32

const (
QualificationTypeCompany = 1
QualificationTypeOwn = 2
)

func (gt QualificationType) String() string {
switch gt {
case QualificationTypeCompany:
return "企业"
case QualificationTypeOwn:
return "个人"
default:
return "未知"
}
}

+ 171
- 0
app/hdl/hdl_agent_qualification.go Parādīt failu

@@ -0,0 +1,171 @@
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 {string} "具体看返回内容"
// @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, 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 {string} "具体看返回内容"
// @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 {string} "具体看返回内容"
// @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/enterprise/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
}

+ 171
- 0
app/hdl/hdl_medium_qualification.go Parādīt failu

@@ -0,0 +1,171 @@
package hdl

import (
"applet/app/e"
"applet/app/lib/validate"
"applet/app/md"
"applet/app/svc"
"github.com/gin-gonic/gin"
)

// MediumQualificationEnterprise
// @Summary 主体资质
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-主体资质
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/enterprise [POST]
func MediumQualificationEnterprise(c *gin.Context) {
var req md.MediumQualificationEnterpriseReq
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.MediumQualificationEnterprise(c, req)
e.OutSuc(c, res, nil)
return
}

// MediumQualificationEnterpriseAudit
// @Summary 主体资质审核
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-主体资质审核
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/enterprise/audit [POST]
func MediumQualificationEnterpriseAudit(c *gin.Context) {
var req md.MediumQualificationEnterpriseAuditReq
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.MediumQualificationEnterpriseAudit(c, req)
if err != nil {
e.OutErr(c, 400, err)
return
}
e.OutSuc(c, "success", nil)
return
}

// MediumQualificationBank
// @Summary 银行资质
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-银行资质
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/bank [POST]
func MediumQualificationBank(c *gin.Context) {
var req md.MediumQualificationEnterpriseReq
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.MediumQualificationBank(c, req)
e.OutSuc(c, res, nil)
return
}

// MediumQualificationBankAudit
// @Summary 银行资质审核
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-银行资质审核
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/bank/audit [POST]
func MediumQualificationBankAudit(c *gin.Context) {
var req md.MediumQualificationEnterpriseAuditReq
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.MediumQualificationBankAudit(c, req)
if err != nil {
e.OutErr(c, 400, err)
return
}
e.OutSuc(c, "success", nil)
return
}

// MediumQualificationContactInfo
// @Summary 联系方式
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-联系方式
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/contact [POST]
func MediumQualificationContactInfo(c *gin.Context) {
var req md.MediumQualificationEnterpriseReq
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.MediumQualificationContactInfo(c, req)
e.OutSuc(c, res, nil)
return
}

// MediumQualificationContactInfoAudit
// @Summary 联系方式审核
// @Tags 媒体资质------嘉俊
// @Description 媒体资质-联系方式审核
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Accept json
// @Produce json
// @Param args body md.MediumQualificationEnterpriseAuditReq true "请求参数"
// @Success 200 {string} "具体看返回内容"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/mediumQualification/enterprise/audit [POST]
func MediumQualificationContactInfoAudit(c *gin.Context) {
var req md.MediumQualificationEnterpriseAuditReq
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.MediumQualificationContactInfoAudit(c, req)
if err != nil {
e.OutErr(c, 400, err)
return
}
e.OutSuc(c, "success", nil)
return
}

+ 13
- 0
app/md/md_agent_qualification.go Parādīt failu

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

type AgentQualificationEnterpriseReq struct {
Limit int `json:"limit"`
Page int `json:"page" `
Name string `json:"name"`
State string `json:"state"`
}
type AgentQualificationEnterpriseAuditReq struct {
AgentId int `json:"agent_id"`
State string `json:"state"`
Memo string `json:"memo"`
}

+ 13
- 0
app/md/md_medium_qualification.go Parādīt failu

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

type MediumQualificationEnterpriseReq struct {
Limit int `json:"limit"`
Page int `json:"page" `
Name string `json:"name"`
State string `json:"state"`
}
type MediumQualificationEnterpriseAuditReq struct {
MediumId int `json:"medium_id"`
State string `json:"state"`
Memo string `json:"memo"`
}

+ 20
- 2
app/router/router.go Parādīt failu

@@ -61,8 +61,10 @@ func route(r *gin.RouterGroup) {
r.POST("/registerForMedium", hdl.RegisterForMedium)
r.POST("/registerForAgent", hdl.RegisterForAgent)

r.Use(mw.Auth) // 以下接口需要JWT验证
rRole(r.Group("/role")) //权限管理
r.Use(mw.Auth) // 以下接口需要JWT验证
rRole(r.Group("/role")) //权限管理
rAgentQualification(r.Group("/agentQualification")) //渠道-资质
rMediumQualification(r.Group("/mediumQualification")) //媒体-资质
}

func rRole(r *gin.RouterGroup) {
@@ -81,3 +83,19 @@ func rRole(r *gin.RouterGroup) {
r.GET("/adminInfo", hdl.AdminInfo) //获取管理员信息
r.POST("/bindAdminRole", hdl.BindAdminRole) //绑定角色
}
func rAgentQualification(r *gin.RouterGroup) {
r.POST("/enterprise", hdl.AgentQualificationEnterprise) //企业主体资质
r.POST("/enterprise/audit", hdl.AgentQualificationEnterpriseAudit) //企业主体资质审核
r.POST("/bank", hdl.AgentQualificationBank) //银行资质
r.POST("/bank/audit", hdl.AgentQualificationBankAudit) //银行审核
r.POST("/contact", hdl.AgentQualificationContactInfo) //联系方式
r.POST("/contact/audit", hdl.AgentQualificationContactInfoAudit) //联系方式
}
func rMediumQualification(r *gin.RouterGroup) {
r.POST("/enterprise", hdl.MediumQualificationEnterprise) //企业主体资质
r.POST("/enterprise/audit", hdl.MediumQualificationEnterpriseAudit) //企业主体资质审核
r.POST("/bank", hdl.MediumQualificationBank) //银行资质
r.POST("/bank/audit", hdl.MediumQualificationBankAudit) //银行审核
r.POST("/contact", hdl.MediumQualificationContactInfo) //联系方式
r.POST("/contact/audit", hdl.MediumQualificationContactInfoAudit) //联系方式
}

+ 220
- 0
app/svc/svc_agent_qualification.go Parādīt failu

@@ -0,0 +1,220 @@
package svc

import (
"applet/app/e"
"applet/app/enum"
"applet/app/md"
"applet/app/utils"
db "code.fnuoos.com/zhimeng/model.git/src"
"code.fnuoos.com/zhimeng/model.git/src/super/implement"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"github.com/gin-gonic/gin"
)

func AgentQualificationEnterprise(c *gin.Context, req md.AgentQualificationEnterpriseReq) map[string]interface{} {
if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
agentListDb := implement.NewAgentListDb(engine)
agentList, total, _ := agentListDb.FindAgentList(req.Name, req.State, req.Page, req.Limit)

if len(agentList) == 0 {
agentList = make([]model.AgentList, 0)
}
res := map[string]interface{}{
"list": agentList,
"total": total,
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
"type": []map[string]interface{}{
{
"name": enum.QualificationType(enum.QualificationTypeCompany).String(),
"value": enum.QualificationTypeCompany,
},
{
"name": enum.QualificationType(enum.QualificationTypeOwn).String(),
"value": enum.QualificationTypeOwn,
},
},
}
return res
}

func AgentQualificationEnterpriseAudit(c *gin.Context, req md.AgentQualificationEnterpriseAuditReq) error {
engine := db.Db
agentListDb := implement.NewAgentListDb(engine)
data, _ := agentListDb.GetAgentList(req.AgentId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("agent_id=?", data.AgentId).Cols("state,memo").Update(data)
return nil
}

func AgentQualificationBank(c *gin.Context, req md.AgentQualificationEnterpriseReq) map[string]interface{} {
if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
agentListDb := implement.NewAgentBankInfoDb(engine)
agentList, total, _ := agentListDb.FindAgentBankInfoList(req.Name, req.State, req.Page, req.Limit)

list := make([]map[string]string, 0)
if agentList != nil {
for _, v := range agentList {
tmp := map[string]string{
"id": utils.IntToStr(v.AgentBankInfo.Id),
"agent_id": utils.IntToStr(v.AgentBankInfo.AgentId),
"company_name": v.CompanyName,
"unified_social_credit_code": v.UnifiedSocialCreditCode,
"kind": utils.IntToStr(v.Kind),
"state": utils.IntToStr(v.AgentBankInfo.State),
"memo": v.AgentBankInfo.Memo,
"currency_conf": utils.IntToStr(v.CurrencyConf),
"bank": v.Bank,
"bank_branch": v.BankBranch,
"bank_no": v.BankNo,
"licence": v.Licence,
}
list = append(list, tmp)
}
}
res := map[string]interface{}{
"list": list,
"total": total,
"currency_conf": []map[string]interface{}{
{
"id": "1", "name": "人民币",
},
},
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
"type": []map[string]interface{}{
{
"name": enum.QualificationType(enum.QualificationTypeCompany).String(),
"value": enum.QualificationTypeCompany,
},
{
"name": enum.QualificationType(enum.QualificationTypeOwn).String(),
"value": enum.QualificationTypeOwn,
},
},
}
return res
}
func AgentQualificationBankAudit(c *gin.Context, req md.AgentQualificationEnterpriseAuditReq) error {
engine := db.Db
agentListDb := implement.NewAgentBankInfoDb(engine)
data, _ := agentListDb.GetAgentBankInfoList(req.AgentId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("agent_id=?", data.AgentId).Cols("state,memo").Update(data)
return nil
}

func AgentQualificationContactInfo(c *gin.Context, req md.AgentQualificationEnterpriseReq) map[string]interface{} {
if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
agentListDb := implement.NewAgentContactInfoDb(engine)
agentList, total, _ := agentListDb.FindAgentContactInfoList(req.Name, req.State, req.Page, req.Limit)

list := make([]map[string]string, 0)
if agentList != nil {
for _, v := range agentList {
tmp := map[string]string{
"id": utils.IntToStr(v.AgentContactInfo.Id),
"agent_id": utils.IntToStr(v.AgentContactInfo.AgentId),
"company_name": v.CompanyName,
"kind": utils.IntToStr(v.Kind),
"state": utils.IntToStr(v.AgentContactInfo.State),
"memo": v.AgentContactInfo.Memo,
"name": v.AgentContactInfo.Name,
"email": v.AgentContactInfo.Email,
"phone": v.AgentContactInfo.Phone,
"address": v.AgentContactInfo.Address,
}
list = append(list, tmp)
}
}
res := map[string]interface{}{
"list": list,
"total": total,
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
}
return res
}
func AgentQualificationContactInfoAudit(c *gin.Context, req md.AgentQualificationEnterpriseAuditReq) error {
engine := db.Db
agentListDb := implement.NewAgentContactInfoDb(engine)
data, _ := agentListDb.GetAgentContactInfoList(req.AgentId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("agent_id=?", data.AgentId).Cols("state,memo").Update(data)
return nil
}

+ 220
- 0
app/svc/svc_medium_qualification.go Parādīt failu

@@ -0,0 +1,220 @@
package svc

import (
"applet/app/e"
"applet/app/enum"
"applet/app/md"
"applet/app/utils"
db "code.fnuoos.com/zhimeng/model.git/src"
"code.fnuoos.com/zhimeng/model.git/src/super/implement"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"github.com/gin-gonic/gin"
)

func MediumQualificationEnterprise(c *gin.Context, req md.MediumQualificationEnterpriseReq) map[string]interface{} {

if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
MediumListDb := implement.NewMediumListDb(engine)
MediumList, total, _ := MediumListDb.FindMediumList(req.Name, req.State, req.Page, req.Limit)
if len(MediumList) == 0 {
MediumList = make([]model.MediumList, 0)
}
res := map[string]interface{}{
"list": MediumList,
"total": total,
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
"type": []map[string]interface{}{
{
"name": enum.QualificationType(enum.QualificationTypeCompany).String(),
"value": enum.QualificationTypeCompany,
},
{
"name": enum.QualificationType(enum.QualificationTypeOwn).String(),
"value": enum.QualificationTypeOwn,
},
},
}
return res
}

func MediumQualificationEnterpriseAudit(c *gin.Context, req md.MediumQualificationEnterpriseAuditReq) error {
engine := db.Db
MediumListDb := implement.NewMediumListDb(engine)
data, _ := MediumListDb.GetMediumList(req.MediumId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("agent_id=?", data.MediumId).Cols("state,memo").Update(data)
return nil
}

func MediumQualificationBank(c *gin.Context, req md.MediumQualificationEnterpriseReq) map[string]interface{} {
if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
MediumListDb := implement.NewMediumBankInfoDb(engine)
MediumList, total, _ := MediumListDb.FindMediumBankInfoList(req.Name, req.State, req.Page, req.Limit)

list := make([]map[string]string, 0)
if MediumList != nil {
for _, v := range MediumList {
tmp := map[string]string{
"id": utils.IntToStr(v.MediumBankInfo.Id),
"medium_id": utils.IntToStr(v.MediumBankInfo.MediumId),
"company_name": v.CompanyName,
"unified_social_credit_code": v.UnifiedSocialCreditCode,
"kind": utils.IntToStr(v.Kind),
"state": utils.IntToStr(v.MediumBankInfo.State),
"memo": v.MediumBankInfo.Memo,
"currency_conf": utils.IntToStr(v.CurrencyConf),
"bank": v.Bank,
"bank_branch": v.BankBranch,
"bank_no": v.BankNo,
"licence": v.Licence,
}
list = append(list, tmp)
}
}
res := map[string]interface{}{
"list": list,
"total": total,
"currency_conf": []map[string]interface{}{
{
"id": "1", "name": "人民币",
},
},
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
"type": []map[string]interface{}{
{
"name": enum.QualificationType(enum.QualificationTypeCompany).String(),
"value": enum.QualificationTypeCompany,
},
{
"name": enum.QualificationType(enum.QualificationTypeOwn).String(),
"value": enum.QualificationTypeOwn,
},
},
}
return res
}
func MediumQualificationBankAudit(c *gin.Context, req md.MediumQualificationEnterpriseAuditReq) error {
engine := db.Db
MediumListDb := implement.NewMediumBankInfoDb(engine)
data, _ := MediumListDb.GetMediumBankInfoList(req.MediumId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("medium_id=?", data.MediumId).Cols("state,memo").Update(data)
return nil
}

func MediumQualificationContactInfo(c *gin.Context, req md.MediumQualificationEnterpriseReq) map[string]interface{} {
if req.Limit == 0 {
req.Limit = 10
}
if req.Page == 0 {
req.Page = 1
}
engine := db.Db
MediumListDb := implement.NewMediumContactInfoDb(engine)
MediumList, total, _ := MediumListDb.FindMediumContactInfoList(req.Name, req.State, req.Page, req.Limit)

list := make([]map[string]string, 0)
if MediumList != nil {
for _, v := range MediumList {
tmp := map[string]string{
"id": utils.IntToStr(v.MediumContactInfo.Id),
"medium_id": utils.IntToStr(v.MediumContactInfo.MediumId),
"company_name": v.CompanyName,
"kind": utils.IntToStr(v.Kind),
"state": utils.IntToStr(v.MediumContactInfo.State),
"memo": v.MediumContactInfo.Memo,
"name": v.MediumContactInfo.Name,
"email": v.MediumContactInfo.Email,
"phone": v.MediumContactInfo.Phone,
"address": v.MediumContactInfo.Address,
}
list = append(list, tmp)
}
}
res := map[string]interface{}{
"list": list,
"total": total,
"state": []map[string]interface{}{
{
"name": enum.QualificationState(enum.QualificationStateForWait).String(),
"value": enum.QualificationStateForWait,
},
{
"name": enum.QualificationState(enum.QualificationStateForNormal).String(),
"value": enum.QualificationStateForNormal,
},
{
"name": enum.QualificationState(enum.QualificationStateForFail).String(),
"value": enum.QualificationStateForFail,
},
},
}
return res
}
func MediumQualificationContactInfoAudit(c *gin.Context, req md.MediumQualificationEnterpriseAuditReq) error {
engine := db.Db
MediumListDb := implement.NewMediumContactInfoDb(engine)
data, _ := MediumListDb.GetMediumContactInfoList(req.MediumId)
if data == nil {
return e.NewErr(400, "记录不存在")
}
if data.State == 1 {
return e.NewErr(400, "记录已审核过")
}
data.State = utils.StrToInt(req.State)
data.Memo = req.Memo
engine.Where("medium_id=?", data.MediumId).Cols("state,memo").Update(data)
return nil
}

+ 1
- 1
build.sh Parādīt failu

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



+ 532
- 0
docs/docs.go Parādīt failu

@@ -25,6 +25,241 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/agentQualification/bank": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/bank/audit": {
"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.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/contact": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise/audit": {
"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.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": {
"post": {
"description": "登入",
@@ -65,6 +300,241 @@ const docTemplate = `{
}
}
},
"/api/mediumQualification/bank": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/bank/audit": {
"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.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/contact": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise/audit": {
"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.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/registerForAgent": {
"post": {
"description": "注册模块-渠道代理注册",
@@ -786,6 +1256,37 @@ const docTemplate = `{
}
}
},
"md.AgentQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"agent_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.AgentQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.BindAdminRoleReq": {
"type": "object",
"required": [
@@ -832,6 +1333,37 @@ const docTemplate = `{
}
}
},
"md.MediumQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.MediumQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.RegisterForAgentReq": {
"type": "object",
"required": [


+ 532
- 0
docs/swagger.json Parādīt failu

@@ -17,6 +17,241 @@
},
"host": "localhost:1002 or xxxx.advertisement.dengbiao.top",
"paths": {
"/api/agentQualification/bank": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/bank/audit": {
"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.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/contact": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise": {
"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.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise/audit": {
"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.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": {
"post": {
"description": "登入",
@@ -57,6 +292,241 @@
}
}
},
"/api/mediumQualification/bank": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/bank/audit": {
"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.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/contact": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise": {
"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.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise/audit": {
"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.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/registerForAgent": {
"post": {
"description": "注册模块-渠道代理注册",
@@ -778,6 +1248,37 @@
}
}
},
"md.AgentQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"agent_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.AgentQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.BindAdminRoleReq": {
"type": "object",
"required": [
@@ -824,6 +1325,37 @@
}
}
},
"md.MediumQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.MediumQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.RegisterForAgentReq": {
"type": "object",
"required": [


+ 350
- 0
docs/swagger.yaml Parādīt failu

@@ -32,6 +32,26 @@ definitions:
username:
type: string
type: object
md.AgentQualificationEnterpriseAuditReq:
properties:
agent_id:
type: integer
memo:
type: string
state:
type: string
type: object
md.AgentQualificationEnterpriseReq:
properties:
limit:
type: integer
name:
type: string
page:
type: integer
state:
type: string
type: object
md.BindAdminRoleReq:
properties:
adm_id:
@@ -63,6 +83,26 @@ definitions:
token:
type: string
type: object
md.MediumQualificationEnterpriseAuditReq:
properties:
medium_id:
type: integer
memo:
type: string
state:
type: string
type: object
md.MediumQualificationEnterpriseReq:
properties:
limit:
type: integer
name:
type: string
page:
type: integer
state:
type: string
type: object
md.RegisterForAgentReq:
properties:
code:
@@ -177,6 +217,161 @@ info:
title: 广告联盟-站长平台
version: "1.0"
paths:
/api/agentQualification/bank:
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.AgentQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 银行资质
tags:
- 渠道资质------嘉俊
/api/agentQualification/bank/audit:
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.AgentQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 银行资质审核
tags:
- 渠道资质------嘉俊
/api/agentQualification/contact:
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.AgentQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 联系方式
tags:
- 渠道资质------嘉俊
/api/agentQualification/enterprise:
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.AgentQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质
tags:
- 渠道资质------嘉俊
/api/agentQualification/enterprise/audit:
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.AgentQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 联系方式审核
tags:
- 渠道资质------嘉俊
/api/login:
post:
consumes:
@@ -203,6 +398,161 @@ paths:
summary: 登陆
tags:
- 登录
/api/mediumQualification/bank:
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.MediumQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 银行资质
tags:
- 媒体资质------嘉俊
/api/mediumQualification/bank/audit:
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.MediumQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 银行资质审核
tags:
- 媒体资质------嘉俊
/api/mediumQualification/contact:
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.MediumQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 联系方式
tags:
- 媒体资质------嘉俊
/api/mediumQualification/enterprise:
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.MediumQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质
tags:
- 媒体资质------嘉俊
/api/mediumQualification/enterprise/audit:
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.MediumQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 联系方式审核
tags:
- 媒体资质------嘉俊
/api/registerForAgent:
post:
consumes:


+ 1
- 1
go.mod Parādīt failu

@@ -5,7 +5,7 @@ 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.20240820095544-a6a05bde8f67
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5


Notiek ielāde…
Atcelt
Saglabāt