diff --git a/app/enum/enum_qualification.go b/app/enum/enum_qualification.go index 2676250..b78af5a 100644 --- a/app/enum/enum_qualification.go +++ b/app/enum/enum_qualification.go @@ -13,11 +13,11 @@ func (gt QualificationState) String() string { case QualificationStateForNormal: return "审核成功" case QualificationStateForFail: - return "审核失败" + return "审核拒绝" case QualificationStateForWait: return "待审核" default: - return "待审核" + return "待提交" } } diff --git a/app/hdl/hdl_agent_qualification.go b/app/hdl/hdl_agent_qualification.go index 37d5ad3..c3e8081 100644 --- a/app/hdl/hdl_agent_qualification.go +++ b/app/hdl/hdl_agent_qualification.go @@ -28,7 +28,7 @@ func AgentQualificationEnterprise(c *gin.Context) { e.OutErr(c, err1.Code, err1.Error()) return } - res := svc.AgentQualificationEnterprise(c, req) + res := svc.AgentQualificationEnterprise(c, 1, req) e.OutSuc(c, res, nil) return } diff --git a/app/hdl/hdl_applet_application.go b/app/hdl/hdl_applet_application.go new file mode 100644 index 0000000..86ce222 --- /dev/null +++ b/app/hdl/hdl_applet_application.go @@ -0,0 +1,51 @@ +package hdl + +import ( + "applet/app/svc" + "github.com/gin-gonic/gin" +) + +// AppletApplicationMediumList +// @Summary 媒体列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationMediumListReq true "请求参数" +// @Success 200 {object} md.AppletApplicationMediumListRes "具体看返回内容---这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/medium/list [POST] +func AppletApplicationMediumList(c *gin.Context) { + svc.AppletApplicationMediumList(c) +} + +// AppletApplicationList +// @Summary 应用列表 +// @Tags 媒体中心------嘉俊 +// @Description 小程序应用-列表数据 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationListReq true "请求参数" +// @Success 200 {object} md.AppletApplicationListRes "具体看返回内容---这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/list [POST] +func AppletApplicationList(c *gin.Context) { + svc.AppletApplicationList(c) +} + +// AppletApplicationAudit +// @Summary 审核 +// @Tags 媒体中心------嘉俊 +// @Description 小程序应用-审核 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationSaveReq true "请求参数" +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/audit [POST] +func AppletApplicationAudit(c *gin.Context) { + svc.AppletApplicationAudit(c) +} diff --git a/app/hdl/hdl_applet_application_ad_space_list.go b/app/hdl/hdl_applet_application_ad_space_list.go new file mode 100644 index 0000000..29bc060 --- /dev/null +++ b/app/hdl/hdl_applet_application_ad_space_list.go @@ -0,0 +1,51 @@ +package hdl + +import ( + "applet/app/svc" + "github.com/gin-gonic/gin" +) + +// AppletApplicationAdSpaceMediumList +// @Summary 媒体列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationAdSpaceMediumListReq true "请求参数" +// @Success 200 {object} md.AppletApplicationAdSpaceMediumListRes "具体看返回内容---这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/ad/space/list [POST] +func AppletApplicationAdSpaceMediumList(c *gin.Context) { + svc.AppletApplicationAdSpaceMediumList(c) +} + +// AppletApplicationAdSpaceList +// @Summary 广告位列表 +// @Tags 媒体中心------嘉俊 +// @Description 小程序应用-广告位列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationAdSpaceListReq true "请求参数" +// @Success 200 {object} md.AppletApplicationAdSpaceListRes "具体看返回内容---这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/ad/space/save [POST] +func AppletApplicationAdSpaceList(c *gin.Context) { + svc.AppletApplicationAdSpaceList(c) +} + +// AppletApplicationAdSpaceAudit +// @Summary 广告位审核 +// @Tags 媒体中心------嘉俊 +// @Description 小程序应用-广告位审核 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AppletApplicationAdSpaceSaveReq true "请求参数" +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/applet/application/ad/space/audit [POST] +func AppletApplicationAdSpaceAudit(c *gin.Context) { + svc.AppletApplicationAdSpaceAudit(c) +} diff --git a/app/hdl/hdl_medium_agent.go b/app/hdl/hdl_medium_agent.go new file mode 100644 index 0000000..1cd01bd --- /dev/null +++ b/app/hdl/hdl_medium_agent.go @@ -0,0 +1,123 @@ +package hdl + +import ( + "applet/app/e" + "applet/app/lib/validate" + "applet/app/md" + "applet/app/svc" + "github.com/gin-gonic/gin" +) + +// AgentList +// @Summary 代理列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-代理列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AgentQualificationEnterpriseReq true "请求参数" +// @Success 200 {object} md.AgentQualificationEnterpriseRes "具体看返回内容 这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/agent/list [POST] +func AgentList(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, 0, req) + e.OutSuc(c, res, nil) + return +} + +// AgentBindMediumList +// @Summary 代理绑定媒体列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-代理绑定媒体列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.MediumListReq true "请求参数" +// @Success 200 {object} md.MediumListRes "具体看返回内容 这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/agent/bind/medium/list [POST] +func AgentBindMediumList(c *gin.Context) { + svc.AgentBindMediumList(c) + return +} + +// MediumList +// @Summary 媒体列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.MediumQualificationEnterpriseReq true "请求参数" +// @Success 200 {object} md.MediumQualificationEnterpriseRes "具体看返回内容 这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/medium/list [POST] +func MediumList(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, 0, req) + e.OutSuc(c, res, nil) + return +} + +// MediumBindAgentList +// @Summary 媒体绑定代理列表 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体绑定代理列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.MediumListReq true "请求参数" +// @Success 200 {object} md.MediumListRes "具体看返回内容 这是data里面的数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/medium/bind/agent/list [POST] +func MediumBindAgentList(c *gin.Context) { + svc.MediumBindAgentList(c) + return +} + +// MediumBindAgentSave +// @Summary 媒体绑定代理操作 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体绑定代理操作 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.MediumListSaveReq true "请求参数" +// @Success 200 {string} "具体看返回内容 " +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/medium/bind/agent/save [POST] +func MediumBindAgentSave(c *gin.Context) { + svc.MediumBindAgentSave(c) + return +} + +// MediumBindAgentDel +// @Summary 媒体绑定代理删除 +// @Tags 媒体中心------嘉俊 +// @Description 媒体中心-媒体绑定代理删除 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.MediumListDelReq true "请求参数" +// @Success 200 {string} "具体看返回内容 " +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/mediumCenter/medium/bind/agent/del [POST] +func MediumBindAgentDel(c *gin.Context) { + svc.MediumBindAgentDel(c) + return +} diff --git a/app/hdl/hdl_medium_qualification.go b/app/hdl/hdl_medium_qualification.go index cd83441..d95b6b6 100644 --- a/app/hdl/hdl_medium_qualification.go +++ b/app/hdl/hdl_medium_qualification.go @@ -28,7 +28,7 @@ func MediumQualificationEnterprise(c *gin.Context) { e.OutErr(c, err1.Code, err1.Error()) return } - res := svc.MediumQualificationEnterprise(c, req) + res := svc.MediumQualificationEnterprise(c, 1, req) e.OutSuc(c, res, nil) return } diff --git a/app/hdl/hdl_set_center.go b/app/hdl/hdl_set_center.go index a180d61..f4c94b5 100644 --- a/app/hdl/hdl_set_center.go +++ b/app/hdl/hdl_set_center.go @@ -461,3 +461,57 @@ func ShareIndex(c *gin.Context) { }, nil) return } + +// SetMob +// @Summary mob设置 +// @Tags 设置中心-基础设置 +// @Description 基础设置-mob设置 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.SetMobReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/setCenter/basic/setMob [POST] +func SetMob(c *gin.Context) { + var req md.SetMobReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + masterId := svc.GetMasterId(c) + engine := db.DBs[masterId] + sysCfgDb := implement2.NewSysCfgDb(engine, masterId) + sysCfgDb.SysCfgUpdate("mob_app_key", req.MobAppKey) + sysCfgDb.SysCfgUpdate("mob_app_secret", req.MobAppSecret) + e.OutSuc(c, "success", nil) + return +} + +// GetMob +// @Summary mob获取 +// @Tags 设置中心-基础设置 +// @Description 基础设置-mob获取 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Success 200 {object} md.SetOssResp +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/setCenter/basic/getMob [GET] +func GetMob(c *gin.Context) { + masterId := svc.GetMasterId(c) + engine := db.DBs[masterId] + sysCfgDb := implement2.NewSysCfgDb(engine, masterId) + res := sysCfgDb.SysCfgFindWithDb("mob_app_key", "mob_app_secret") + + e.OutSuc(c, md.SetMobResp{ + Data: md.SetMobReq{ + MobAppSecret: res["mob_app_secret"], + MobAppKey: res["mob_app_key"], + }, + }, nil) + return +} diff --git a/app/md/md__applet_application.go b/app/md/md__applet_application.go new file mode 100644 index 0000000..b32c864 --- /dev/null +++ b/app/md/md__applet_application.go @@ -0,0 +1,52 @@ +package md + +type AppletApplicationMediumListReq struct { + Limit string `json:"limit"` + Page string `json:"page" ` + Name string `json:"name" example:"媒体名称"` + Account string `json:"account" example:"媒体账号"` +} +type AppletApplicationMediumListRes struct { + List []AppletApplicationMediumListData `json:"list"` + Total int64 `json:"total"` +} +type AppletApplicationMediumListData struct { + Id string `json:"id" example:"id"` + MediumId string `json:"medium_id" example:"媒体id"` + Name string `json:"name" example:"名称"` + Account string `json:"account" example:"账号"` + ContactName string `json:"contact_name" example:"联系人"` + Phone string `json:"phone" example:"联系电话"` + Count string `json:"count" example:"应用数量"` +} +type AppletApplicationListReq struct { + Limit string `json:"limit"` + Page string `json:"page" ` + Name string `json:"name"` + MediumId string `json:"medium_id" example:"媒体id"` + CooperateState string `json:"cooperate_state" example:"合作状态"` + Platform string `json:"platform"` +} +type AppletApplicationListRes struct { + List []AppletApplicationListData `json:"list"` + Total int64 `json:"total"` + State []SelectData `json:"state"` + CooperateState []SelectData `json:"cooperate_state"` + Platform []SelectData `json:"platform"` +} +type AppletApplicationListData struct { + Id string `json:"id" example:"id"` + Name string `json:"name" example:"应用名称"` + Platform string `json:"platform" example:"平台"` + Memo string `json:"memo" example:"备注"` + Logo string `json:"logo" example:"logo"` + AppId string `json:"app_id" example:"小程序appid"` + OriginalId string `json:"original_id" example:"小程序id"` + State string `json:"state" example:"应用状态 state=3 才能再次编辑"` + CooperateState string `json:"cooperate_state" example:"合作状态"` +} +type AppletApplicationSaveReq struct { + Id string `json:"id" example:"id 多个逗号隔开"` + State string `json:"state" example:"审核状态"` + Memo string `json:"memo" example:"备注"` +} diff --git a/app/md/md__applet_application_ad_space_list.go b/app/md/md__applet_application_ad_space_list.go new file mode 100644 index 0000000..fb8ffa7 --- /dev/null +++ b/app/md/md__applet_application_ad_space_list.go @@ -0,0 +1,54 @@ +package md + +type AppletApplicationAdSpaceMediumListReq struct { + Limit string `json:"limit"` + Page string `json:"page" ` + Name string `json:"name" example:"媒体名称"` + Account string `json:"account" example:"媒体账号"` +} +type AppletApplicationAdSpaceMediumListRes struct { + List []AppletApplicationAdSpaceMediumListData `json:"list"` + Total int64 `json:"total"` +} +type AppletApplicationAdSpaceMediumListData struct { + Id string `json:"id" example:"id"` + MediumId string `json:"medium_id" example:"媒体id"` + Name string `json:"name" example:"名称"` + Account string `json:"account" example:"账号"` + ContactName string `json:"contact_name" example:"联系人"` + Phone string `json:"phone" example:"联系电话"` + Count string `json:"count" example:"广告位数量"` +} +type AppletApplicationAdSpaceListReq struct { + MediumId string `json:"medium_id" example:"媒体id"` + Limit string `json:"limit"` + Page string `json:"page" ` + Name string `json:"name"` + CooperateState string `json:"cooperate_state" example:"合作状态"` + Platform string `json:"platform"` +} +type AppletApplicationAdSpaceListRes struct { + List []AppletApplicationAdSpaceListData `json:"list"` + Total int64 `json:"total"` + State []SelectData `json:"state"` + CooperateState []SelectData `json:"cooperate_state"` + Platform []SelectData `json:"platform"` + AdType []SelectData `json:"ad_type"` +} +type AppletApplicationAdSpaceListData struct { + Id string `json:"id" example:"id"` + Name string `json:"name" example:"应用名称"` + Platform string `json:"platform" example:"平台"` + Kind string `json:"kind" example:"广告位类型"` + Memo string `json:"memo" example:"备注"` + Logo string `json:"logo" example:"logo"` + AppId string `json:"app_id" example:"小程序appid"` + AdId string `json:"ad_id" example:"广告位id"` + State string `json:"state" example:"应用状态 state=2 才能再次编辑"` + CooperateState string `json:"cooperate_state" example:"合作状态"` +} +type AppletApplicationAdSpaceSaveReq struct { + Id string `json:"id" example:"id 多个逗号隔开"` + State string `json:"state" example:"审核状态"` + Memo string `json:"memo" example:"备注"` +} diff --git a/app/md/md_agent_qualification.go b/app/md/md_agent_qualification.go index 785c2b8..0cb840f 100644 --- a/app/md/md_agent_qualification.go +++ b/app/md/md_agent_qualification.go @@ -42,6 +42,7 @@ type AgentQualificationEnterpriseData struct { BusinessLicenseAddress string `json:"business_license_address" example:"营业执照地址"` CertificateValidity string `json:"certificate_validity" example:"证件有效期"` Memo string `json:"memo" example:"备注 审核时填写的"` + Account string `json:"account" example:"账号"` } type AgentQualificationBankRes struct { State []SelectData `json:"state" ` @@ -63,6 +64,7 @@ type AgentQualificationBankData struct { Memo string `json:"memo" example:"备注 审核时填写的"` State string `json:"state" example:"状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"` UnifiedSocialCreditCode string `json:"unified_social_credit_code" example:"统一社会信用代码"` + Account string `json:"account" example:"账号"` } type AgentQualificationContactRes struct { @@ -81,4 +83,5 @@ type AgentQualificationContactData struct { Name string `json:"name" example:"联系人"` Phone string `json:"phone" example:"联系电话"` State string `json:"state" example:"状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"` + Account string `json:"account" example:"账号"` } diff --git a/app/md/md_medium.go b/app/md/md_medium.go new file mode 100644 index 0000000..8a76bff --- /dev/null +++ b/app/md/md_medium.go @@ -0,0 +1,32 @@ +package md + +type MediumListReq struct { + Id string `json:"id"` + Limit string `json:"limit"` + Page string `json:"page" ` + Name string `json:"name"` + State string `json:"state"` +} +type MediumListRes struct { + State []SelectData `json:"state" ` + List []MediumListData `json:"list"` + Total int64 `json:"total"` +} +type MediumListData struct { + MediumId string `json:"medium_id" example:"媒体id"` + CompanyName string `json:"company_name" example:"公司名称"` + Id string `json:"id" example:"id"` + Memo string `json:"memo" example:"备注 审核时填写的"` + State string `json:"state" example:"状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"` + UnifiedSocialCreditCode string `json:"unified_social_credit_code" example:"统一社会信用代码"` + LegalRepresentative string `json:"legal_representative" example:"法定代表人"` + Account string `json:"account" example:"媒体账号"` + BusinessLicenseAddress string `json:"business_license_address" example:"营业执照地址"` +} +type MediumListSaveReq struct { + Username string `json:"username"` + MediumId string `json:"medium_id"` +} +type MediumListDelReq struct { + Id string `json:"id" example:"列表id"` +} diff --git a/app/md/md_medium_qualification.go b/app/md/md_medium_qualification.go index bc3163e..f4c4c9d 100644 --- a/app/md/md_medium_qualification.go +++ b/app/md/md_medium_qualification.go @@ -42,6 +42,7 @@ type MediumQualificationEnterpriseData struct { BusinessLicenseAddress string `json:"business_license_address" example:"营业执照地址"` CertificateValidity string `json:"certificate_validity" example:"证件有效期"` Memo string `json:"memo" example:"备注 审核时填写的"` + Account string `json:"account" example:"账号"` } type MediumQualificationBankRes struct { State []SelectData `json:"state" ` @@ -63,6 +64,7 @@ type MediumQualificationBankData struct { Memo string `json:"memo" example:"备注 审核时填写的"` State string `json:"state" example:"状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"` UnifiedSocialCreditCode string `json:"unified_social_credit_code" example:"统一社会信用代码"` + Account string `json:"account" example:"账号"` } type MediumQualificationContactRes struct { @@ -81,4 +83,5 @@ type MediumQualificationContactData struct { Name string `json:"name" example:"联系人"` Phone string `json:"phone" example:"联系电话"` State string `json:"state" example:"状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"` + Account string `json:"account" example:"账号"` } diff --git a/app/md/md_set_center.go b/app/md/md_set_center.go index d641ec1..01e2d61 100644 --- a/app/md/md_set_center.go +++ b/app/md/md_set_center.go @@ -47,3 +47,11 @@ type ShareIndexResp struct { AgentDomain string `json:"agent_domain" example:"代理分享地址"` MediumDomain string `json:"medium_domain" example:"媒体分享地址"` } + +type SetMobReq struct { + MobAppKey string `json:"mob_app_key"` + MobAppSecret string `json:"mob_app_secret"` +} +type SetMobResp struct { + Data SetMobReq `json:"data"` //数据内容 +} diff --git a/app/md/qiniuyun.go b/app/md/qiniuyun.go new file mode 100644 index 0000000..565c6ee --- /dev/null +++ b/app/md/qiniuyun.go @@ -0,0 +1,7 @@ +package md + +type ImgReqUpload struct { + Dir string `json:"dir"` + FileName string `json:"file_name"` + FileSize int64 `json:"file_size"` // 文件大小, 单位byte +} diff --git a/app/md/sms.go b/app/md/sms.go new file mode 100644 index 0000000..48c154c --- /dev/null +++ b/app/md/sms.go @@ -0,0 +1,6 @@ +package md + +type SmsReq struct { + Username string `json:"username"` + Type string `json:"type" example:"手机号登陆:fast_login 注册:register"` +} diff --git a/app/router/router.go b/app/router/router.go index 8ba0239..fcdcb99 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -67,6 +67,7 @@ func route(r *gin.RouterGroup) { rAgentQualification(r.Group("/agentQualification")) //渠道-资质 rMediumQualification(r.Group("/mediumQualification")) //媒体-资质 rSetCenter(r.Group("/setCenter")) //设置中心 + rMedium(r.Group("/mediumCenter")) //媒体中心 } func rRole(r *gin.RouterGroup) { @@ -108,6 +109,8 @@ func rSetCenter(r *gin.RouterGroup) { rBasicSetCenter.GET("/getOss", hdl.GetOss) rBasicSetCenter.POST("/wxOpenSet", hdl.WxOpenSet) rBasicSetCenter.GET("/wxOpenGet", hdl.WxOpenGet) + rBasicSetCenter.POST("/setMob", hdl.SetMob) + rBasicSetCenter.GET("/getMob", hdl.GetMob) } rAppletSetCenter := r.Group("/applet") { @@ -124,3 +127,20 @@ func rSetCenter(r *gin.RouterGroup) { } } +func rMedium(r *gin.RouterGroup) { + r.POST("/applet/application/medium/list", hdl.AppletApplicationMediumList) //应用管理-媒体列表 + r.POST("/applet/application/list", hdl.AppletApplicationList) //小程序应用-列表数据 + r.POST("/applet/application/audit", hdl.AppletApplicationAudit) //小程序应用-审核 + + r.POST("/applet/application/ad/space/medium/list", hdl.AppletApplicationAdSpaceMediumList) //广告管理-媒体列表 + r.POST("/applet/application/ad/space/list", hdl.AppletApplicationAdSpaceList) //小程序应用-广告位列表数据 + r.POST("/applet/application/ad/space/audit", hdl.AppletApplicationAdSpaceAudit) //小程序应用-广告位审核 + + r.POST("/medium/list", hdl.MediumList) //媒体列表 + r.POST("/medium/bind/agent/list", hdl.MediumBindAgentList) //媒体绑定代理列表 + r.POST("/medium/bind/agent/save", hdl.MediumBindAgentSave) //媒体绑定代理操作 + r.POST("/medium/bind/agent/del", hdl.MediumBindAgentDel) //媒体绑定代理删除 + + r.POST("/agent/list", hdl.AgentList) //代理列表 + r.POST("/agent/bind/medium/list", hdl.AgentBindMediumList) //代理绑定媒体列表 +} diff --git a/app/svc/svc_agent_qualification.go b/app/svc/svc_agent_qualification.go index 1145401..cc2d66a 100644 --- a/app/svc/svc_agent_qualification.go +++ b/app/svc/svc_agent_qualification.go @@ -6,18 +6,20 @@ import ( "applet/app/md" "applet/app/utils" db "code.fnuoos.com/zhimeng/model.git/src" + implement2 "code.fnuoos.com/zhimeng/model.git/src/implement" "code.fnuoos.com/zhimeng/model.git/src/super/implement" "github.com/gin-gonic/gin" "github.com/jinzhu/copier" ) -func AgentQualificationEnterprise(c *gin.Context, req md.AgentQualificationEnterpriseReq) md.AgentQualificationEnterpriseRes { +func AgentQualificationEnterprise(c *gin.Context, minState int, req md.AgentQualificationEnterpriseReq) md.AgentQualificationEnterpriseRes { engine := db.Db agentListDb := implement.NewAgentListDb(engine) - agentList, total, _ := agentListDb.FindAgentList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + agentList, total, _ := agentListDb.FindAgentList(c.GetString("mid"), req.Name, req.State, minState, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) data := make([]md.AgentQualificationEnterpriseData, 0) if len(agentList) > 0 { + NewAgentDb := implement2.NewAgentDb(MasterDb(c)) for _, v := range agentList { var tmp md.AgentQualificationEnterpriseData copier.Copy(&tmp, &v) @@ -33,6 +35,10 @@ func AgentQualificationEnterprise(c *gin.Context, req md.AgentQualificationEnter tmp.RegisteredAddressCityId = utils.IntToStr(v.RegisteredAddressCityId) tmp.RegisteredAddressCountyId = utils.IntToStr(v.RegisteredAddressCountyId) tmp.State = utils.IntToStr(v.State) + agent := NewAgentDb.GetSuperAdmin(v.AgentId) + if agent != nil { + tmp.Account = agent.Username + } data = append(data, tmp) } } @@ -86,10 +92,10 @@ func AgentQualificationEnterpriseAudit(c *gin.Context, req md.AgentQualification func AgentQualificationBank(c *gin.Context, req md.AgentQualificationEnterpriseReq) md.AgentQualificationBankRes { engine := db.Db agentListDb := implement.NewAgentBankInfoDb(engine) - agentList, total, _ := agentListDb.FindAgentBankInfoList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) - + agentList, total, _ := agentListDb.FindAgentBankInfoList(c.GetString("mid"), req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.AgentQualificationBankData, 0) if agentList != nil { + NewAgentDb := implement2.NewAgentDb(MasterDb(c)) for _, v := range agentList { tmp := md.AgentQualificationBankData{ Id: utils.IntToStr(v.AgentBankInfo.Id), @@ -105,6 +111,10 @@ func AgentQualificationBank(c *gin.Context, req md.AgentQualificationEnterpriseR BankNo: v.BankNo, Licence: v.Licence, } + agent := NewAgentDb.GetSuperAdmin(v.AgentBankInfo.AgentId) + if agent != nil { + tmp.Account = agent.Username + } list = append(list, tmp) } } @@ -162,10 +172,11 @@ func AgentQualificationBankAudit(c *gin.Context, req md.AgentQualificationEnterp func AgentQualificationContactInfo(c *gin.Context, req md.AgentQualificationEnterpriseReq) md.AgentQualificationContactRes { engine := db.Db agentListDb := implement.NewAgentContactInfoDb(engine) - agentList, total, _ := agentListDb.FindAgentContactInfoList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + agentList, total, _ := agentListDb.FindAgentContactInfoList(c.GetString("mid"), req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.AgentQualificationContactData, 0) if agentList != nil { + NewAgentDb := implement2.NewAgentDb(MasterDb(c)) for _, v := range agentList { tmp := md.AgentQualificationContactData{ Id: utils.IntToStr(v.AgentContactInfo.Id), @@ -179,6 +190,11 @@ func AgentQualificationContactInfo(c *gin.Context, req md.AgentQualificationEnte Phone: v.AgentContactInfo.Phone, Address: v.AgentContactInfo.Address, } + + agent := NewAgentDb.GetSuperAdmin(v.AgentContactInfo.AgentId) + if agent != nil { + tmp.Account = agent.Username + } list = append(list, tmp) } } diff --git a/app/svc/svc_applet_application.go b/app/svc/svc_applet_application.go new file mode 100644 index 0000000..87a6423 --- /dev/null +++ b/app/svc/svc_applet_application.go @@ -0,0 +1,231 @@ +package svc + +import ( + "applet/app/e" + "applet/app/lib/validate" + "applet/app/lib/wechat" + "applet/app/lib/wechat/enum" + "applet/app/md" + "applet/app/utils" + db "code.fnuoos.com/zhimeng/model.git/src" + "code.fnuoos.com/zhimeng/model.git/src/implement" + "code.fnuoos.com/zhimeng/model.git/src/model" + implement2 "code.fnuoos.com/zhimeng/model.git/src/super/implement" + "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" + "strings" +) + +func AppletApplicationMediumList(c *gin.Context) { + var req md.AppletApplicationMediumListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := MasterDb(c) + NewMediumDb := implement.NewMediumDb(engine) + + list, total, _ := NewMediumDb.FindSuperAdmin(req.Account, req.Name, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data := make([]md.AppletApplicationMediumListData, 0) + if len(list) > 0 { + for _, v := range list { + var tmp = md.AppletApplicationMediumListData{ + Id: utils.IntToStr(v.Id), + MediumId: utils.IntToStr(v.MediumId), + Name: v.Memo, + Account: v.Username, + ContactName: "", + Phone: "", + Count: "", + } + NewMediumContactInfoDb := implement2.NewMediumContactInfoDb(db.Db) + infoList, _ := NewMediumContactInfoDb.GetMediumContactInfoList(v.MediumId) + if infoList != nil { + tmp.ContactName = infoList.Name + tmp.Phone = infoList.Phone + } + count, _ := engine.Where("medium_id=?", v.MediumId).Count(&model.AppletApplication{}) + tmp.Count = utils.Int64ToStr(count) + data = append(data, tmp) + } + } + res := md.AppletApplicationMediumListRes{ + List: data, + Total: total, + } + e.OutSuc(c, res, nil) + return +} +func AppletApplicationList(c *gin.Context) { + var req md.AppletApplicationListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := MasterDb(c) + NewAppletApplicationDb := implement.NewAppletApplicationDb(engine) + state := make([]string, 0) + if req.CooperateState != "" { + if req.CooperateState == "0" { + state = []string{"0", "1"} + } else { + state = []string{req.CooperateState} + } + } + appletApplicationList, total, _ := NewAppletApplicationDb.FindAppletApplicationList(req.Name, req.Platform, state, utils.StrToInt(req.MediumId), utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data := make([]md.AppletApplicationListData, 0) + if len(appletApplicationList) > 0 { + for _, v := range appletApplicationList { + var tmp md.AppletApplicationListData + copier.Copy(&tmp, &v) + tmp.Id = utils.IntToStr(v.Id) + tmp.State = utils.IntToStr(v.State) + if v.State == 1 { + v.State = 0 + } + tmp.CooperateState = utils.IntToStr(v.State) + data = append(data, tmp) + } + } + res := md.AppletApplicationListRes{ + List: data, + Total: total, + Platform: []md.SelectData{ + { + Name: "微信小程序", + Value: "wx_applet", + }, + }, + State: []md.SelectData{ + { + Name: "待审核", + Value: "0", + }, + { + Name: "审核中", + Value: "1", + }, + { + Name: "审核通过", + Value: "2", + }, + { + Name: "审核拒绝", + Value: "3", + }, + { + Name: "封禁中", + Value: "4", + }, + }, + CooperateState: []md.SelectData{ + { + Name: "未运行", + Value: "0", + }, + { + Name: "运行中", + Value: "2", + }, + { + Name: "审核拒绝", + Value: "3", + }, + { + Name: "封禁中", + Value: "4", + }, + }, + } + e.OutSuc(c, res, nil) + return +} +func AppletApplicationAudit(c *gin.Context) { + var req md.AppletApplicationSaveReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + NewAppletApplicationDb := implement.NewAppletApplicationDb(MasterDb(c)) + list, _ := NewAppletApplicationDb.FindAppletApplicationListByIds(strings.Split(req.Id, ",")) + if list != nil { + masterId := GetMasterId(c) + wxOpenThirdPartyAppListDb := implement2.NewWxOpenThirdPartyAppListDb(db.Db) + wxOpenThirdPartyAppList, err := wxOpenThirdPartyAppListDb.GetWxOpenThirdPartyAppList(utils.StrToInt(masterId)) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + if wxOpenThirdPartyAppList == nil { + e.OutErr(c, e.ERR_NOT_FAN, "未查询到对应三方应用记录") + return + } + wxApiService, err := wechat.NewWxApiService(masterId, wxOpenThirdPartyAppList.Appid, wxOpenThirdPartyAppList.AppSecret) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + userWxAppletListDb := implement2.NewUserWxAppletListDb(db.Db) + userWxAppletList, _ := userWxAppletListDb.GetUserWxAppletList(c.GetString("mid")) + appId := "" + if userWxAppletList != nil { + appId = userWxAppletList.Appid + } + for _, v := range *list { + v.State = utils.StrToInt(req.State) + v.Memo = req.Memo + err := changeWx(c, wxApiService, appId, v.State, v.MediumId) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + MasterDb(c).Where("id=?", v.Id).Cols("state,memo").Update(&v) + } + } + e.OutSuc(c, "success", nil) + return +} +func changeWx(c *gin.Context, wxApiService wechat.WxApiService, appId string, state, mediumId int) error { + if state != 2 && state != 4 { + return nil + } + NewAppletApplicationAdSpaceListDb := implement.NewAppletApplicationAdSpaceListDb(MasterDb(c)) + list, _ := NewAppletApplicationAdSpaceListDb.FindAppletApplicationAdSpaceListByMediumId(mediumId) + if list != nil { + for _, v := range *list { //全部恢复 全部封禁 + if v.State != 2 && v.State != 4 { + continue + } + if v.AppId != "" { + onOff := "" + if state == 4 { //禁用 + onOff = enum.AdunitStatusForOff + v.UseState = 2 + v.State = 3 + } + if state == 2 { //恢复 + onOff = enum.AdunitStatusForOn + v.UseState = 1 + v.State = 1 + } + if onOff != "" && v.AdId != "" && appId != "" { + err := wxApiService.AgencyUpdateAdunit(appId, v.AdId, v.Name, enum.AdunitType(v.Kind), enum.AdunitStatus(onOff)) + if err != nil { + return err + } + } + MasterDb(c).Where("id=?", v.Id).Cols("state,use_state").Update(&v) + } + } + } + return nil +} diff --git a/app/svc/svc_applet_application_ad_space.go b/app/svc/svc_applet_application_ad_space.go new file mode 100644 index 0000000..85d453a --- /dev/null +++ b/app/svc/svc_applet_application_ad_space.go @@ -0,0 +1,217 @@ +package svc + +import ( + "applet/app/e" + "applet/app/lib/validate" + "applet/app/lib/wechat" + "applet/app/lib/wechat/enum" + "applet/app/md" + "applet/app/utils" + db "code.fnuoos.com/zhimeng/model.git/src" + "code.fnuoos.com/zhimeng/model.git/src/implement" + "code.fnuoos.com/zhimeng/model.git/src/model" + implement2 "code.fnuoos.com/zhimeng/model.git/src/super/implement" + "github.com/gin-gonic/gin" + "strings" +) + +func AppletApplicationAdSpaceMediumList(c *gin.Context) { + var req md.AppletApplicationAdSpaceMediumListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := MasterDb(c) + NewMediumDb := implement.NewMediumDb(engine) + + list, total, _ := NewMediumDb.FindSuperAdmin(req.Account, req.Name, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data := make([]md.AppletApplicationAdSpaceMediumListData, 0) + if len(list) > 0 { + for _, v := range list { + var tmp = md.AppletApplicationAdSpaceMediumListData{ + Id: utils.IntToStr(v.Id), + MediumId: utils.IntToStr(v.MediumId), + Name: v.Memo, + Account: v.Username, + ContactName: "", + Phone: "", + Count: "", + } + NewMediumContactInfoDb := implement2.NewMediumContactInfoDb(engine) + infoList, _ := NewMediumContactInfoDb.GetMediumContactInfoList(v.MediumId) + if infoList != nil { + tmp.ContactName = infoList.Name + tmp.Phone = infoList.Phone + } + count, _ := engine.Where("medium_id=?", v.MediumId).Count(&model.AppletApplicationAdSpaceList{}) + tmp.Count = utils.Int64ToStr(count) + data = append(data, tmp) + } + } + res := md.AppletApplicationAdSpaceMediumListRes{ + List: data, + Total: total, + } + e.OutSuc(c, res, nil) + return +} + +func AppletApplicationAdSpaceList(c *gin.Context) { + var req md.AppletApplicationAdSpaceListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := MasterDb(c) + NewAppletApplicationDb := implement.NewAppletApplicationAdSpaceListDb(engine) + appletApplicationList, total, _ := NewAppletApplicationDb.FindAppletApplicationAdSpaceList(req.Name, req.Platform, req.CooperateState, utils.StrToInt(req.MediumId), utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data := make([]md.AppletApplicationAdSpaceListData, 0) + if len(appletApplicationList) > 0 { + for _, v := range appletApplicationList { + var tmp = md.AppletApplicationAdSpaceListData{ + Id: utils.IntToStr(v.AppletApplicationAdSpaceList.Id), + Name: v.AppletApplicationAdSpaceList.Name, + Platform: v.Platform, + Kind: v.Kind, + Memo: v.AppletApplicationAdSpaceList.Memo, + Logo: v.Logo, + AppId: v.AppletApplicationAdSpaceList.AppId, + AdId: v.AppletApplicationAdSpaceList.AdId, + State: utils.IntToStr(v.AppletApplicationAdSpaceList.State), + CooperateState: utils.IntToStr(v.AppletApplicationAdSpaceList.State), + } + data = append(data, tmp) + } + } + res := md.AppletApplicationAdSpaceListRes{ + List: data, + Total: total, + AdType: []md.SelectData{ + {Name: "banner", Value: enum.AdunitTypeForBanner}, + {Name: "激励视频", Value: enum.AdunitTypeForRewardVideo}, + {Name: "插屏广告", Value: enum.AdunitTypeForInterstitial}, + {Name: "视频广告", Value: enum.AdunitTypeForVideoFeeds}, + //{Name: "视频贴片广告", Value: "5"}, + }, + Platform: []md.SelectData{ + { + Name: "微信小程序", + Value: "wx_applet", + }, + }, + State: []md.SelectData{ + { + Name: "待审核", + Value: "0", + }, + { + Name: "审核通过", + Value: "1", + }, + { + Name: "审核拒绝", + Value: "2", + }, + { + Name: "封禁中", + Value: "3", + }, + }, + CooperateState: []md.SelectData{ + { + Name: "未运行", + Value: "0", + }, + { + Name: "运行中", + Value: "1", + }, + { + Name: "审核拒绝", + Value: "2", + }, + { + Name: "封禁中", + Value: "3", + }, + }, + } + e.OutSuc(c, res, nil) + return +} +func AppletApplicationAdSpaceAudit(c *gin.Context) { + var req md.AppletApplicationAdSpaceSaveReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + masterId := GetMasterId(c) + wxOpenThirdPartyAppListDb := implement2.NewWxOpenThirdPartyAppListDb(db.Db) + wxOpenThirdPartyAppList, err := wxOpenThirdPartyAppListDb.GetWxOpenThirdPartyAppList(utils.StrToInt(masterId)) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + if wxOpenThirdPartyAppList == nil { + e.OutErr(c, e.ERR_NOT_FAN, "未查询到对应三方应用记录") + return + } + wxApiService, err := wechat.NewWxApiService(masterId, wxOpenThirdPartyAppList.Appid, wxOpenThirdPartyAppList.AppSecret) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + userWxAppletListDb := implement2.NewUserWxAppletListDb(db.Db) + userWxAppletList, _ := userWxAppletListDb.GetUserWxAppletList(c.GetString("mid")) + appId := "" + if userWxAppletList != nil { + appId = userWxAppletList.Appid + } + NewAppletApplicationAdSpaceListDb := implement.NewAppletApplicationAdSpaceListDb(MasterDb(c)) + list, _ := NewAppletApplicationAdSpaceListDb.FindAppletApplicationAdSpaceListByIds(strings.Split(req.Id, ",")) + if list != nil { + + for _, v := range *list { + v.State = utils.StrToInt(req.State) + v.Memo = req.Memo + if v.AdId == "" && v.State == 1 && appId != "" { + err, v.AdId = wxApiService.AgencyCreateAdunit(appId, v.Name, enum.AdunitType(v.Kind)) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + v.UseState = 1 + } + if v.AppId != "" { + onOff := "" + if v.State == 3 && v.UseState != 2 { //禁用 + onOff = enum.AdunitStatusForOff + v.UseState = 2 + } + if v.State == 1 && v.UseState == 2 { //恢复 + onOff = enum.AdunitStatusForOn + v.UseState = 1 + } + if onOff != "" && v.AdId != "" && appId != "" { + err = wxApiService.AgencyUpdateAdunit(appId, v.AdId, v.Name, enum.AdunitType(v.Kind), enum.AdunitStatus(onOff)) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + } + } + MasterDb(c).Where("id=?", v.Id).Cols("state,memo,ad_id,use_state").Update(&v) + } + } + e.OutSuc(c, "success", nil) + return +} diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go new file mode 100644 index 0000000..e85d0de --- /dev/null +++ b/app/svc/svc_medium_agent.go @@ -0,0 +1,156 @@ +package svc + +import ( + "applet/app/e" + "applet/app/lib/validate" + "applet/app/md" + "applet/app/utils" + db "code.fnuoos.com/zhimeng/model.git/src" + implement2 "code.fnuoos.com/zhimeng/model.git/src/implement" + "code.fnuoos.com/zhimeng/model.git/src/super/implement" + "code.fnuoos.com/zhimeng/model.git/src/super/model" + "github.com/gin-gonic/gin" + "strings" + "time" +) + +func AgentBindMediumList(c *gin.Context) { //代理 查旗下 媒体 + var req md.MediumListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + agentWithMediumDb := implement.NewAgentWithMediumDb(engine) + data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, utils.StrToInt(req.Id), 0, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + + list := make([]md.MediumListData, 0) + NewMediumDb := implement2.NewMediumDb(MasterDb(c)) + + if data != nil { + for _, v := range data { + tmp := md.MediumListData{ + Id: utils.IntToStr(v.AgentWithMedium.Id), + MediumId: utils.IntToStr(v.AgentWithMedium.MediumId), + CompanyName: v.MediumList.CompanyName, + UnifiedSocialCreditCode: v.MediumList.UnifiedSocialCreditCode, + State: utils.IntToStr(v.MediumList.State), + Memo: v.MediumList.Memo, + LegalRepresentative: v.MediumList.LegalRepresentative, + BusinessLicenseAddress: v.MediumList.BusinessLicenseAddress, + } + medium := NewMediumDb.GetSuperAdmin(v.AgentWithMedium.MediumId) + if medium != nil { + tmp.Account = medium.Username + } + list = append(list, tmp) + } + } + res := md.MediumListRes{ + List: list, + Total: total, + State: []md.SelectData{ + {Name: "待提交", Value: "0"}, + {Name: "待审核", Value: "1"}, + {Name: "审核通过", Value: "2"}, + {Name: "审核拒绝", Value: "3"}, + }, + } + e.OutSuc(c, res, nil) + return +} +func MediumBindAgentList(c *gin.Context) { + var req md.MediumListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + agentWithMediumDb := implement.NewAgentWithMediumDb(engine) + data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, 0, utils.StrToInt(req.Id), utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + + list := make([]md.MediumListData, 0) + NewAgentDb := implement2.NewAgentDb(MasterDb(c)) + + if data != nil { + for _, v := range data { + tmp := md.MediumListData{ + Id: utils.IntToStr(v.AgentWithMedium.Id), + MediumId: utils.IntToStr(v.AgentWithMedium.AgentId), + CompanyName: v.AgentList.CompanyName, + UnifiedSocialCreditCode: v.AgentList.UnifiedSocialCreditCode, + State: utils.IntToStr(v.AgentList.State), + Memo: v.AgentList.Memo, + LegalRepresentative: v.AgentList.LegalRepresentative, + BusinessLicenseAddress: v.AgentList.BusinessLicenseAddress, + } + agent := NewAgentDb.GetSuperAdmin(v.AgentWithMedium.AgentId) + if agent != nil { + tmp.Account = agent.Username + } + list = append(list, tmp) + } + } + res := md.MediumListRes{ + List: list, + Total: total, + State: []md.SelectData{ + {Name: "待提交", Value: "0"}, + {Name: "待审核", Value: "1"}, + {Name: "审核通过", Value: "2"}, + {Name: "审核拒绝", Value: "3"}, + }, + } + e.OutSuc(c, res, nil) + return +} +func MediumBindAgentSave(c *gin.Context) { + var req md.MediumListSaveReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + agentDb := implement2.NewAgentDb(MasterDb(c)) + username, _ := agentDb.GetSuperAgentByUsername(req.Username) + if username == nil { + e.OutErr(c, 400, e.NewErr(400, "渠道代理不存在")) + return + } + mediumDb := implement.NewAgentWithMediumDb(db.Db) + data := mediumDb.GetAgentWithMediumByMediumIdAndAgentId(utils.StrToInt(req.MediumId), username.AgentId) + if data != nil { + e.OutErr(c, 400, e.NewErr(400, "已绑定过该渠道代理")) + return + } + var tmp = model.AgentWithMedium{ + AgentId: username.AgentId, + MediumId: utils.StrToInt(req.MediumId), + CreateAt: time.Now(), + UpdateAt: time.Now(), + } + db.Db.InsertOne(&tmp) + e.OutSuc(c, "success", nil) + return +} +func MediumBindAgentDel(c *gin.Context) { + var req md.MediumListDelReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + db.Db.In("id", strings.Split(req.Id, ",")).Delete(&model.AgentWithMedium{}) + e.OutSuc(c, "success", nil) + return +} diff --git a/app/svc/svc_medium_qualification.go b/app/svc/svc_medium_qualification.go index 14d4c45..7772d80 100644 --- a/app/svc/svc_medium_qualification.go +++ b/app/svc/svc_medium_qualification.go @@ -6,18 +6,20 @@ import ( "applet/app/md" "applet/app/utils" db "code.fnuoos.com/zhimeng/model.git/src" + implement2 "code.fnuoos.com/zhimeng/model.git/src/implement" "code.fnuoos.com/zhimeng/model.git/src/super/implement" "github.com/gin-gonic/gin" "github.com/jinzhu/copier" ) -func MediumQualificationEnterprise(c *gin.Context, req md.MediumQualificationEnterpriseReq) md.MediumQualificationEnterpriseRes { +func MediumQualificationEnterprise(c *gin.Context, minState int, req md.MediumQualificationEnterpriseReq) md.MediumQualificationEnterpriseRes { engine := db.Db MediumListDb := implement.NewMediumListDb(engine) - MediumList, total, _ := MediumListDb.FindMediumList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + MediumList, total, _ := MediumListDb.FindMediumList(c.GetString("mid"), req.Name, req.State, minState, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) data := make([]md.MediumQualificationEnterpriseData, 0) if len(MediumList) > 0 { + NewMediumDb := implement2.NewMediumDb(MasterDb(c)) for _, v := range MediumList { var tmp md.MediumQualificationEnterpriseData copier.Copy(&tmp, &v) @@ -33,6 +35,10 @@ func MediumQualificationEnterprise(c *gin.Context, req md.MediumQualificationEnt tmp.RegisteredAddressCityId = utils.IntToStr(v.RegisteredAddressCityId) tmp.RegisteredAddressCountyId = utils.IntToStr(v.RegisteredAddressCountyId) tmp.State = utils.IntToStr(v.State) + medium := NewMediumDb.GetSuperAdmin(v.MediumId) + if medium != nil { + tmp.Account = medium.Username + } data = append(data, tmp) } } @@ -86,10 +92,11 @@ func MediumQualificationEnterpriseAudit(c *gin.Context, req md.MediumQualificati func MediumQualificationBank(c *gin.Context, req md.MediumQualificationEnterpriseReq) md.MediumQualificationBankRes { engine := db.Db MediumListDb := implement.NewMediumBankInfoDb(engine) - MediumList, total, _ := MediumListDb.FindMediumBankInfoList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + MediumList, total, _ := MediumListDb.FindMediumBankInfoList(c.GetString("mid"), req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.MediumQualificationBankData, 0) if MediumList != nil { + NewMediumDb := implement2.NewMediumDb(MasterDb(c)) for _, v := range MediumList { tmp := md.MediumQualificationBankData{ Id: utils.IntToStr(v.MediumBankInfo.Id), @@ -105,6 +112,11 @@ func MediumQualificationBank(c *gin.Context, req md.MediumQualificationEnterpris BankNo: v.BankNo, Licence: v.Licence, } + + medium := NewMediumDb.GetSuperAdmin(v.MediumBankInfo.MediumId) + if medium != nil { + tmp.Account = medium.Username + } list = append(list, tmp) } } @@ -163,10 +175,11 @@ func MediumQualificationContactInfo(c *gin.Context, req md.MediumQualificationEn engine := db.Db MediumListDb := implement.NewMediumContactInfoDb(engine) - MediumList, total, _ := MediumListDb.FindMediumContactInfoList(req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + MediumList, total, _ := MediumListDb.FindMediumContactInfoList(c.GetString("mid"), req.Name, req.State, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.MediumQualificationContactData, 0) if MediumList != nil { + NewMediumDb := implement2.NewMediumDb(MasterDb(c)) for _, v := range MediumList { tmp := md.MediumQualificationContactData{ Id: utils.IntToStr(v.MediumContactInfo.Id), @@ -180,6 +193,10 @@ func MediumQualificationContactInfo(c *gin.Context, req md.MediumQualificationEn Phone: v.MediumContactInfo.Phone, Address: v.MediumContactInfo.Address, } + medium := NewMediumDb.GetSuperAdmin(v.MediumContactInfo.MediumId) + if medium != nil { + tmp.Account = medium.Username + } list = append(list, tmp) } } diff --git a/app/svc/svc_sys_cfg_get.go b/app/svc/svc_sys_cfg_get.go deleted file mode 100644 index 060a84b..0000000 --- a/app/svc/svc_sys_cfg_get.go +++ /dev/null @@ -1,78 +0,0 @@ -package svc - -import ( - "applet/app/db/implement" - db "code.fnuoos.com/zhimeng/model.git/src" - "github.com/gin-gonic/gin" - "xorm.io/xorm" - - "applet/app/md" - "applet/app/utils/cache" -) - -// 单挑记录获取 -func SysCfgGet(c *gin.Context, key string) string { - masterId := GetMasterId(c) - eg := db.DBs[masterId] - sysCfgDb := implement.NewSysCfgDb(eg, masterId) - return sysCfgDb.SysCfgGetWithDb(key) -} - -// 多条记录获取 -func SysCfgFind(c *gin.Context, keys ...string) map[string]string { - var masterId string - if c == nil { - masterId = "" - } else { - masterId = GetMasterId(c) - } - tmp := SysCfgFindComm(masterId, keys...) - return tmp -} -func SysCfgFindComm(masterId string, keys ...string) map[string]string { - var eg *xorm.Engine - if masterId == "" { - eg = db.Db - } else { - eg = db.DBs[masterId] - } - res := map[string]string{} - //TODO::判断keys长度(大于10个直接查数据库) - sysCfgDb := implement.NewSysCfgDb(eg, masterId) - if len(keys) > 10 { - cfgList, _ := sysCfgDb.SysCfgGetAll() - if cfgList == nil { - return nil - } - for _, v := range *cfgList { - res[v.K] = v.V - } - } else { - for _, key := range keys { - res[key] = sysCfgDb.SysCfgGetWithDb(key) - } - } - return res -} - -// 清理系统配置信息 -func SysCfgCleanCache() { - cache.Del(md.KEY_SYS_CFG_CACHE) -} - -// 写入系统设置 -func SysCfgSet(c *gin.Context, key, val, memo string) bool { - masterId := GetMasterId(c) - eg := db.DBs[masterId] - sysCfgDb := implement.NewSysCfgDb(eg, masterId) - - cfg, err := sysCfgDb.SysCfgGetOne(key) - if err != nil || cfg == nil { - return sysCfgDb.SysCfgInsert(key, val, memo) - } - if memo != "" && cfg.Memo != memo { - cfg.Memo = memo - } - SysCfgCleanCache() - return sysCfgDb.SysCfgUpdate(key, val) -} diff --git a/docs/docs.go b/docs/docs.go index a18802a..691a490 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -347,21 +347,9 @@ const docTemplate = `{ } } }, - "/api/mediumQualification/bank": { - "post": { - "responses": { - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/mediumQualification/bank/audit": { + "/api/mediumCenter/agent/bind/medium/list": { "post": { - "description": "媒体资质-银行资质审核", + "description": "媒体中心-代理绑定媒体列表", "consumes": [ "application/json" ], @@ -369,9 +357,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "银行资质审核", + "summary": "代理绑定媒体列表", "parameters": [ { "type": "string", @@ -386,15 +374,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.MediumListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumListRes" } }, "400": { @@ -406,9 +394,9 @@ const docTemplate = `{ } } }, - "/api/mediumQualification/contact": { + "/api/mediumCenter/agent/list": { "post": { - "description": "媒体资质-联系方式", + "description": "媒体中心-代理列表", "consumes": [ "application/json" ], @@ -416,9 +404,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "联系方式", + "summary": "代理列表", "parameters": [ { "type": "string", @@ -433,15 +421,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + "$ref": "#/definitions/md.AgentQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "具体看返回内容 这是data里面的数据", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "$ref": "#/definitions/md.MediumQualificationContactRes" + "$ref": "#/definitions/md.AgentQualificationEnterpriseRes" } }, "400": { @@ -453,9 +441,9 @@ const docTemplate = `{ } } }, - "/api/mediumQualification/contact/audit": { + "/api/mediumCenter/applet/application/ad/space/audit": { "post": { - "description": "媒体资质-联系方式审核", + "description": "小程序应用-广告位审核", "consumes": [ "application/json" ], @@ -463,9 +451,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "联系方式审核", + "summary": "广告位审核", "parameters": [ { "type": "string", @@ -480,7 +468,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" } } ], @@ -500,9 +488,9 @@ const docTemplate = `{ } } }, - "/api/mediumQualification/enterprise": { + "/api/mediumCenter/applet/application/ad/space/list": { "post": { - "description": "媒体资质-主体资质", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -510,9 +498,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "主体资质", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -527,15 +515,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListReq" } } ], "responses": { "200": { - "description": "具体看返回内容 这是data里面的数据", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListRes" } }, "400": { @@ -547,9 +535,9 @@ const docTemplate = `{ } } }, - "/api/mediumQualification/enterprise/audit": { + "/api/mediumCenter/applet/application/ad/space/save": { "post": { - "description": "媒体资质-主体资质审核", + "description": "小程序应用-广告位列表", "consumes": [ "application/json" ], @@ -557,9 +545,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "主体资质审核", + "summary": "广告位列表", "parameters": [ { "type": "string", @@ -574,15 +562,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListRes" } }, "400": { @@ -594,9 +582,9 @@ const docTemplate = `{ } } }, - "/api/registerForAgent": { + "/api/mediumCenter/applet/application/audit": { "post": { - "description": "注册模块-渠道代理注册", + "description": "小程序应用-审核", "consumes": [ "application/json" ], @@ -604,23 +592,30 @@ const docTemplate = `{ "application/json" ], "tags": [ - "注册模块" + "媒体中心------嘉俊" ], - "summary": "渠道代理注册", + "summary": "审核", "parameters": [ { - "description": "用户名密码", - "name": "req", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RegisterForAgentReq" + "$ref": "#/definitions/md.AppletApplicationSaveReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -634,9 +629,9 @@ const docTemplate = `{ } } }, - "/api/registerForMedium": { + "/api/mediumCenter/applet/application/list": { "post": { - "description": "注册模块-媒体注册", + "description": "小程序应用-列表数据", "consumes": [ "application/json" ], @@ -644,25 +639,32 @@ const docTemplate = `{ "application/json" ], "tags": [ - "注册模块" + "媒体中心------嘉俊" ], - "summary": "媒体注册", + "summary": "应用列表", "parameters": [ { - "description": "用户名密码", - "name": "req", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RegisterForMediumReq" + "$ref": "#/definitions/md.AppletApplicationListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationListRes" } }, "400": { @@ -674,9 +676,9 @@ const docTemplate = `{ } } }, - "/api/role/addAdmin": { + "/api/mediumCenter/applet/application/medium/list": { "post": { - "description": "权限管理-新增管理员", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -684,9 +686,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "新增管理员", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -701,15 +703,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddAdminReq" + "$ref": "#/definitions/md.AppletApplicationMediumListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationMediumListRes" } }, "400": { @@ -721,9 +723,9 @@ const docTemplate = `{ } } }, - "/api/role/addRole": { + "/api/mediumCenter/medium/bind/agent/del": { "post": { - "description": "权限管理-添加角色", + "description": "媒体中心-媒体绑定代理删除", "consumes": [ "application/json" ], @@ -731,9 +733,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "添加角色", + "summary": "媒体绑定代理删除", "parameters": [ { "type": "string", @@ -748,13 +750,13 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddRoleReq" + "$ref": "#/definitions/md.MediumListDelReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 ", "schema": { "type": "string" } @@ -768,9 +770,9 @@ const docTemplate = `{ } } }, - "/api/role/adminInfo": { - "get": { - "description": "权限管理-管理员信息", + "/api/mediumCenter/medium/bind/agent/list": { + "post": { + "description": "媒体中心-媒体绑定代理列表", "consumes": [ "application/json" ], @@ -778,9 +780,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员信息", + "summary": "媒体绑定代理列表", "parameters": [ { "type": "string", @@ -790,18 +792,20 @@ const docTemplate = `{ "required": true }, { - "type": "string", - "description": "管理员id", - "name": "adm_id", - "in": "query", - "required": true + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumListReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumListRes" } }, "400": { @@ -813,9 +817,9 @@ const docTemplate = `{ } } }, - "/api/role/adminList": { + "/api/mediumCenter/medium/bind/agent/save": { "post": { - "description": "权限管理-管理员列表", + "description": "媒体中心-媒体绑定代理操作", "consumes": [ "application/json" ], @@ -823,9 +827,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员列表", + "summary": "媒体绑定代理操作", "parameters": [ { "type": "string", @@ -840,13 +844,13 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdminListReq" + "$ref": "#/definitions/md.MediumListSaveReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 ", "schema": { "type": "string" } @@ -860,9 +864,9 @@ const docTemplate = `{ } } }, - "/api/role/bindAdminRole/": { + "/api/mediumCenter/medium/list": { "post": { - "description": "权限管理-管理员绑定角色", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -870,9 +874,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员绑定角色", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -887,15 +891,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.BindAdminRoleReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" } }, "400": { @@ -907,9 +911,21 @@ const docTemplate = `{ } } }, - "/api/role/deleteAdmin/{$adm_id}": { - "delete": { - "description": "权限管理-删除管理员", + "/api/mediumQualification/bank": { + "post": { + "responses": { + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/mediumQualification/bank/audit": { + "post": { + "description": "媒体资质-银行资质审核", "consumes": [ "application/json" ], @@ -917,9 +933,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "删除管理员", + "summary": "银行资质审核", "parameters": [ { "type": "string", @@ -927,11 +943,20 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -945,9 +970,9 @@ const docTemplate = `{ } } }, - "/api/role/deleteRole/{$id}": { - "delete": { - "description": "权限管理-删除角色", + "/api/mediumQualification/contact": { + "post": { + "description": "媒体资质-联系方式", "consumes": [ "application/json" ], @@ -955,9 +980,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "删除角色", + "summary": "联系方式", "parameters": [ { "type": "string", @@ -972,15 +997,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleStateReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationContactRes" } }, "400": { @@ -992,9 +1017,9 @@ const docTemplate = `{ } } }, - "/api/role/roleBindPermissionGroup": { + "/api/mediumQualification/contact/audit": { "post": { - "description": "权限管理-角色绑定权限组", + "description": "媒体资质-联系方式审核", "consumes": [ "application/json" ], @@ -1002,9 +1027,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "角色绑定权限组", + "summary": "联系方式审核", "parameters": [ { "type": "string", @@ -1019,13 +1044,13 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RoleBindPermissionGroupReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1039,9 +1064,9 @@ const docTemplate = `{ } } }, - "/api/role/roleList": { - "get": { - "description": "权限管理-角色列表", + "/api/mediumQualification/enterprise": { + "post": { + "description": "媒体资质-主体资质", "consumes": [ "application/json" ], @@ -1049,9 +1074,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "角色列表", + "summary": "主体资质", "parameters": [ { "type": "string", @@ -1059,13 +1084,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" } }, "400": { @@ -1077,9 +1111,9 @@ const docTemplate = `{ } } }, - "/api/role/updateAdmin": { + "/api/mediumQualification/enterprise/audit": { "post": { - "description": "权限管理-修改管理员信息", + "description": "媒体资质-主体资质审核", "consumes": [ "application/json" ], @@ -1087,9 +1121,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "修改管理员信息", + "summary": "主体资质审核", "parameters": [ { "type": "string", @@ -1104,13 +1138,13 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateAdminReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1124,9 +1158,9 @@ const docTemplate = `{ } } }, - "/api/role/updateAdminState": { + "/api/registerForAgent": { "post": { - "description": "权限管理-修改管理员状态", + "description": "注册模块-渠道代理注册", "consumes": [ "application/json" ], @@ -1134,24 +1168,17 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "注册模块" ], - "summary": "修改管理员状态", + "summary": "渠道代理注册", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "请求参数", - "name": "args", + "description": "用户名密码", + "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateAdminStateReq" + "$ref": "#/definitions/md.RegisterForAgentReq" } } ], @@ -1171,9 +1198,9 @@ const docTemplate = `{ } } }, - "/api/role/updateRole": { + "/api/registerForMedium": { "post": { - "description": "权限管理-修改角色", + "description": "注册模块-媒体注册", "consumes": [ "application/json" ], @@ -1181,24 +1208,17 @@ const docTemplate = `{ "application/json" ], "tags": [ - "权限管理" + "注册模块" ], - "summary": "修改角色", + "summary": "媒体注册", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "请求参数", - "name": "args", + "description": "用户名密码", + "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleReq" + "$ref": "#/definitions/md.RegisterForMediumReq" } } ], @@ -1218,9 +1238,9 @@ const docTemplate = `{ } } }, - "/api/role/updateRoleState": { + "/api/role/addAdmin": { "post": { - "description": "权限管理-修改角色状态", + "description": "权限管理-新增管理员", "consumes": [ "application/json" ], @@ -1230,7 +1250,7 @@ const docTemplate = `{ "tags": [ "权限管理" ], - "summary": "修改角色状态", + "summary": "新增管理员", "parameters": [ { "type": "string", @@ -1245,7 +1265,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleStateReq" + "$ref": "#/definitions/md.AddAdminReq" } } ], @@ -1265,9 +1285,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/applet/add": { + "/api/role/addRole": { "post": { - "description": "小程序设置-新增", + "description": "权限管理-添加角色", "consumes": [ "application/json" ], @@ -1275,9 +1295,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "新增", + "summary": "添加角色", "parameters": [ { "type": "string", @@ -1292,7 +1312,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletAddReq" + "$ref": "#/definitions/md.AddRoleReq" } } ], @@ -1312,9 +1332,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/applet/authorize": { + "/api/role/adminInfo": { "get": { - "description": "设置中心-基础设置", + "description": "权限管理-管理员信息", "consumes": [ "application/json" ], @@ -1322,9 +1342,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心" + "权限管理" ], - "summary": "设置中心-基础设置-微信三方应用获取", + "summary": "管理员信息", "parameters": [ { "type": "string", @@ -1332,11 +1352,18 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true } ], "responses": { "200": { - "description": "微信授权界面url", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1350,9 +1377,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/applet/list": { - "get": { - "description": "小程序设置-列表", + "/api/role/adminList": { + "post": { + "description": "权限管理-管理员列表", "consumes": [ "application/json" ], @@ -1360,9 +1387,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "列表", + "summary": "管理员列表", "parameters": [ { "type": "string", @@ -1370,13 +1397,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AdminListReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/hdl.WxOpenThirdPartyAppList" + "type": "string" } }, "400": { @@ -1388,9 +1424,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/applet/unauthorized": { - "get": { - "description": "设置中心-基础设置", + "/api/role/bindAdminRole/": { + "post": { + "description": "权限管理-管理员绑定角色", "consumes": [ "application/json" ], @@ -1398,9 +1434,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心" + "权限管理" ], - "summary": "设置中心-基础设置-微信三方应用获取", + "summary": "管理员绑定角色", "parameters": [ { "type": "string", @@ -1408,6 +1444,15 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.BindAdminRoleReq" + } } ], "responses": { @@ -1426,9 +1471,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/applet/update": { - "post": { - "description": "小程序设置-更新", + "/api/role/deleteAdmin/{$adm_id}": { + "delete": { + "description": "权限管理-删除管理员", "consumes": [ "application/json" ], @@ -1436,9 +1481,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "更新", + "summary": "删除管理员", "parameters": [ { "type": "string", @@ -1446,15 +1491,6 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "请求参数", - "name": "args", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.AppletUpdateReq" - } } ], "responses": { @@ -1473,9 +1509,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/basic/getOss": { - "get": { - "description": "基础设置-oss获取", + "/api/role/deleteRole/{$id}": { + "delete": { + "description": "权限管理-删除角色", "consumes": [ "application/json" ], @@ -1483,9 +1519,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "oss获取", + "summary": "删除角色", "parameters": [ { "type": "string", @@ -1493,13 +1529,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "success", "schema": { - "$ref": "#/definitions/md.SetOssResp" + "type": "string" } }, "400": { @@ -1511,9 +1556,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/basic/setOss": { + "/api/role/roleBindPermissionGroup": { "post": { - "description": "基础设置-oss设置", + "description": "权限管理-角色绑定权限组", "consumes": [ "application/json" ], @@ -1521,9 +1566,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "oss设置", + "summary": "角色绑定权限组", "parameters": [ { "type": "string", @@ -1538,7 +1583,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.SetOssReq" + "$ref": "#/definitions/md.RoleBindPermissionGroupReq" } } ], @@ -1558,9 +1603,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/basic/wxOpenGet": { + "/api/role/roleList": { "get": { - "description": "基础设置-微信三方应用获取", + "description": "权限管理-角色列表", "consumes": [ "application/json" ], @@ -1568,9 +1613,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "微信三方应用获取", + "summary": "角色列表", "parameters": [ { "type": "string", @@ -1582,9 +1627,9 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.WxOpenGetResp" + "type": "string" } }, "400": { @@ -1596,9 +1641,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/basic/wxOpenSet": { + "/api/role/updateAdmin": { "post": { - "description": "基础设置-微信三方应用设置", + "description": "权限管理-修改管理员信息", "consumes": [ "application/json" ], @@ -1606,9 +1651,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "微信三方应用设置", + "summary": "修改管理员信息", "parameters": [ { "type": "string", @@ -1623,7 +1668,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.WxOpenSetReq" + "$ref": "#/definitions/md.UpdateAdminReq" } } ], @@ -1643,9 +1688,9 @@ const docTemplate = `{ } } }, - "/api/setCenter/share/index": { - "get": { - "description": "邀请链接界面接口", + "/api/role/updateAdminState": { + "post": { + "description": "权限管理-修改管理员状态", "consumes": [ "application/json" ], @@ -1653,9 +1698,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-邀请链接" + "权限管理" ], - "summary": "邀请链接", + "summary": "修改管理员状态", "parameters": [ { "type": "string", @@ -1663,13 +1708,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateAdminStateReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "success", "schema": { - "$ref": "#/definitions/md.ShareIndexResp" + "type": "string" } }, "400": { @@ -1681,9 +1735,9 @@ const docTemplate = `{ } } }, - "/role/permissionGroupList": { - "get": { - "description": "权限管理-权限组列表", + "/api/role/updateRole": { + "post": { + "description": "权限管理-修改角色", "consumes": [ "application/json" ], @@ -1693,7 +1747,7 @@ const docTemplate = `{ "tags": [ "权限管理" ], - "summary": "权限组列表", + "summary": "修改角色", "parameters": [ { "type": "string", @@ -1703,16 +1757,18 @@ const docTemplate = `{ "required": true }, { - "type": "string", - "description": "管理员id", - "name": "adm_id", - "in": "query", - "required": true + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "success", "schema": { "type": "string" } @@ -1726,9 +1782,9 @@ const docTemplate = `{ } } }, - "/v1/banner/delete/{$id}": { - "delete": { - "description": "小程序设置-删除", + "/api/role/updateRoleState": { + "post": { + "description": "权限管理-修改角色状态", "consumes": [ "application/json" ], @@ -1736,9 +1792,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "删除", + "summary": "修改角色状态", "parameters": [ { "type": "string", @@ -1746,6 +1802,15 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } } ], "responses": { @@ -1763,31 +1828,615 @@ const docTemplate = `{ } } } - } - }, - "definitions": { - "hdl.WxOpenThirdPartyAppList": { - "type": "object", - "properties": { - "aes_key": { - "type": "string" - }, - "app_secret": { - "type": "string" - }, - "appid": { - "type": "string" - }, - "component_access_token": { - "type": "string" - }, - "component_verify_ticket": { - "type": "string" - }, - "create_at": { - "type": "string" - }, - "id": { + }, + "/api/setCenter/applet/add": { + "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.AppletAddReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/authorize": { + "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": "微信授权界面url", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/list": { + "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": "OK", + "schema": { + "$ref": "#/definitions/hdl.WxOpenThirdPartyAppList" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/unauthorized": { + "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": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/update": { + "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.AppletUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/getMob": { + "get": { + "description": "基础设置-mob获取", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "mob获取", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/md.SetOssResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/getOss": { + "get": { + "description": "基础设置-oss获取", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "oss获取", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/md.SetOssResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/setMob": { + "post": { + "description": "基础设置-mob设置", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "mob设置", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.SetMobReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/setOss": { + "post": { + "description": "基础设置-oss设置", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "oss设置", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.SetOssReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/wxOpenGet": { + "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": "OK", + "schema": { + "$ref": "#/definitions/md.WxOpenGetResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/wxOpenSet": { + "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.WxOpenSetReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/share/index": { + "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": "OK", + "schema": { + "$ref": "#/definitions/md.ShareIndexResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/role/permissionGroupList": { + "get": { + "description": "权限管理-权限组列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "权限组列表", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/v1/banner/delete/{$id}": { + "delete": { + "description": "小程序设置-删除", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-小程序设置" + ], + "summary": "删除", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + } + }, + "definitions": { + "hdl.WxOpenThirdPartyAppList": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "app_secret": { + "type": "string" + }, + "appid": { + "type": "string" + }, + "component_access_token": { + "type": "string" + }, + "component_verify_ticket": { + "type": "string" + }, + "create_at": { + "type": "string" + }, + "id": { "type": "integer" }, "token": { @@ -1819,81 +2468,293 @@ const docTemplate = `{ } } }, - "md.AddRoleReq": { + "md.AddRoleReq": { + "type": "object", + "required": [ + "memo", + "name" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "md.AdminListReq": { + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "state": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + }, + "md.AgentQualificationBankData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "账号" + }, + "agent_id": { + "type": "string", + "example": "代理id" + }, + "bank": { + "type": "string", + "example": "开户银行" + }, + "bank_branch": { + "type": "string", + "example": "开户银行分行" + }, + "bank_no": { + "type": "string", + "example": "银行卡号" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "currency_conf": { + "type": "string", + "example": "结算币种 0人民币" + }, + "id": { + "type": "string", + "example": "id" + }, + "kind": { + "type": "string", + "example": "类型(1:企业 2:个人)" + }, + "licence": { + "type": "string", + "example": "开户许可证" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + }, + "unified_social_credit_code": { + "type": "string", + "example": "统一社会信用代码" + } + } + }, + "md.AgentQualificationBankRes": { + "type": "object", + "properties": { + "currency_conf": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AgentQualificationBankData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + }, + "type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + } + } + }, + "md.AgentQualificationContactData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "账号" + }, + "address": { + "type": "string", + "example": "联系地址" + }, + "agent_id": { + "type": "string", + "example": "代理id" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "email": { + "type": "string", + "example": "邮箱地址" + }, + "id": { + "type": "string", + "example": "id" + }, + "kind": { + "type": "string", + "example": "类型(1:企业 2:个人)" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "name": { + "type": "string", + "example": "联系人" + }, + "phone": { + "type": "string", + "example": "联系电话" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + } + } + }, + "md.AgentQualificationContactRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AgentQualificationContactData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AgentQualificationEnterpriseAuditReq": { "type": "object", - "required": [ - "memo", - "name" - ], "properties": { - "memo": { + "agent_id": { "type": "string" }, - "name": { + "memo": { "type": "string" - } - } - }, - "md.AdminListReq": { - "type": "object", - "properties": { - "limit": { - "type": "integer" - }, - "page": { - "type": "integer" }, "state": { - "type": "integer" - }, - "username": { "type": "string" } } }, - "md.AgentQualificationBankData": { + "md.AgentQualificationEnterpriseData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "agent_id": { "type": "string", "example": "代理id" }, - "bank": { + "business_license_address": { "type": "string", - "example": "开户银行" + "example": "营业执照地址" }, - "bank_branch": { + "business_license_img_url": { "type": "string", - "example": "开户银行分行" + "example": "营业执照照片" }, - "bank_no": { + "certificate_first_type": { "type": "string", - "example": "银行卡号" + "example": "证件类型 1级类目id" + }, + "certificate_type": { + "type": "string", + "example": "证件类型 2级类目id" + }, + "certificate_validity": { + "type": "string", + "example": "证件有效期" + }, + "company_abbreviation": { + "type": "string", + "example": "公司简称" }, "company_name": { "type": "string", "example": "公司名称" }, - "currency_conf": { + "country_region": { "type": "string", - "example": "结算币种 0人民币" + "example": "国家地区" + }, + "country_region_id": { + "type": "string", + "example": "国家地区id" }, "id": { "type": "string", - "example": "id" + "example": "状态选择" }, "kind": { "type": "string", "example": "类型(1:企业 2:个人)" }, - "licence": { + "legal_representative": { "type": "string", - "example": "开户许可证" + "example": "法定代表人" }, "memo": { "type": "string", "example": "备注 审核时填写的" }, + "registered_address": { + "type": "string", + "example": "注册地址" + }, + "registered_address_city_id": { + "type": "string", + "example": "注册地址-市id" + }, + "registered_address_country_id": { + "type": "string", + "example": "注册地址-国家id" + }, + "registered_address_county_id": { + "type": "string", + "example": "注册地址-县/区id" + }, + "registered_address_province_id": { + "type": "string", + "example": "册地址-省份id" + }, "state": { "type": "string", "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" @@ -1901,22 +2762,37 @@ const docTemplate = `{ "unified_social_credit_code": { "type": "string", "example": "统一社会信用代码" + }, + "uuid": { + "type": "string", + "example": "站长id" } } }, - "md.AgentQualificationBankRes": { + "md.AgentQualificationEnterpriseReq": { "type": "object", "properties": { - "currency_conf": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" - } + "limit": { + "type": "string" + }, + "name": { + "type": "string" }, + "page": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "md.AgentQualificationEnterpriseRes": { + "type": "object", + "properties": { "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationBankData" + "$ref": "#/definitions/md.AgentQualificationEnterpriseData" } }, "state": { @@ -1936,24 +2812,47 @@ const docTemplate = `{ } } }, - "md.AgentQualificationContactData": { + "md.AppletAddReq": { "type": "object", + "required": [ + "appid", + "logo", + "name", + "original_id" + ], "properties": { - "address": { + "appid": { "type": "string", - "example": "联系地址" + "example": "授权小程序appid" }, - "agent_id": { + "logo": { "type": "string", - "example": "代理id" + "example": "小程序logo" }, - "company_name": { + "name": { "type": "string", - "example": "公司名称" + "example": "小程序名称" }, - "email": { + "original_id": { "type": "string", - "example": "邮箱地址" + "example": "授权小程序原始id" + } + } + }, + "md.AppletApplicationAdSpaceListData": { + "type": "object", + "properties": { + "ad_id": { + "type": "string", + "example": "广告位id" + }, + "app_id": { + "type": "string", + "example": "小程序appid" + }, + "cooperate_state": { + "type": "string", + "example": "合作状态" }, "id": { "type": "string", @@ -1961,33 +2860,80 @@ const docTemplate = `{ }, "kind": { "type": "string", - "example": "类型(1:企业 2:个人)" + "example": "广告位类型" + }, + "logo": { + "type": "string", + "example": "logo" }, "memo": { "type": "string", - "example": "备注 审核时填写的" + "example": "备注" }, "name": { "type": "string", - "example": "联系人" + "example": "应用名称" }, - "phone": { + "platform": { "type": "string", - "example": "联系电话" + "example": "平台" }, "state": { "type": "string", - "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + "example": "应用状态 state=2 才能再次编辑" } } }, - "md.AgentQualificationContactRes": { + "md.AppletApplicationAdSpaceListReq": { + "type": "object", + "properties": { + "cooperate_state": { + "type": "string", + "example": "合作状态" + }, + "limit": { + "type": "string" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "name": { + "type": "string" + }, + "page": { + "type": "string" + }, + "platform": { + "type": "string" + } + } + }, + "md.AppletApplicationAdSpaceListRes": { "type": "object", "properties": { + "ad_type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "cooperate_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationContactData" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListData" + } + }, + "platform": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" } }, "state": { @@ -2001,180 +2947,267 @@ const docTemplate = `{ } } }, - "md.AgentQualificationEnterpriseAuditReq": { + "md.AppletApplicationAdSpaceMediumListData": { "type": "object", "properties": { - "agent_id": { + "account": { + "type": "string", + "example": "账号" + }, + "contact_name": { + "type": "string", + "example": "联系人" + }, + "count": { + "type": "string", + "example": "广告位数量" + }, + "id": { + "type": "string", + "example": "id" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "name": { + "type": "string", + "example": "名称" + }, + "phone": { + "type": "string", + "example": "联系电话" + } + } + }, + "md.AppletApplicationAdSpaceMediumListReq": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, + "limit": { "type": "string" }, - "memo": { + "name": { + "type": "string", + "example": "媒体名称" + }, + "page": { "type": "string" + } + } + }, + "md.AppletApplicationAdSpaceMediumListRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AppletApplicationAdSpaceSaveReq": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "id 多个逗号隔开" + }, + "memo": { + "type": "string", + "example": "备注" }, "state": { - "type": "string" + "type": "string", + "example": "审核状态" } } }, - "md.AgentQualificationEnterpriseData": { + "md.AppletApplicationListData": { "type": "object", "properties": { - "agent_id": { + "app_id": { "type": "string", - "example": "代理id" + "example": "小程序appid" }, - "business_license_address": { + "cooperate_state": { "type": "string", - "example": "营业执照地址" + "example": "合作状态" }, - "business_license_img_url": { + "id": { "type": "string", - "example": "营业执照照片" + "example": "id" }, - "certificate_first_type": { + "logo": { "type": "string", - "example": "证件类型 1级类目id" + "example": "logo" }, - "certificate_type": { + "memo": { "type": "string", - "example": "证件类型 2级类目id" + "example": "备注" }, - "certificate_validity": { + "name": { "type": "string", - "example": "证件有效期" + "example": "应用名称" }, - "company_abbreviation": { + "original_id": { "type": "string", - "example": "公司简称" + "example": "小程序id" }, - "company_name": { + "platform": { "type": "string", - "example": "公司名称" + "example": "平台" }, - "country_region": { + "state": { "type": "string", - "example": "国家地区" - }, - "country_region_id": { + "example": "应用状态 state=3 才能再次编辑" + } + } + }, + "md.AppletApplicationListReq": { + "type": "object", + "properties": { + "cooperate_state": { "type": "string", - "example": "国家地区id" + "example": "合作状态" }, - "id": { - "type": "string", - "example": "状态选择" + "limit": { + "type": "string" }, - "kind": { + "medium_id": { "type": "string", - "example": "类型(1:企业 2:个人)" + "example": "媒体id" }, - "legal_representative": { - "type": "string", - "example": "法定代表人" + "name": { + "type": "string" }, - "memo": { - "type": "string", - "example": "备注 审核时填写的" + "page": { + "type": "string" }, - "registered_address": { - "type": "string", - "example": "注册地址" + "platform": { + "type": "string" + } + } + }, + "md.AppletApplicationListRes": { + "type": "object", + "properties": { + "cooperate_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } }, - "registered_address_city_id": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AppletApplicationListData" + } + }, + "platform": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AppletApplicationMediumListData": { + "type": "object", + "properties": { + "account": { "type": "string", - "example": "注册地址-市id" + "example": "账号" }, - "registered_address_country_id": { + "contact_name": { "type": "string", - "example": "注册地址-国家id" + "example": "联系人" }, - "registered_address_county_id": { + "count": { "type": "string", - "example": "注册地址-县/区id" + "example": "应用数量" }, - "registered_address_province_id": { + "id": { "type": "string", - "example": "册地址-省份id" + "example": "id" }, - "state": { + "medium_id": { "type": "string", - "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + "example": "媒体id" }, - "unified_social_credit_code": { + "name": { "type": "string", - "example": "统一社会信用代码" + "example": "名称" }, - "uuid": { + "phone": { "type": "string", - "example": "站长id" + "example": "联系电话" } } }, - "md.AgentQualificationEnterpriseReq": { + "md.AppletApplicationMediumListReq": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, "limit": { "type": "string" }, "name": { - "type": "string" + "type": "string", + "example": "媒体名称" }, "page": { "type": "string" - }, - "state": { - "type": "string" } } }, - "md.AgentQualificationEnterpriseRes": { + "md.AppletApplicationMediumListRes": { "type": "object", "properties": { "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationEnterpriseData" - } - }, - "state": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" + "$ref": "#/definitions/md.AppletApplicationMediumListData" } }, "total": { "type": "integer" - }, - "type": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" - } } } }, - "md.AppletAddReq": { + "md.AppletApplicationSaveReq": { "type": "object", - "required": [ - "appid", - "logo", - "name", - "original_id" - ], "properties": { - "appid": { - "type": "string", - "example": "授权小程序appid" - }, - "logo": { + "id": { "type": "string", - "example": "小程序logo" + "example": "id 多个逗号隔开" }, - "name": { + "memo": { "type": "string", - "example": "小程序名称" + "example": "备注" }, - "original_id": { + "state": { "type": "string", - "example": "授权小程序原始id" + "example": "审核状态" } } }, @@ -2245,9 +3278,114 @@ const docTemplate = `{ } } }, + "md.MediumListData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, + "business_license_address": { + "type": "string", + "example": "营业执照地址" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "id": { + "type": "string", + "example": "id" + }, + "legal_representative": { + "type": "string", + "example": "法定代表人" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + }, + "unified_social_credit_code": { + "type": "string", + "example": "统一社会信用代码" + } + } + }, + "md.MediumListDelReq": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "列表id" + } + } + }, + "md.MediumListReq": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "limit": { + "type": "string" + }, + "name": { + "type": "string" + }, + "page": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "md.MediumListRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.MediumListData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.MediumListSaveReq": { + "type": "object", + "properties": { + "medium_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "md.MediumQualificationContactData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "address": { "type": "string", "example": "联系地址" @@ -2327,6 +3465,10 @@ const docTemplate = `{ "md.MediumQualificationEnterpriseData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "business_license_address": { "type": "string", "example": "营业执照地址" @@ -2565,6 +3707,17 @@ const docTemplate = `{ } } }, + "md.SetMobReq": { + "type": "object", + "properties": { + "mob_app_key": { + "type": "string" + }, + "mob_app_secret": { + "type": "string" + } + } + }, "md.SetOssReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index ea3cae5..ee13f32 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -339,21 +339,9 @@ } } }, - "/api/mediumQualification/bank": { - "post": { - "responses": { - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/mediumQualification/bank/audit": { + "/api/mediumCenter/agent/bind/medium/list": { "post": { - "description": "媒体资质-银行资质审核", + "description": "媒体中心-代理绑定媒体列表", "consumes": [ "application/json" ], @@ -361,9 +349,9 @@ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "银行资质审核", + "summary": "代理绑定媒体列表", "parameters": [ { "type": "string", @@ -378,15 +366,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.MediumListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumListRes" } }, "400": { @@ -398,9 +386,9 @@ } } }, - "/api/mediumQualification/contact": { + "/api/mediumCenter/agent/list": { "post": { - "description": "媒体资质-联系方式", + "description": "媒体中心-代理列表", "consumes": [ "application/json" ], @@ -408,9 +396,9 @@ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "联系方式", + "summary": "代理列表", "parameters": [ { "type": "string", @@ -425,15 +413,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + "$ref": "#/definitions/md.AgentQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "具体看返回内容 这是data里面的数据", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "$ref": "#/definitions/md.MediumQualificationContactRes" + "$ref": "#/definitions/md.AgentQualificationEnterpriseRes" } }, "400": { @@ -445,9 +433,9 @@ } } }, - "/api/mediumQualification/contact/audit": { + "/api/mediumCenter/applet/application/ad/space/audit": { "post": { - "description": "媒体资质-联系方式审核", + "description": "小程序应用-广告位审核", "consumes": [ "application/json" ], @@ -455,9 +443,9 @@ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "联系方式审核", + "summary": "广告位审核", "parameters": [ { "type": "string", @@ -472,7 +460,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" } } ], @@ -492,9 +480,9 @@ } } }, - "/api/mediumQualification/enterprise": { + "/api/mediumCenter/applet/application/ad/space/list": { "post": { - "description": "媒体资质-主体资质", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -502,9 +490,9 @@ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "主体资质", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -519,15 +507,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListReq" } } ], "responses": { "200": { - "description": "具体看返回内容 这是data里面的数据", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListRes" } }, "400": { @@ -539,9 +527,9 @@ } } }, - "/api/mediumQualification/enterprise/audit": { + "/api/mediumCenter/applet/application/ad/space/save": { "post": { - "description": "媒体资质-主体资质审核", + "description": "小程序应用-广告位列表", "consumes": [ "application/json" ], @@ -549,9 +537,9 @@ "application/json" ], "tags": [ - "媒体资质------嘉俊" + "媒体中心------嘉俊" ], - "summary": "主体资质审核", + "summary": "广告位列表", "parameters": [ { "type": "string", @@ -566,15 +554,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListRes" } }, "400": { @@ -586,9 +574,9 @@ } } }, - "/api/registerForAgent": { + "/api/mediumCenter/applet/application/audit": { "post": { - "description": "注册模块-渠道代理注册", + "description": "小程序应用-审核", "consumes": [ "application/json" ], @@ -596,23 +584,30 @@ "application/json" ], "tags": [ - "注册模块" + "媒体中心------嘉俊" ], - "summary": "渠道代理注册", + "summary": "审核", "parameters": [ { - "description": "用户名密码", - "name": "req", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RegisterForAgentReq" + "$ref": "#/definitions/md.AppletApplicationSaveReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -626,9 +621,9 @@ } } }, - "/api/registerForMedium": { + "/api/mediumCenter/applet/application/list": { "post": { - "description": "注册模块-媒体注册", + "description": "小程序应用-列表数据", "consumes": [ "application/json" ], @@ -636,25 +631,32 @@ "application/json" ], "tags": [ - "注册模块" + "媒体中心------嘉俊" ], - "summary": "媒体注册", + "summary": "应用列表", "parameters": [ { - "description": "用户名密码", - "name": "req", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RegisterForMediumReq" + "$ref": "#/definitions/md.AppletApplicationListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationListRes" } }, "400": { @@ -666,9 +668,9 @@ } } }, - "/api/role/addAdmin": { + "/api/mediumCenter/applet/application/medium/list": { "post": { - "description": "权限管理-新增管理员", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -676,9 +678,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "新增管理员", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -693,15 +695,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddAdminReq" + "$ref": "#/definitions/md.AppletApplicationMediumListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationMediumListRes" } }, "400": { @@ -713,9 +715,9 @@ } } }, - "/api/role/addRole": { + "/api/mediumCenter/medium/bind/agent/del": { "post": { - "description": "权限管理-添加角色", + "description": "媒体中心-媒体绑定代理删除", "consumes": [ "application/json" ], @@ -723,9 +725,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "添加角色", + "summary": "媒体绑定代理删除", "parameters": [ { "type": "string", @@ -740,13 +742,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddRoleReq" + "$ref": "#/definitions/md.MediumListDelReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 ", "schema": { "type": "string" } @@ -760,9 +762,9 @@ } } }, - "/api/role/adminInfo": { - "get": { - "description": "权限管理-管理员信息", + "/api/mediumCenter/medium/bind/agent/list": { + "post": { + "description": "媒体中心-媒体绑定代理列表", "consumes": [ "application/json" ], @@ -770,9 +772,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员信息", + "summary": "媒体绑定代理列表", "parameters": [ { "type": "string", @@ -782,18 +784,20 @@ "required": true }, { - "type": "string", - "description": "管理员id", - "name": "adm_id", - "in": "query", - "required": true + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumListReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumListRes" } }, "400": { @@ -805,9 +809,9 @@ } } }, - "/api/role/adminList": { + "/api/mediumCenter/medium/bind/agent/save": { "post": { - "description": "权限管理-管理员列表", + "description": "媒体中心-媒体绑定代理操作", "consumes": [ "application/json" ], @@ -815,9 +819,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员列表", + "summary": "媒体绑定代理操作", "parameters": [ { "type": "string", @@ -832,13 +836,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdminListReq" + "$ref": "#/definitions/md.MediumListSaveReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 ", "schema": { "type": "string" } @@ -852,9 +856,9 @@ } } }, - "/api/role/bindAdminRole/": { + "/api/mediumCenter/medium/list": { "post": { - "description": "权限管理-管理员绑定角色", + "description": "媒体中心-媒体列表", "consumes": [ "application/json" ], @@ -862,9 +866,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体中心------嘉俊" ], - "summary": "管理员绑定角色", + "summary": "媒体列表", "parameters": [ { "type": "string", @@ -879,15 +883,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.BindAdminRoleReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" } }, "400": { @@ -899,9 +903,21 @@ } } }, - "/api/role/deleteAdmin/{$adm_id}": { - "delete": { - "description": "权限管理-删除管理员", + "/api/mediumQualification/bank": { + "post": { + "responses": { + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/mediumQualification/bank/audit": { + "post": { + "description": "媒体资质-银行资质审核", "consumes": [ "application/json" ], @@ -909,9 +925,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "删除管理员", + "summary": "银行资质审核", "parameters": [ { "type": "string", @@ -919,11 +935,20 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" + } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -937,9 +962,9 @@ } } }, - "/api/role/deleteRole/{$id}": { - "delete": { - "description": "权限管理-删除角色", + "/api/mediumQualification/contact": { + "post": { + "description": "媒体资质-联系方式", "consumes": [ "application/json" ], @@ -947,9 +972,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "删除角色", + "summary": "联系方式", "parameters": [ { "type": "string", @@ -964,15 +989,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleStateReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationContactRes" } }, "400": { @@ -984,9 +1009,9 @@ } } }, - "/api/role/roleBindPermissionGroup": { + "/api/mediumQualification/contact/audit": { "post": { - "description": "权限管理-角色绑定权限组", + "description": "媒体资质-联系方式审核", "consumes": [ "application/json" ], @@ -994,9 +1019,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "角色绑定权限组", + "summary": "联系方式审核", "parameters": [ { "type": "string", @@ -1011,13 +1036,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.RoleBindPermissionGroupReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1031,9 +1056,9 @@ } } }, - "/api/role/roleList": { - "get": { - "description": "权限管理-角色列表", + "/api/mediumQualification/enterprise": { + "post": { + "description": "媒体资质-主体资质", "consumes": [ "application/json" ], @@ -1041,9 +1066,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "角色列表", + "summary": "主体资质", "parameters": [ { "type": "string", @@ -1051,13 +1076,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.MediumQualificationEnterpriseReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容 这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.MediumQualificationEnterpriseRes" } }, "400": { @@ -1069,9 +1103,9 @@ } } }, - "/api/role/updateAdmin": { + "/api/mediumQualification/enterprise/audit": { "post": { - "description": "权限管理-修改管理员信息", + "description": "媒体资质-主体资质审核", "consumes": [ "application/json" ], @@ -1079,9 +1113,9 @@ "application/json" ], "tags": [ - "权限管理" + "媒体资质------嘉俊" ], - "summary": "修改管理员信息", + "summary": "主体资质审核", "parameters": [ { "type": "string", @@ -1096,13 +1130,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateAdminReq" + "$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1116,9 +1150,9 @@ } } }, - "/api/role/updateAdminState": { + "/api/registerForAgent": { "post": { - "description": "权限管理-修改管理员状态", + "description": "注册模块-渠道代理注册", "consumes": [ "application/json" ], @@ -1126,24 +1160,17 @@ "application/json" ], "tags": [ - "权限管理" + "注册模块" ], - "summary": "修改管理员状态", + "summary": "渠道代理注册", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "请求参数", - "name": "args", + "description": "用户名密码", + "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateAdminStateReq" + "$ref": "#/definitions/md.RegisterForAgentReq" } } ], @@ -1163,9 +1190,9 @@ } } }, - "/api/role/updateRole": { + "/api/registerForMedium": { "post": { - "description": "权限管理-修改角色", + "description": "注册模块-媒体注册", "consumes": [ "application/json" ], @@ -1173,24 +1200,17 @@ "application/json" ], "tags": [ - "权限管理" + "注册模块" ], - "summary": "修改角色", + "summary": "媒体注册", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "请求参数", - "name": "args", + "description": "用户名密码", + "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleReq" + "$ref": "#/definitions/md.RegisterForMediumReq" } } ], @@ -1210,9 +1230,9 @@ } } }, - "/api/role/updateRoleState": { + "/api/role/addAdmin": { "post": { - "description": "权限管理-修改角色状态", + "description": "权限管理-新增管理员", "consumes": [ "application/json" ], @@ -1222,7 +1242,7 @@ "tags": [ "权限管理" ], - "summary": "修改角色状态", + "summary": "新增管理员", "parameters": [ { "type": "string", @@ -1237,7 +1257,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdateRoleStateReq" + "$ref": "#/definitions/md.AddAdminReq" } } ], @@ -1257,9 +1277,9 @@ } } }, - "/api/setCenter/applet/add": { + "/api/role/addRole": { "post": { - "description": "小程序设置-新增", + "description": "权限管理-添加角色", "consumes": [ "application/json" ], @@ -1267,9 +1287,9 @@ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "新增", + "summary": "添加角色", "parameters": [ { "type": "string", @@ -1284,7 +1304,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletAddReq" + "$ref": "#/definitions/md.AddRoleReq" } } ], @@ -1304,9 +1324,9 @@ } } }, - "/api/setCenter/applet/authorize": { + "/api/role/adminInfo": { "get": { - "description": "设置中心-基础设置", + "description": "权限管理-管理员信息", "consumes": [ "application/json" ], @@ -1314,9 +1334,9 @@ "application/json" ], "tags": [ - "设置中心" + "权限管理" ], - "summary": "设置中心-基础设置-微信三方应用获取", + "summary": "管理员信息", "parameters": [ { "type": "string", @@ -1324,11 +1344,18 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true } ], "responses": { "200": { - "description": "微信授权界面url", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -1342,9 +1369,9 @@ } } }, - "/api/setCenter/applet/list": { - "get": { - "description": "小程序设置-列表", + "/api/role/adminList": { + "post": { + "description": "权限管理-管理员列表", "consumes": [ "application/json" ], @@ -1352,9 +1379,9 @@ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "列表", + "summary": "管理员列表", "parameters": [ { "type": "string", @@ -1362,13 +1389,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AdminListReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/hdl.WxOpenThirdPartyAppList" + "type": "string" } }, "400": { @@ -1380,9 +1416,9 @@ } } }, - "/api/setCenter/applet/unauthorized": { - "get": { - "description": "设置中心-基础设置", + "/api/role/bindAdminRole/": { + "post": { + "description": "权限管理-管理员绑定角色", "consumes": [ "application/json" ], @@ -1390,9 +1426,9 @@ "application/json" ], "tags": [ - "设置中心" + "权限管理" ], - "summary": "设置中心-基础设置-微信三方应用获取", + "summary": "管理员绑定角色", "parameters": [ { "type": "string", @@ -1400,6 +1436,15 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.BindAdminRoleReq" + } } ], "responses": { @@ -1418,9 +1463,9 @@ } } }, - "/api/setCenter/applet/update": { - "post": { - "description": "小程序设置-更新", + "/api/role/deleteAdmin/{$adm_id}": { + "delete": { + "description": "权限管理-删除管理员", "consumes": [ "application/json" ], @@ -1428,9 +1473,9 @@ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "更新", + "summary": "删除管理员", "parameters": [ { "type": "string", @@ -1438,15 +1483,6 @@ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "请求参数", - "name": "args", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.AppletUpdateReq" - } } ], "responses": { @@ -1465,9 +1501,9 @@ } } }, - "/api/setCenter/basic/getOss": { - "get": { - "description": "基础设置-oss获取", + "/api/role/deleteRole/{$id}": { + "delete": { + "description": "权限管理-删除角色", "consumes": [ "application/json" ], @@ -1475,9 +1511,9 @@ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "oss获取", + "summary": "删除角色", "parameters": [ { "type": "string", @@ -1485,13 +1521,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "success", "schema": { - "$ref": "#/definitions/md.SetOssResp" + "type": "string" } }, "400": { @@ -1503,9 +1548,9 @@ } } }, - "/api/setCenter/basic/setOss": { + "/api/role/roleBindPermissionGroup": { "post": { - "description": "基础设置-oss设置", + "description": "权限管理-角色绑定权限组", "consumes": [ "application/json" ], @@ -1513,9 +1558,9 @@ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "oss设置", + "summary": "角色绑定权限组", "parameters": [ { "type": "string", @@ -1530,7 +1575,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.SetOssReq" + "$ref": "#/definitions/md.RoleBindPermissionGroupReq" } } ], @@ -1550,9 +1595,9 @@ } } }, - "/api/setCenter/basic/wxOpenGet": { + "/api/role/roleList": { "get": { - "description": "基础设置-微信三方应用获取", + "description": "权限管理-角色列表", "consumes": [ "application/json" ], @@ -1560,9 +1605,9 @@ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "微信三方应用获取", + "summary": "角色列表", "parameters": [ { "type": "string", @@ -1574,9 +1619,9 @@ ], "responses": { "200": { - "description": "OK", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.WxOpenGetResp" + "type": "string" } }, "400": { @@ -1588,9 +1633,9 @@ } } }, - "/api/setCenter/basic/wxOpenSet": { + "/api/role/updateAdmin": { "post": { - "description": "基础设置-微信三方应用设置", + "description": "权限管理-修改管理员信息", "consumes": [ "application/json" ], @@ -1598,9 +1643,9 @@ "application/json" ], "tags": [ - "设置中心-基础设置" + "权限管理" ], - "summary": "微信三方应用设置", + "summary": "修改管理员信息", "parameters": [ { "type": "string", @@ -1615,7 +1660,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.WxOpenSetReq" + "$ref": "#/definitions/md.UpdateAdminReq" } } ], @@ -1635,9 +1680,9 @@ } } }, - "/api/setCenter/share/index": { - "get": { - "description": "邀请链接界面接口", + "/api/role/updateAdminState": { + "post": { + "description": "权限管理-修改管理员状态", "consumes": [ "application/json" ], @@ -1645,9 +1690,9 @@ "application/json" ], "tags": [ - "设置中心-邀请链接" + "权限管理" ], - "summary": "邀请链接", + "summary": "修改管理员状态", "parameters": [ { "type": "string", @@ -1655,13 +1700,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateAdminStateReq" + } } ], "responses": { "200": { - "description": "OK", + "description": "success", "schema": { - "$ref": "#/definitions/md.ShareIndexResp" + "type": "string" } }, "400": { @@ -1673,9 +1727,9 @@ } } }, - "/role/permissionGroupList": { - "get": { - "description": "权限管理-权限组列表", + "/api/role/updateRole": { + "post": { + "description": "权限管理-修改角色", "consumes": [ "application/json" ], @@ -1685,7 +1739,7 @@ "tags": [ "权限管理" ], - "summary": "权限组列表", + "summary": "修改角色", "parameters": [ { "type": "string", @@ -1695,16 +1749,18 @@ "required": true }, { - "type": "string", - "description": "管理员id", - "name": "adm_id", - "in": "query", - "required": true + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleReq" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "success", "schema": { "type": "string" } @@ -1718,9 +1774,9 @@ } } }, - "/v1/banner/delete/{$id}": { - "delete": { - "description": "小程序设置-删除", + "/api/role/updateRoleState": { + "post": { + "description": "权限管理-修改角色状态", "consumes": [ "application/json" ], @@ -1728,9 +1784,9 @@ "application/json" ], "tags": [ - "设置中心-小程序设置" + "权限管理" ], - "summary": "删除", + "summary": "修改角色状态", "parameters": [ { "type": "string", @@ -1738,6 +1794,15 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } } ], "responses": { @@ -1755,31 +1820,615 @@ } } } - } - }, - "definitions": { - "hdl.WxOpenThirdPartyAppList": { - "type": "object", - "properties": { - "aes_key": { - "type": "string" - }, - "app_secret": { - "type": "string" - }, - "appid": { - "type": "string" - }, - "component_access_token": { - "type": "string" - }, - "component_verify_ticket": { - "type": "string" - }, - "create_at": { - "type": "string" - }, - "id": { + }, + "/api/setCenter/applet/add": { + "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.AppletAddReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/authorize": { + "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": "微信授权界面url", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/list": { + "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": "OK", + "schema": { + "$ref": "#/definitions/hdl.WxOpenThirdPartyAppList" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/unauthorized": { + "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": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/applet/update": { + "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.AppletUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/getMob": { + "get": { + "description": "基础设置-mob获取", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "mob获取", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/md.SetOssResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/getOss": { + "get": { + "description": "基础设置-oss获取", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "oss获取", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/md.SetOssResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/setMob": { + "post": { + "description": "基础设置-mob设置", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "mob设置", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.SetMobReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/setOss": { + "post": { + "description": "基础设置-oss设置", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-基础设置" + ], + "summary": "oss设置", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.SetOssReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/wxOpenGet": { + "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": "OK", + "schema": { + "$ref": "#/definitions/md.WxOpenGetResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/basic/wxOpenSet": { + "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.WxOpenSetReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/setCenter/share/index": { + "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": "OK", + "schema": { + "$ref": "#/definitions/md.ShareIndexResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/role/permissionGroupList": { + "get": { + "description": "权限管理-权限组列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "权限组列表", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/v1/banner/delete/{$id}": { + "delete": { + "description": "小程序设置-删除", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "设置中心-小程序设置" + ], + "summary": "删除", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + } + }, + "definitions": { + "hdl.WxOpenThirdPartyAppList": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "app_secret": { + "type": "string" + }, + "appid": { + "type": "string" + }, + "component_access_token": { + "type": "string" + }, + "component_verify_ticket": { + "type": "string" + }, + "create_at": { + "type": "string" + }, + "id": { "type": "integer" }, "token": { @@ -1811,81 +2460,293 @@ } } }, - "md.AddRoleReq": { + "md.AddRoleReq": { + "type": "object", + "required": [ + "memo", + "name" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "md.AdminListReq": { + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "state": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + }, + "md.AgentQualificationBankData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "账号" + }, + "agent_id": { + "type": "string", + "example": "代理id" + }, + "bank": { + "type": "string", + "example": "开户银行" + }, + "bank_branch": { + "type": "string", + "example": "开户银行分行" + }, + "bank_no": { + "type": "string", + "example": "银行卡号" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "currency_conf": { + "type": "string", + "example": "结算币种 0人民币" + }, + "id": { + "type": "string", + "example": "id" + }, + "kind": { + "type": "string", + "example": "类型(1:企业 2:个人)" + }, + "licence": { + "type": "string", + "example": "开户许可证" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + }, + "unified_social_credit_code": { + "type": "string", + "example": "统一社会信用代码" + } + } + }, + "md.AgentQualificationBankRes": { + "type": "object", + "properties": { + "currency_conf": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AgentQualificationBankData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + }, + "type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + } + } + }, + "md.AgentQualificationContactData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "账号" + }, + "address": { + "type": "string", + "example": "联系地址" + }, + "agent_id": { + "type": "string", + "example": "代理id" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "email": { + "type": "string", + "example": "邮箱地址" + }, + "id": { + "type": "string", + "example": "id" + }, + "kind": { + "type": "string", + "example": "类型(1:企业 2:个人)" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "name": { + "type": "string", + "example": "联系人" + }, + "phone": { + "type": "string", + "example": "联系电话" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + } + } + }, + "md.AgentQualificationContactRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AgentQualificationContactData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AgentQualificationEnterpriseAuditReq": { "type": "object", - "required": [ - "memo", - "name" - ], "properties": { - "memo": { + "agent_id": { "type": "string" }, - "name": { + "memo": { "type": "string" - } - } - }, - "md.AdminListReq": { - "type": "object", - "properties": { - "limit": { - "type": "integer" - }, - "page": { - "type": "integer" }, "state": { - "type": "integer" - }, - "username": { "type": "string" } } }, - "md.AgentQualificationBankData": { + "md.AgentQualificationEnterpriseData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "agent_id": { "type": "string", "example": "代理id" }, - "bank": { + "business_license_address": { "type": "string", - "example": "开户银行" + "example": "营业执照地址" }, - "bank_branch": { + "business_license_img_url": { "type": "string", - "example": "开户银行分行" + "example": "营业执照照片" }, - "bank_no": { + "certificate_first_type": { "type": "string", - "example": "银行卡号" + "example": "证件类型 1级类目id" + }, + "certificate_type": { + "type": "string", + "example": "证件类型 2级类目id" + }, + "certificate_validity": { + "type": "string", + "example": "证件有效期" + }, + "company_abbreviation": { + "type": "string", + "example": "公司简称" }, "company_name": { "type": "string", "example": "公司名称" }, - "currency_conf": { + "country_region": { "type": "string", - "example": "结算币种 0人民币" + "example": "国家地区" + }, + "country_region_id": { + "type": "string", + "example": "国家地区id" }, "id": { "type": "string", - "example": "id" + "example": "状态选择" }, "kind": { "type": "string", "example": "类型(1:企业 2:个人)" }, - "licence": { + "legal_representative": { "type": "string", - "example": "开户许可证" + "example": "法定代表人" }, "memo": { "type": "string", "example": "备注 审核时填写的" }, + "registered_address": { + "type": "string", + "example": "注册地址" + }, + "registered_address_city_id": { + "type": "string", + "example": "注册地址-市id" + }, + "registered_address_country_id": { + "type": "string", + "example": "注册地址-国家id" + }, + "registered_address_county_id": { + "type": "string", + "example": "注册地址-县/区id" + }, + "registered_address_province_id": { + "type": "string", + "example": "册地址-省份id" + }, "state": { "type": "string", "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" @@ -1893,22 +2754,37 @@ "unified_social_credit_code": { "type": "string", "example": "统一社会信用代码" + }, + "uuid": { + "type": "string", + "example": "站长id" } } }, - "md.AgentQualificationBankRes": { + "md.AgentQualificationEnterpriseReq": { "type": "object", "properties": { - "currency_conf": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" - } + "limit": { + "type": "string" + }, + "name": { + "type": "string" }, + "page": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "md.AgentQualificationEnterpriseRes": { + "type": "object", + "properties": { "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationBankData" + "$ref": "#/definitions/md.AgentQualificationEnterpriseData" } }, "state": { @@ -1928,24 +2804,47 @@ } } }, - "md.AgentQualificationContactData": { + "md.AppletAddReq": { "type": "object", + "required": [ + "appid", + "logo", + "name", + "original_id" + ], "properties": { - "address": { + "appid": { "type": "string", - "example": "联系地址" + "example": "授权小程序appid" }, - "agent_id": { + "logo": { "type": "string", - "example": "代理id" + "example": "小程序logo" }, - "company_name": { + "name": { "type": "string", - "example": "公司名称" + "example": "小程序名称" }, - "email": { + "original_id": { "type": "string", - "example": "邮箱地址" + "example": "授权小程序原始id" + } + } + }, + "md.AppletApplicationAdSpaceListData": { + "type": "object", + "properties": { + "ad_id": { + "type": "string", + "example": "广告位id" + }, + "app_id": { + "type": "string", + "example": "小程序appid" + }, + "cooperate_state": { + "type": "string", + "example": "合作状态" }, "id": { "type": "string", @@ -1953,33 +2852,80 @@ }, "kind": { "type": "string", - "example": "类型(1:企业 2:个人)" + "example": "广告位类型" + }, + "logo": { + "type": "string", + "example": "logo" }, "memo": { "type": "string", - "example": "备注 审核时填写的" + "example": "备注" }, "name": { "type": "string", - "example": "联系人" + "example": "应用名称" }, - "phone": { + "platform": { "type": "string", - "example": "联系电话" + "example": "平台" }, "state": { "type": "string", - "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + "example": "应用状态 state=2 才能再次编辑" } } }, - "md.AgentQualificationContactRes": { + "md.AppletApplicationAdSpaceListReq": { + "type": "object", + "properties": { + "cooperate_state": { + "type": "string", + "example": "合作状态" + }, + "limit": { + "type": "string" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "name": { + "type": "string" + }, + "page": { + "type": "string" + }, + "platform": { + "type": "string" + } + } + }, + "md.AppletApplicationAdSpaceListRes": { "type": "object", "properties": { + "ad_type": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "cooperate_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationContactData" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListData" + } + }, + "platform": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" } }, "state": { @@ -1993,180 +2939,267 @@ } } }, - "md.AgentQualificationEnterpriseAuditReq": { + "md.AppletApplicationAdSpaceMediumListData": { "type": "object", "properties": { - "agent_id": { + "account": { + "type": "string", + "example": "账号" + }, + "contact_name": { + "type": "string", + "example": "联系人" + }, + "count": { + "type": "string", + "example": "广告位数量" + }, + "id": { + "type": "string", + "example": "id" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "name": { + "type": "string", + "example": "名称" + }, + "phone": { + "type": "string", + "example": "联系电话" + } + } + }, + "md.AppletApplicationAdSpaceMediumListReq": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, + "limit": { "type": "string" }, - "memo": { + "name": { + "type": "string", + "example": "媒体名称" + }, + "page": { "type": "string" + } + } + }, + "md.AppletApplicationAdSpaceMediumListRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AppletApplicationAdSpaceMediumListData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AppletApplicationAdSpaceSaveReq": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "id 多个逗号隔开" + }, + "memo": { + "type": "string", + "example": "备注" }, "state": { - "type": "string" + "type": "string", + "example": "审核状态" } } }, - "md.AgentQualificationEnterpriseData": { + "md.AppletApplicationListData": { "type": "object", "properties": { - "agent_id": { + "app_id": { "type": "string", - "example": "代理id" + "example": "小程序appid" }, - "business_license_address": { + "cooperate_state": { "type": "string", - "example": "营业执照地址" + "example": "合作状态" }, - "business_license_img_url": { + "id": { "type": "string", - "example": "营业执照照片" + "example": "id" }, - "certificate_first_type": { + "logo": { "type": "string", - "example": "证件类型 1级类目id" + "example": "logo" }, - "certificate_type": { + "memo": { "type": "string", - "example": "证件类型 2级类目id" + "example": "备注" }, - "certificate_validity": { + "name": { "type": "string", - "example": "证件有效期" + "example": "应用名称" }, - "company_abbreviation": { + "original_id": { "type": "string", - "example": "公司简称" + "example": "小程序id" }, - "company_name": { + "platform": { "type": "string", - "example": "公司名称" + "example": "平台" }, - "country_region": { + "state": { "type": "string", - "example": "国家地区" - }, - "country_region_id": { + "example": "应用状态 state=3 才能再次编辑" + } + } + }, + "md.AppletApplicationListReq": { + "type": "object", + "properties": { + "cooperate_state": { "type": "string", - "example": "国家地区id" + "example": "合作状态" }, - "id": { - "type": "string", - "example": "状态选择" + "limit": { + "type": "string" }, - "kind": { + "medium_id": { "type": "string", - "example": "类型(1:企业 2:个人)" + "example": "媒体id" }, - "legal_representative": { - "type": "string", - "example": "法定代表人" + "name": { + "type": "string" }, - "memo": { - "type": "string", - "example": "备注 审核时填写的" + "page": { + "type": "string" }, - "registered_address": { - "type": "string", - "example": "注册地址" + "platform": { + "type": "string" + } + } + }, + "md.AppletApplicationListRes": { + "type": "object", + "properties": { + "cooperate_state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } }, - "registered_address_city_id": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AppletApplicationListData" + } + }, + "platform": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.AppletApplicationMediumListData": { + "type": "object", + "properties": { + "account": { "type": "string", - "example": "注册地址-市id" + "example": "账号" }, - "registered_address_country_id": { + "contact_name": { "type": "string", - "example": "注册地址-国家id" + "example": "联系人" }, - "registered_address_county_id": { + "count": { "type": "string", - "example": "注册地址-县/区id" + "example": "应用数量" }, - "registered_address_province_id": { + "id": { "type": "string", - "example": "册地址-省份id" + "example": "id" }, - "state": { + "medium_id": { "type": "string", - "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + "example": "媒体id" }, - "unified_social_credit_code": { + "name": { "type": "string", - "example": "统一社会信用代码" + "example": "名称" }, - "uuid": { + "phone": { "type": "string", - "example": "站长id" + "example": "联系电话" } } }, - "md.AgentQualificationEnterpriseReq": { + "md.AppletApplicationMediumListReq": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, "limit": { "type": "string" }, "name": { - "type": "string" + "type": "string", + "example": "媒体名称" }, "page": { "type": "string" - }, - "state": { - "type": "string" } } }, - "md.AgentQualificationEnterpriseRes": { + "md.AppletApplicationMediumListRes": { "type": "object", "properties": { "list": { "type": "array", "items": { - "$ref": "#/definitions/md.AgentQualificationEnterpriseData" - } - }, - "state": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" + "$ref": "#/definitions/md.AppletApplicationMediumListData" } }, "total": { "type": "integer" - }, - "type": { - "type": "array", - "items": { - "$ref": "#/definitions/md.SelectData" - } } } }, - "md.AppletAddReq": { + "md.AppletApplicationSaveReq": { "type": "object", - "required": [ - "appid", - "logo", - "name", - "original_id" - ], "properties": { - "appid": { - "type": "string", - "example": "授权小程序appid" - }, - "logo": { + "id": { "type": "string", - "example": "小程序logo" + "example": "id 多个逗号隔开" }, - "name": { + "memo": { "type": "string", - "example": "小程序名称" + "example": "备注" }, - "original_id": { + "state": { "type": "string", - "example": "授权小程序原始id" + "example": "审核状态" } } }, @@ -2237,9 +3270,114 @@ } } }, + "md.MediumListData": { + "type": "object", + "properties": { + "account": { + "type": "string", + "example": "媒体账号" + }, + "business_license_address": { + "type": "string", + "example": "营业执照地址" + }, + "company_name": { + "type": "string", + "example": "公司名称" + }, + "id": { + "type": "string", + "example": "id" + }, + "legal_representative": { + "type": "string", + "example": "法定代表人" + }, + "medium_id": { + "type": "string", + "example": "媒体id" + }, + "memo": { + "type": "string", + "example": "备注 审核时填写的" + }, + "state": { + "type": "string", + "example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)" + }, + "unified_social_credit_code": { + "type": "string", + "example": "统一社会信用代码" + } + } + }, + "md.MediumListDelReq": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "列表id" + } + } + }, + "md.MediumListReq": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "limit": { + "type": "string" + }, + "name": { + "type": "string" + }, + "page": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "md.MediumListRes": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.MediumListData" + } + }, + "state": { + "type": "array", + "items": { + "$ref": "#/definitions/md.SelectData" + } + }, + "total": { + "type": "integer" + } + } + }, + "md.MediumListSaveReq": { + "type": "object", + "properties": { + "medium_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "md.MediumQualificationContactData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "address": { "type": "string", "example": "联系地址" @@ -2319,6 +3457,10 @@ "md.MediumQualificationEnterpriseData": { "type": "object", "properties": { + "account": { + "type": "string", + "example": "账号" + }, "business_license_address": { "type": "string", "example": "营业执照地址" @@ -2557,6 +3699,17 @@ } } }, + "md.SetMobReq": { + "type": "object", + "properties": { + "mob_app_key": { + "type": "string" + }, + "mob_app_secret": { + "type": "string" + } + } + }, "md.SetOssReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 92aceeb..9c50709 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -57,6 +57,9 @@ definitions: type: object md.AgentQualificationBankData: properties: + account: + example: 账号 + type: string agent_id: example: 代理id type: string @@ -117,6 +120,9 @@ definitions: type: object md.AgentQualificationContactData: properties: + account: + example: 账号 + type: string address: example: 联系地址 type: string @@ -172,6 +178,9 @@ definitions: type: object md.AgentQualificationEnterpriseData: properties: + account: + example: 账号 + type: string agent_id: example: 代理id type: string @@ -287,6 +296,265 @@ definitions: - name - original_id type: object + md.AppletApplicationAdSpaceListData: + properties: + ad_id: + example: 广告位id + type: string + app_id: + example: 小程序appid + type: string + cooperate_state: + example: 合作状态 + type: string + id: + example: id + type: string + kind: + example: 广告位类型 + type: string + logo: + example: logo + type: string + memo: + example: 备注 + type: string + name: + example: 应用名称 + type: string + platform: + example: 平台 + type: string + state: + example: 应用状态 state=2 才能再次编辑 + type: string + type: object + md.AppletApplicationAdSpaceListReq: + properties: + cooperate_state: + example: 合作状态 + type: string + limit: + type: string + medium_id: + example: 媒体id + type: string + name: + type: string + page: + type: string + platform: + type: string + type: object + md.AppletApplicationAdSpaceListRes: + properties: + ad_type: + items: + $ref: '#/definitions/md.SelectData' + type: array + cooperate_state: + items: + $ref: '#/definitions/md.SelectData' + type: array + list: + items: + $ref: '#/definitions/md.AppletApplicationAdSpaceListData' + type: array + platform: + items: + $ref: '#/definitions/md.SelectData' + type: array + state: + items: + $ref: '#/definitions/md.SelectData' + type: array + total: + type: integer + type: object + md.AppletApplicationAdSpaceMediumListData: + properties: + account: + example: 账号 + type: string + contact_name: + example: 联系人 + type: string + count: + example: 广告位数量 + type: string + id: + example: id + type: string + medium_id: + example: 媒体id + type: string + name: + example: 名称 + type: string + phone: + example: 联系电话 + type: string + type: object + md.AppletApplicationAdSpaceMediumListReq: + properties: + account: + example: 媒体账号 + type: string + limit: + type: string + name: + example: 媒体名称 + type: string + page: + type: string + type: object + md.AppletApplicationAdSpaceMediumListRes: + properties: + list: + items: + $ref: '#/definitions/md.AppletApplicationAdSpaceMediumListData' + type: array + total: + type: integer + type: object + md.AppletApplicationAdSpaceSaveReq: + properties: + id: + example: id 多个逗号隔开 + type: string + memo: + example: 备注 + type: string + state: + example: 审核状态 + type: string + type: object + md.AppletApplicationListData: + properties: + app_id: + example: 小程序appid + type: string + cooperate_state: + example: 合作状态 + type: string + id: + example: id + type: string + logo: + example: logo + type: string + memo: + example: 备注 + type: string + name: + example: 应用名称 + type: string + original_id: + example: 小程序id + type: string + platform: + example: 平台 + type: string + state: + example: 应用状态 state=3 才能再次编辑 + type: string + type: object + md.AppletApplicationListReq: + properties: + cooperate_state: + example: 合作状态 + type: string + limit: + type: string + medium_id: + example: 媒体id + type: string + name: + type: string + page: + type: string + platform: + type: string + type: object + md.AppletApplicationListRes: + properties: + cooperate_state: + items: + $ref: '#/definitions/md.SelectData' + type: array + list: + items: + $ref: '#/definitions/md.AppletApplicationListData' + type: array + platform: + items: + $ref: '#/definitions/md.SelectData' + type: array + state: + items: + $ref: '#/definitions/md.SelectData' + type: array + total: + type: integer + type: object + md.AppletApplicationMediumListData: + properties: + account: + example: 账号 + type: string + contact_name: + example: 联系人 + type: string + count: + example: 应用数量 + type: string + id: + example: id + type: string + medium_id: + example: 媒体id + type: string + name: + example: 名称 + type: string + phone: + example: 联系电话 + type: string + type: object + md.AppletApplicationMediumListReq: + properties: + account: + example: 媒体账号 + type: string + limit: + type: string + name: + example: 媒体名称 + type: string + page: + type: string + type: object + md.AppletApplicationMediumListRes: + properties: + list: + items: + $ref: '#/definitions/md.AppletApplicationMediumListData' + type: array + total: + type: integer + type: object + md.AppletApplicationSaveReq: + properties: + id: + example: id 多个逗号隔开 + type: string + memo: + example: 备注 + type: string + state: + example: 审核状态 + type: string + type: object md.AppletUpdateReq: properties: id: @@ -333,8 +601,80 @@ definitions: token: type: string type: object + md.MediumListData: + properties: + account: + example: 媒体账号 + type: string + business_license_address: + example: 营业执照地址 + type: string + company_name: + example: 公司名称 + type: string + id: + example: id + type: string + legal_representative: + example: 法定代表人 + type: string + medium_id: + example: 媒体id + type: string + memo: + example: 备注 审核时填写的 + type: string + state: + example: 状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝) + type: string + unified_social_credit_code: + example: 统一社会信用代码 + type: string + type: object + md.MediumListDelReq: + properties: + id: + example: 列表id + type: string + type: object + md.MediumListReq: + properties: + id: + type: string + limit: + type: string + name: + type: string + page: + type: string + state: + type: string + type: object + md.MediumListRes: + properties: + list: + items: + $ref: '#/definitions/md.MediumListData' + type: array + state: + items: + $ref: '#/definitions/md.SelectData' + type: array + total: + type: integer + type: object + md.MediumListSaveReq: + properties: + medium_id: + type: string + username: + type: string + type: object md.MediumQualificationContactData: properties: + account: + example: 账号 + type: string address: example: 联系地址 type: string @@ -390,6 +730,9 @@ definitions: type: object md.MediumQualificationEnterpriseData: properties: + account: + example: 账号 + type: string business_license_address: example: 营业执照地址 type: string @@ -558,6 +901,13 @@ definitions: example: 值 type: string type: object + md.SetMobReq: + properties: + mob_app_key: + type: string + mob_app_secret: + type: string + type: object md.SetOssReq: properties: file_access_key: @@ -688,40 +1038,376 @@ definitions: aes_key: example: 消息加解密Key type: string - app_secret: - example: appSecret + app_secret: + example: appSecret + type: string + appid: + example: appid + type: string + token: + example: 消息校验Token + type: string + required: + - aes_key + - app_secret + - appid + - token + type: object +host: localhost:1002 or xxxx.advertisement.dengbiao.top +info: + contact: + email: 1239118001@qq.com + name: dengbiao + url: http://www.swagger.io/support + description: 站长后台接口 + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + termsOfService: http://swagger.io/terms/ + 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: 具体看返回内容 这是data里面的数据 + schema: + $ref: '#/definitions/md.AgentQualificationBankRes' + "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: 具体看返回内容 这是data里面的数据 + schema: + $ref: '#/definitions/md.AgentQualificationContactRes' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 联系方式 + tags: + - 渠道资质------嘉俊 + /api/agentQualification/contact/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/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: 具体看返回内容 这是data里面的数据 + schema: + $ref: '#/definitions/md.AgentQualificationEnterpriseRes' + "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: + - application/json + description: 登入 + parameters: + - description: 用户名密码 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.LoginReq' + produces: + - application/json + responses: + "200": + description: token + schema: + $ref: '#/definitions/md.LoginResponse' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 登陆 + tags: + - 登录 + /api/mediumCenter/agent/bind/medium/list: + 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.MediumListReq' + produces: + - application/json + responses: + "200": + description: 具体看返回内容 这是data里面的数据 + schema: + $ref: '#/definitions/md.MediumListRes' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 代理绑定媒体列表 + tags: + - 媒体中心------嘉俊 + /api/mediumCenter/agent/list: + post: + consumes: + - application/json + description: 媒体中心-代理列表 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true type: string - appid: - example: appid + - description: 请求参数 + in: body + name: args + required: true + schema: + $ref: '#/definitions/md.AgentQualificationEnterpriseReq' + produces: + - application/json + responses: + "200": + description: 具体看返回内容 这是data里面的数据 + schema: + $ref: '#/definitions/md.AgentQualificationEnterpriseRes' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 代理列表 + tags: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/ad/space/audit: + post: + consumes: + - application/json + description: 小程序应用-广告位审核 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true type: string - token: - example: 消息校验Token + - description: 请求参数 + in: body + name: args + required: true + schema: + $ref: '#/definitions/md.AppletApplicationAdSpaceSaveReq' + produces: + - application/json + responses: + "200": + description: 具体看返回内容 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 广告位审核 + tags: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/ad/space/list: + post: + consumes: + - application/json + description: 媒体中心-媒体列表 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true type: string - required: - - aes_key - - app_secret - - appid - - token - type: object -host: localhost:1002 or xxxx.advertisement.dengbiao.top -info: - contact: - email: 1239118001@qq.com - name: dengbiao - url: http://www.swagger.io/support - description: 站长后台接口 - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - termsOfService: http://swagger.io/terms/ - title: 广告联盟-站长平台 - version: "1.0" -paths: - /api/agentQualification/bank: + - description: 请求参数 + in: body + name: args + required: true + schema: + $ref: '#/definitions/md.AppletApplicationAdSpaceMediumListReq' + produces: + - application/json + responses: + "200": + description: 具体看返回内容---这是data里面的数据 + schema: + $ref: '#/definitions/md.AppletApplicationAdSpaceMediumListRes' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 媒体列表 + tags: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/ad/space/save: post: consumes: - application/json - description: 渠道资质-银行资质 + description: 小程序应用-广告位列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -733,26 +1419,26 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseReq' + $ref: '#/definitions/md.AppletApplicationAdSpaceListReq' produces: - application/json responses: "200": - description: 具体看返回内容 这是data里面的数据 + description: 具体看返回内容---这是data里面的数据 schema: - $ref: '#/definitions/md.AgentQualificationBankRes' + $ref: '#/definitions/md.AppletApplicationAdSpaceListRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 银行资质 + summary: 广告位列表 tags: - - 渠道资质------嘉俊 - /api/agentQualification/bank/audit: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/audit: post: consumes: - application/json - description: 渠道资质-银行资质审核 + description: 小程序应用-审核 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -764,7 +1450,7 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseAuditReq' + $ref: '#/definitions/md.AppletApplicationSaveReq' produces: - application/json responses: @@ -776,14 +1462,14 @@ paths: description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 银行资质审核 + summary: 审核 tags: - - 渠道资质------嘉俊 - /api/agentQualification/contact: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/list: post: consumes: - application/json - description: 渠道资质-联系方式 + description: 小程序应用-列表数据 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -795,26 +1481,26 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseReq' + $ref: '#/definitions/md.AppletApplicationListReq' produces: - application/json responses: "200": - description: 具体看返回内容 这是data里面的数据 + description: 具体看返回内容---这是data里面的数据 schema: - $ref: '#/definitions/md.AgentQualificationContactRes' + $ref: '#/definitions/md.AppletApplicationListRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 联系方式 + summary: 应用列表 tags: - - 渠道资质------嘉俊 - /api/agentQualification/contact/audit: + - 媒体中心------嘉俊 + /api/mediumCenter/applet/application/medium/list: post: consumes: - application/json - description: 渠道资质-联系方式审核 + description: 媒体中心-媒体列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -826,26 +1512,57 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseAuditReq' + $ref: '#/definitions/md.AppletApplicationMediumListReq' produces: - application/json responses: "200": - description: 具体看返回内容 + description: 具体看返回内容---这是data里面的数据 + schema: + $ref: '#/definitions/md.AppletApplicationMediumListRes' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 媒体列表 + tags: + - 媒体中心------嘉俊 + /api/mediumCenter/medium/bind/agent/del: + 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.MediumListDelReq' + produces: + - application/json + responses: + "200": + description: '具体看返回内容 ' schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 联系方式审核 + summary: 媒体绑定代理删除 tags: - - 渠道资质------嘉俊 - /api/agentQualification/enterprise: + - 媒体中心------嘉俊 + /api/mediumCenter/medium/bind/agent/list: post: consumes: - application/json - description: 渠道资质-主体资质 + description: 媒体中心-媒体绑定代理列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -857,26 +1574,26 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseReq' + $ref: '#/definitions/md.MediumListReq' produces: - application/json responses: "200": description: 具体看返回内容 这是data里面的数据 schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseRes' + $ref: '#/definitions/md.MediumListRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 主体资质 + summary: 媒体绑定代理列表 tags: - - 渠道资质------嘉俊 - /api/agentQualification/enterprise/audit: + - 媒体中心------嘉俊 + /api/mediumCenter/medium/bind/agent/save: post: consumes: - application/json - description: 渠道资质-主体资质审核 + description: 媒体中心-媒体绑定代理操作 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -888,47 +1605,52 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AgentQualificationEnterpriseAuditReq' + $ref: '#/definitions/md.MediumListSaveReq' produces: - application/json responses: "200": - description: 具体看返回内容 + description: '具体看返回内容 ' schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 主体资质审核 + summary: 媒体绑定代理操作 tags: - - 渠道资质------嘉俊 - /api/login: + - 媒体中心------嘉俊 + /api/mediumCenter/medium/list: post: consumes: - application/json - description: 登入 + description: 媒体中心-媒体列表 parameters: - - description: 用户名密码 + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.LoginReq' + $ref: '#/definitions/md.MediumQualificationEnterpriseReq' produces: - application/json responses: "200": - description: token + description: 具体看返回内容 这是data里面的数据 schema: - $ref: '#/definitions/md.LoginResponse' + $ref: '#/definitions/md.MediumQualificationEnterpriseRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 登陆 + summary: 媒体列表 tags: - - 登录 + - 媒体中心------嘉俊 /api/mediumQualification/bank: post: responses: @@ -1670,6 +2392,31 @@ paths: summary: 更新 tags: - 设置中心-小程序设置 + /api/setCenter/basic/getMob: + get: + consumes: + - application/json + description: 基础设置-mob获取 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/md.SetOssResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: mob获取 + tags: + - 设置中心-基础设置 /api/setCenter/basic/getOss: get: consumes: @@ -1695,6 +2442,37 @@ paths: summary: oss获取 tags: - 设置中心-基础设置 + /api/setCenter/basic/setMob: + post: + consumes: + - application/json + description: 基础设置-mob设置 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 请求参数 + in: body + name: args + required: true + schema: + $ref: '#/definitions/md.SetMobReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: mob设置 + tags: + - 设置中心-基础设置 /api/setCenter/basic/setOss: post: consumes: