From f9821221986103ef1b46c84c495ff2a5e116d32c Mon Sep 17 00:00:00 2001 From: wubin Date: Mon, 3 Aug 2020 08:52:00 +0800 Subject: [PATCH] update --- .../BaseGlobalController.go | 42 +- .../BaseGlobalService/BaseGlobalService.go | 16 +- .../BaseGlobalService/BaseGlobalServiceRpc.go | 20 + dsBaseWeb/docs/docs.go | 492 +++++++++++------- dsBaseWeb/docs/swagger.json | 492 +++++++++++------- dsBaseWeb/docs/swagger.yaml | 106 +++- 6 files changed, 778 insertions(+), 390 deletions(-) diff --git a/dsBaseWeb/Business/BaseGlobal/BaseGlobalController/BaseGlobalController.go b/dsBaseWeb/Business/BaseGlobal/BaseGlobalController/BaseGlobalController.go index a490455f..2a2d2c55 100644 --- a/dsBaseWeb/Business/BaseGlobal/BaseGlobalController/BaseGlobalController.go +++ b/dsBaseWeb/Business/BaseGlobal/BaseGlobalController/BaseGlobalController.go @@ -17,6 +17,7 @@ func Routers(r *gin.RouterGroup) { rr.POST("/UpdateGlobalInfo", UpdateGlobalInfo) rr.GET("/PageGlobalInfo", PageGlobalInfo) rr.GET("/GetGlobalInfo", GetGlobalInfo) + rr.GET("/GetGlobalValueByCodes", GetGlobalValueByCodes) return } @@ -37,7 +38,7 @@ func Routers(r *gin.RouterGroup) { // @X-IntLimit ["globalTypeId","sortId"] // @X-LengthLimit [{"globalCode":"2,50"},{"globalValue":"1,255"},{"globalRemarks":"1,500"}] // @X-RoleLimit ["1"] -// @X-Sort [3] +// @X-Sort [4] func AddGlobalInfo(c *gin.Context) { globalTypeId := CommonUtil.ConvertStringToInt(c.PostForm("globalTypeId")) globalCode := c.PostForm("globalCode") @@ -81,7 +82,7 @@ func AddGlobalInfo(c *gin.Context) { // @X-EmptyLimit ["globalIds"] // @X-LengthLimit [{"globalIds":"36,1800"}] // @X-RoleLimit ["1"] -// @X-Sort [4] +// @X-Sort [5] func DeleteGlobalInfo(c *gin.Context) { globalId := c.PostForm("globalId") //操作人 @@ -126,7 +127,7 @@ func DeleteGlobalInfo(c *gin.Context) { // @X-IntLimit ["globalId","globalTypeId","sortId"] // @X-LengthLimit [{"globalId":"36,36"},{"globalCode":"2,50"},{"globalValue":"1,255"},{"globalRemarks":"1,500"}] // @X-RoleLimit ["1"] -// @X-Sort [5] +// @X-Sort [6] func UpdateGlobalInfo(c *gin.Context) { globalId := c.PostForm("globalId") globalTypeId := CommonUtil.ConvertStringToInt32(c.PostForm("globalTypeId")) @@ -248,3 +249,38 @@ func GetGlobalInfo(c *gin.Context) { Count: r.Count, }) } + +// @Summary 根据多个全局变量Code获取全局变量值 +// @Description 根据多个全局变量Code获取全局变量值 +// @Tags 全局变量 +// @Accept application/x-www-form-urlencoded +// @Produce json +// @Param codes query string true "全局变量Code,多个用逗号分隔" +// @Success 200 {object} Model.Res +// @Router /base/global/GetGlobalValueByCodes [get] +// @X-EmptyLimit ["codes"] +// @X-LengthLimit [{"codes":"1,500"}] +// @X-RoleLimit ["1","2","3","4","5","6","7"] +// @X-InterfaceName ["GetBaseGlobal"] +// @X-TableName ["t_base_global"] +// @X-Sort [3] +func GetGlobalValueByCodes(c *gin.Context) { + //全局变量Code,多个用逗号分隔 + codes := c.Query("codes") + + r, err := BaseGlobalService.GetGlobalValueByCodes(codes) + if err != nil { + c.JSON(http.StatusOK, Model.Res{ + Success: false, + Message: "调用RPC服务失败!", + }) + return + } + c.JSON(http.StatusOK, Model.Res{ + Success: r.Success, + Message: r.Message, + List: CommonUtil.ConvertJsonStringToMapArray(r.List), + Count: r.Count, + }) + +} diff --git a/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalService.go b/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalService.go index 35bd3431..d09d99e2 100644 --- a/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalService.go +++ b/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalService.go @@ -5,28 +5,34 @@ import ( "strings" ) -func AddGlobalInfo(globalTypeId int, globalCode string, globalValue string, globalRemarks string, sortId int32,actionPersonId string,actionIpAddress string) (*BaseGlobalProto.Reply, error) { +func AddGlobalInfo(globalTypeId int, globalCode string, globalValue string, globalRemarks string, sortId int32, actionPersonId string, actionIpAddress string) (*BaseGlobalProto.Reply, error) { Reply, err := AddBaseGlobal(BaseGlobalProto.ModelArg{GlobalTypeId: int32(globalTypeId), GlobalCode: globalCode, GlobalValue: globalValue, GlobalRemarks: globalRemarks, SortId: sortId, BUse: 1, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress}) return Reply, err } -func DeleteGlobalInfo(ids string,actionPersonId string,actionIpAddress string) (*BaseGlobalProto.Reply, error) { +func DeleteGlobalInfo(ids string, actionPersonId string, actionIpAddress string) (*BaseGlobalProto.Reply, error) { idsArr := strings.Split(ids, ",") Reply, err := DeleteBaseGlobal(BaseGlobalProto.DeleteIdsArg{Ids: idsArr, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress}) return Reply, err } -func UpdateGlobalInfo(globalId string, globalTypeId int32, globalCode string, globalValue string, globalRemarks string, sortId int32,actionPersonId string,actionIpAddress string) (*BaseGlobalProto.Reply, error) { +func UpdateGlobalInfo(globalId string, globalTypeId int32, globalCode string, globalValue string, globalRemarks string, sortId int32, actionPersonId string, actionIpAddress string) (*BaseGlobalProto.Reply, error) { Reply, err := UpdateBaseGlobal(BaseGlobalProto.ModelArg{GlobalId: globalId, GlobalTypeId: globalTypeId, GlobalCode: globalCode, GlobalValue: globalValue, GlobalRemarks: globalRemarks, SortId: sortId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress}) return Reply, err } -func PageGlobalInfo(page int32, limit int32, globalTypeId int32,actionPersonId string,actionIpAddress string) (*BaseGlobalProto.Reply, error) { +func PageGlobalInfo(page int32, limit int32, globalTypeId int32, actionPersonId string, actionIpAddress string) (*BaseGlobalProto.Reply, error) { Reply, err := PageBaseGlobal(BaseGlobalProto.QueryArg{Page: page, Limit: limit, GlobalTypeId: globalTypeId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress}) return Reply, err } -func GetGlobalInfo(globalId string,actionPersonId string,actionIpAddress string) (*BaseGlobalProto.Reply, error) { +func GetGlobalInfo(globalId string, actionPersonId string, actionIpAddress string) (*BaseGlobalProto.Reply, error) { Reply, err := GetBaseGlobal(BaseGlobalProto.ModelArg{GlobalId: globalId, ActionPersonId: actionPersonId, ActionIpAddress: actionIpAddress}) return Reply, err } + +func GetGlobalValueByCodes(codes string) (*BaseGlobalProto.Reply, error) { + idsArr := strings.Split(codes, ",") + Reply, err := GetBaseGlobalByCodes(BaseGlobalProto.GlobalCodesArg{GlobalCodes: idsArr}) + return Reply, err +} diff --git a/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalServiceRpc.go b/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalServiceRpc.go index 596a0bb9..43d6c3ed 100644 --- a/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalServiceRpc.go +++ b/dsBaseWeb/Business/BaseGlobal/BaseGlobalService/BaseGlobalServiceRpc.go @@ -115,3 +115,23 @@ func GetBaseGlobal(modelArg BaseGlobalProto.ModelArg) (*BaseGlobalProto.Reply, e } return Reply, err } + +/** +功能:根据多个全局变量Code获取全局变量值 + */ +func GetBaseGlobalByCodes(globalCodesArg BaseGlobalProto.GlobalCodesArg) (*BaseGlobalProto.Reply, error) { + //1、准备动作:连接服务器 + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + conn := GRpcUtil.GetConnection() + if conn == nil { + return nil, errors.New("RPC服务未启动!") + } + //2、业务传参 + c := BaseGlobalProto.NewBaseGlobalManageClient(conn) + Reply, err := c.GetBaseGlobalByCodes(ctx, &globalCodesArg) + if err != nil { + LogUtil.Error("获取全局变量信息错误: ", err.Error()) + } + return Reply, err +} diff --git a/dsBaseWeb/docs/docs.go b/dsBaseWeb/docs/docs.go index 47c26b4c..a92e0a4b 100644 --- a/dsBaseWeb/docs/docs.go +++ b/dsBaseWeb/docs/docs.go @@ -413,7 +413,7 @@ var doc = `{ }, "global_code": { "description": "全局变量代码", - "example": "AAAAAA", + "example": "passwordType", "type": "string" }, "global_id": { @@ -423,7 +423,7 @@ var doc = `{ }, "global_remarks": { "description": "全局变量备注", - "example": "11111111", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", "type": "string" }, "global_type_id": { @@ -433,7 +433,69 @@ var doc = `{ }, "global_value": { "description": "全局变量值", - "example": "3333333", + "example": "2", + "type": "string" + }, + "sort_id": { + "description": "排序号", + "example": 5, + "type": "integer" + } + } + }, + "type": "array" + }, + "message": { + "description": "返回的消息", + "example": "操作成功", + "type": "string" + }, + "success": { + "description": "是否成功", + "example": "true", + "type": "boolean" + } + }, + "type": "object" + }, + "base.global.GetGlobalValueByCodes": { + "properties": { + "count": { + "description": "一共有多少条", + "example": "1", + "type": "integer" + }, + "list": { + "items": { + "properties": { + "b_use": { + "description": "是否启用 0:未启用 1:启用", + "example": 1, + "type": "integer" + }, + "global_code": { + "description": "全局变量代码", + "example": "passwordType", + "type": "string" + }, + "global_id": { + "description": "全局变量ID", + "example": "954839E9-D743-4FC2-A8EA-EE32327A2895", + "type": "string" + }, + "global_remarks": { + "description": "全局变量备注", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", + "type": "string" + }, + "global_type_id": { + "description": "全局变量分类", + "example": 1, + "type": "integer" + }, + "global_value": { + "description": "全局变量值", + "example": "2", "type": "string" }, "sort_id": { @@ -475,7 +537,7 @@ var doc = `{ }, "global_code": { "description": "全局变量代码", - "example": "AAAAAA", + "example": "passwordType", "type": "string" }, "global_id": { @@ -485,7 +547,7 @@ var doc = `{ }, "global_remarks": { "description": "全局变量备注", - "example": "11111111", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", "type": "string" }, "global_type_id": { @@ -495,7 +557,7 @@ var doc = `{ }, "global_value": { "description": "全局变量值", - "example": "3333333", + "example": "2", "type": "string" }, "sort_id": { @@ -916,7 +978,7 @@ var doc = `{ "type": "timestamp" }, "directly_under_type": { - "description": "直属类型 1:普通 2:省直 3:市直", + "description": "直属类型 1:普通 2:省直 3:市直 4:中直", "example": 0, "type": "integer" }, @@ -1997,19 +2059,26 @@ var doc = `{ "version": "1.0" }, "paths": { - "/base/business/DeleteBaseBusiness": { - "post": { + "/base/business/PageBaseBusiness": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "删除业务系统信息", + "description": "获取业务系统信息(列表)", "parameters": [ { - "description": "业务系统编码", - "in": "formData", - "name": "businessCode", + "description": "第几页", + "in": "query", + "name": "page", "required": true, - "type": "string" + "type": "integer" + }, + { + "description": "一页显示多少条", + "in": "query", + "name": "limit", + "required": true, + "type": "integer" } ], "produces": [ @@ -2023,36 +2092,43 @@ var doc = `{ } } }, - "summary": "删除业务系统信息", + "summary": "获取业务系统信息(列表)", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode" + "page", + "limit" ], - "x-lengthlimit": [ - { - "businessCode": "6,6" - } + "x-intlimit": [ + "page", + "limit" ], "x-rolelimit": [ "1" ] } }, - "/base/business/GetBaseBusiness": { - "get": { + "/base/business/AddBaseBusiness": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取业务系统信息(单条)", + "description": "增加业务系统信息", "parameters": [ { "description": "业务系统编码", - "in": "query", + "in": "formData", "name": "businessCode", "required": true, "type": "string" + }, + { + "description": "业务系统名称", + "in": "formData", + "name": "businessName", + "required": true, + "type": "string" } ], "produces": [ @@ -2066,16 +2142,20 @@ var doc = `{ } } }, - "summary": "获取业务系统信息(单条)", + "summary": "增加业务系统信息", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode" + "businessCode", + "businessName" ], "x-lengthlimit": [ { - "businessCode": "6,6" + "businessCode": "6:6" + }, + { + "businessName": "1:50" } ], "x-rolelimit": [ @@ -2083,26 +2163,19 @@ var doc = `{ ] } }, - "/base/business/PageBaseBusiness": { - "get": { + "/base/business/DeleteBaseBusiness": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取业务系统信息(列表)", + "description": "删除业务系统信息", "parameters": [ { - "description": "第几页", - "in": "query", - "name": "page", - "required": true, - "type": "integer" - }, - { - "description": "一页显示多少条", - "in": "query", - "name": "limit", + "description": "业务系统编码", + "in": "formData", + "name": "businessCode", "required": true, - "type": "integer" + "type": "string" } ], "produces": [ @@ -2116,43 +2189,36 @@ var doc = `{ } } }, - "summary": "获取业务系统信息(列表)", + "summary": "删除业务系统信息", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "page", - "limit" + "businessCode" ], - "x-intlimit": [ - "page", - "limit" + "x-lengthlimit": [ + { + "businessCode": "6,6" + } ], "x-rolelimit": [ "1" ] } }, - "/base/business/AddBaseBusiness": { - "post": { + "/base/business/GetBaseBusiness": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "增加业务系统信息", + "description": "获取业务系统信息(单条)", "parameters": [ { "description": "业务系统编码", - "in": "formData", + "in": "query", "name": "businessCode", "required": true, "type": "string" - }, - { - "description": "业务系统名称", - "in": "formData", - "name": "businessName", - "required": true, - "type": "string" } ], "produces": [ @@ -2166,20 +2232,16 @@ var doc = `{ } } }, - "summary": "增加业务系统信息", + "summary": "获取业务系统信息(单条)", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode", - "businessName" + "businessCode" ], "x-lengthlimit": [ { - "businessCode": "6:6" - }, - { - "businessName": "1:50" + "businessCode": "6,6" } ], "x-rolelimit": [ @@ -2358,6 +2420,64 @@ var doc = `{ ] } }, + "/base/global/GetGlobalValueByCodes": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "根据多个全局变量Code获取全局变量值", + "parameters": [ + { + "description": "全局变量Code,多个用逗号分隔", + "in": "query", + "name": "codes", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/base.global.GetGlobalValueByCodes" + } + } + }, + "summary": "根据多个全局变量Code获取全局变量值", + "tags": [ + "全局变量" + ], + "x-emptylimit": [ + "codes" + ], + "x-interfacename": [ + "GetBaseGlobal" + ], + "x-lengthlimit": [ + { + "codes": "1,500" + } + ], + "x-rolelimit": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], + "x-sort": [ + 3 + ], + "x-tablename": [ + "t_base_global" + ] + } + }, "/base/global/AddGlobalInfo": { "post": { "consumes": [ @@ -2440,7 +2560,7 @@ var doc = `{ "1" ], "x-sort": [ - 3 + 4 ] } }, @@ -2486,7 +2606,7 @@ var doc = `{ "1" ], "x-sort": [ - 4 + 5 ] } }, @@ -2584,7 +2704,7 @@ var doc = `{ "1" ], "x-sort": [ - 5 + 6 ] } }, @@ -3564,12 +3684,12 @@ var doc = `{ ] } }, - "/base/student/ExportStudentAccountExcel": { + "/base/student/ExportStudentExcel": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "导出本校学生账号信息到EXCEL", + "description": "导出本校学生信息到EXCEL", "parameters": [ { "description": "学校ID", @@ -3596,7 +3716,7 @@ var doc = `{ } } }, - "summary": "导出本校学生账号信息到EXCEL", + "summary": "导出本校学生信息到EXCEL", "tags": [ "学生信息" ], @@ -3621,12 +3741,12 @@ var doc = `{ ] } }, - "/base/student/ExportStudentExcel": { + "/base/student/ExportStudentAccountExcel": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "导出本校学生信息到EXCEL", + "description": "导出本校学生账号信息到EXCEL", "parameters": [ { "description": "学校ID", @@ -3653,7 +3773,7 @@ var doc = `{ } } }, - "summary": "导出本校学生信息到EXCEL", + "summary": "导出本校学生账号信息到EXCEL", "tags": [ "学生信息" ], @@ -7532,12 +7652,12 @@ var doc = `{ ] } }, - "/base/organization/PageSchoolInfo": { + "/base/organization/PageMainSchoolInfo": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取学校列表", + "description": "获取主校列表", "parameters": [ { "description": "第几页", @@ -7561,16 +7681,9 @@ var doc = `{ "type": "string" }, { - "description": "学校办学类型 -1:全部", - "in": "query", - "name": "xxbxlxm", - "required": true, - "type": "string" - }, - { - "description": "学校名称", + "description": "学校ID,增加学校时无需传,修改学校时需要传被修改学校的ID", "in": "query", - "name": "orgName", + "name": "orgId", "type": "string" } ], @@ -7581,11 +7694,11 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/base.organization.PageSchoolInfo" + "$ref": "#/definitions/base.organization.PageMainSchoolInfo" } } }, - "summary": "获取学校列表", + "summary": "获取主校列表", "tags": [ "组织机构" ], @@ -7615,9 +7728,6 @@ var doc = `{ "x-lengthlimit": [ { "areaCode": "6,6" - }, - { - "orgName": "1,30" } ], "x-removeswaggerfield": [ @@ -7661,12 +7771,12 @@ var doc = `{ ] } }, - "/base/organization/PageMainSchoolInfo": { + "/base/organization/PageSchoolInfo": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取主校列表", + "description": "获取学校列表", "parameters": [ { "description": "第几页", @@ -7690,9 +7800,16 @@ var doc = `{ "type": "string" }, { - "description": "学校ID,增加学校时无需传,修改学校时需要传被修改学校的ID", + "description": "学校办学类型 -1:全部", "in": "query", - "name": "orgId", + "name": "xxbxlxm", + "required": true, + "type": "string" + }, + { + "description": "学校名称", + "in": "query", + "name": "orgName", "type": "string" } ], @@ -7703,11 +7820,11 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/base.organization.PageMainSchoolInfo" + "$ref": "#/definitions/base.organization.PageSchoolInfo" } } }, - "summary": "获取主校列表", + "summary": "获取学校列表", "tags": [ "组织机构" ], @@ -7737,6 +7854,9 @@ var doc = `{ "x-lengthlimit": [ { "areaCode": "6,6" + }, + { + "orgName": "1,30" } ], "x-removeswaggerfield": [ @@ -8799,6 +8919,88 @@ var doc = `{ ] } }, + "/base/area/AddGovArea": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "增加行政区划信息", + "parameters": [ + { + "description": "区域代码", + "in": "formData", + "name": "areaCode", + "required": true, + "type": "string" + }, + { + "description": "区域名称", + "in": "formData", + "name": "areaName", + "required": true, + "type": "string" + }, + { + "description": "上级代码", + "in": "formData", + "name": "masterCode", + "required": true, + "type": "string" + }, + { + "description": "区域类型", + "in": "formData", + "name": "areaTypeId", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "summary": "增加行政区划信息", + "tags": [ + "行政区划" + ], + "x-emptylimit": [ + "areaTypeId", + "areaCode", + "areaName", + "masterCode" + ], + "x-intlimit": [ + "areaTypeId" + ], + "x-lengthlimit": [ + { + "areaCode": "6,6" + }, + { + "masterCode": "6,6" + }, + { + "areaName": "3,50" + } + ], + "x-rolelimit": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] + } + }, "/base/area/PageGovArea": { "get": { "consumes": [ @@ -8954,58 +9156,6 @@ var doc = `{ ] } }, - "/base/area/GetGovArea": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "获取行政区划信息(单条)", - "parameters": [ - { - "description": "行政区划码", - "in": "query", - "name": "areaCode", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "summary": "获取行政区划信息(单条)", - "tags": [ - "行政区划" - ], - "x-emptylimit": [ - "areaCode" - ], - "x-intlimit": [ - "areaCode" - ], - "x-lengthlimit": [ - { - "areaCode": "6,6" - } - ], - "x-rolelimit": [ - "1", - "2", - "3", - "4", - "5", - "6", - "7" - ] - } - }, "/base/area/DeleteGovArea": { "post": { "consumes": [ @@ -9055,40 +9205,19 @@ var doc = `{ ] } }, - "/base/area/AddGovArea": { - "post": { + "/base/area/GetGovArea": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "增加行政区划信息", + "description": "获取行政区划信息(单条)", "parameters": [ { - "description": "区域代码", - "in": "formData", + "description": "行政区划码", + "in": "query", "name": "areaCode", "required": true, "type": "string" - }, - { - "description": "区域名称", - "in": "formData", - "name": "areaName", - "required": true, - "type": "string" - }, - { - "description": "上级代码", - "in": "formData", - "name": "masterCode", - "required": true, - "type": "string" - }, - { - "description": "区域类型", - "in": "formData", - "name": "areaTypeId", - "required": true, - "type": "integer" } ], "produces": [ @@ -9102,28 +9231,19 @@ var doc = `{ } } }, - "summary": "增加行政区划信息", + "summary": "获取行政区划信息(单条)", "tags": [ "行政区划" ], "x-emptylimit": [ - "areaTypeId", - "areaCode", - "areaName", - "masterCode" + "areaCode" ], "x-intlimit": [ - "areaTypeId" + "areaCode" ], "x-lengthlimit": [ { "areaCode": "6,6" - }, - { - "masterCode": "6,6" - }, - { - "areaName": "3,50" } ], "x-rolelimit": [ diff --git a/dsBaseWeb/docs/swagger.json b/dsBaseWeb/docs/swagger.json index 96c4cff7..870f01a8 100644 --- a/dsBaseWeb/docs/swagger.json +++ b/dsBaseWeb/docs/swagger.json @@ -398,7 +398,7 @@ }, "global_code": { "description": "全局变量代码", - "example": "AAAAAA", + "example": "passwordType", "type": "string" }, "global_id": { @@ -408,7 +408,7 @@ }, "global_remarks": { "description": "全局变量备注", - "example": "11111111", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", "type": "string" }, "global_type_id": { @@ -418,7 +418,69 @@ }, "global_value": { "description": "全局变量值", - "example": "3333333", + "example": "2", + "type": "string" + }, + "sort_id": { + "description": "排序号", + "example": 5, + "type": "integer" + } + } + }, + "type": "array" + }, + "message": { + "description": "返回的消息", + "example": "操作成功", + "type": "string" + }, + "success": { + "description": "是否成功", + "example": "true", + "type": "boolean" + } + }, + "type": "object" + }, + "base.global.GetGlobalValueByCodes": { + "properties": { + "count": { + "description": "一共有多少条", + "example": "1", + "type": "integer" + }, + "list": { + "items": { + "properties": { + "b_use": { + "description": "是否启用 0:未启用 1:启用", + "example": 1, + "type": "integer" + }, + "global_code": { + "description": "全局变量代码", + "example": "passwordType", + "type": "string" + }, + "global_id": { + "description": "全局变量ID", + "example": "954839E9-D743-4FC2-A8EA-EE32327A2895", + "type": "string" + }, + "global_remarks": { + "description": "全局变量备注", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", + "type": "string" + }, + "global_type_id": { + "description": "全局变量分类", + "example": 1, + "type": "integer" + }, + "global_value": { + "description": "全局变量值", + "example": "2", "type": "string" }, "sort_id": { @@ -460,7 +522,7 @@ }, "global_code": { "description": "全局变量代码", - "example": "AAAAAA", + "example": "passwordType", "type": "string" }, "global_id": { @@ -470,7 +532,7 @@ }, "global_remarks": { "description": "全局变量备注", - "example": "11111111", + "example": "1:等保要求的密码强度 2:非等保要求的密码强度", "type": "string" }, "global_type_id": { @@ -480,7 +542,7 @@ }, "global_value": { "description": "全局变量值", - "example": "3333333", + "example": "2", "type": "string" }, "sort_id": { @@ -901,7 +963,7 @@ "type": "timestamp" }, "directly_under_type": { - "description": "直属类型 1:普通 2:省直 3:市直", + "description": "直属类型 1:普通 2:省直 3:市直 4:中直", "example": 0, "type": "integer" }, @@ -1982,19 +2044,26 @@ "version": "1.0" }, "paths": { - "/base/business/DeleteBaseBusiness": { - "post": { + "/base/business/PageBaseBusiness": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "删除业务系统信息", + "description": "获取业务系统信息(列表)", "parameters": [ { - "description": "业务系统编码", - "in": "formData", - "name": "businessCode", + "description": "第几页", + "in": "query", + "name": "page", "required": true, - "type": "string" + "type": "integer" + }, + { + "description": "一页显示多少条", + "in": "query", + "name": "limit", + "required": true, + "type": "integer" } ], "produces": [ @@ -2008,36 +2077,43 @@ } } }, - "summary": "删除业务系统信息", + "summary": "获取业务系统信息(列表)", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode" + "page", + "limit" ], - "x-lengthlimit": [ - { - "businessCode": "6,6" - } + "x-intlimit": [ + "page", + "limit" ], "x-rolelimit": [ "1" ] } }, - "/base/business/GetBaseBusiness": { - "get": { + "/base/business/AddBaseBusiness": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取业务系统信息(单条)", + "description": "增加业务系统信息", "parameters": [ { "description": "业务系统编码", - "in": "query", + "in": "formData", "name": "businessCode", "required": true, "type": "string" + }, + { + "description": "业务系统名称", + "in": "formData", + "name": "businessName", + "required": true, + "type": "string" } ], "produces": [ @@ -2051,16 +2127,20 @@ } } }, - "summary": "获取业务系统信息(单条)", + "summary": "增加业务系统信息", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode" + "businessCode", + "businessName" ], "x-lengthlimit": [ { - "businessCode": "6,6" + "businessCode": "6:6" + }, + { + "businessName": "1:50" } ], "x-rolelimit": [ @@ -2068,26 +2148,19 @@ ] } }, - "/base/business/PageBaseBusiness": { - "get": { + "/base/business/DeleteBaseBusiness": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取业务系统信息(列表)", + "description": "删除业务系统信息", "parameters": [ { - "description": "第几页", - "in": "query", - "name": "page", - "required": true, - "type": "integer" - }, - { - "description": "一页显示多少条", - "in": "query", - "name": "limit", + "description": "业务系统编码", + "in": "formData", + "name": "businessCode", "required": true, - "type": "integer" + "type": "string" } ], "produces": [ @@ -2101,43 +2174,36 @@ } } }, - "summary": "获取业务系统信息(列表)", + "summary": "删除业务系统信息", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "page", - "limit" + "businessCode" ], - "x-intlimit": [ - "page", - "limit" + "x-lengthlimit": [ + { + "businessCode": "6,6" + } ], "x-rolelimit": [ "1" ] } }, - "/base/business/AddBaseBusiness": { - "post": { + "/base/business/GetBaseBusiness": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "增加业务系统信息", + "description": "获取业务系统信息(单条)", "parameters": [ { "description": "业务系统编码", - "in": "formData", + "in": "query", "name": "businessCode", "required": true, "type": "string" - }, - { - "description": "业务系统名称", - "in": "formData", - "name": "businessName", - "required": true, - "type": "string" } ], "produces": [ @@ -2151,20 +2217,16 @@ } } }, - "summary": "增加业务系统信息", + "summary": "获取业务系统信息(单条)", "tags": [ "业务系统维护" ], "x-emptylimit": [ - "businessCode", - "businessName" + "businessCode" ], "x-lengthlimit": [ { - "businessCode": "6:6" - }, - { - "businessName": "1:50" + "businessCode": "6,6" } ], "x-rolelimit": [ @@ -2343,6 +2405,64 @@ ] } }, + "/base/global/GetGlobalValueByCodes": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "根据多个全局变量Code获取全局变量值", + "parameters": [ + { + "description": "全局变量Code,多个用逗号分隔", + "in": "query", + "name": "codes", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/base.global.GetGlobalValueByCodes" + } + } + }, + "summary": "根据多个全局变量Code获取全局变量值", + "tags": [ + "全局变量" + ], + "x-emptylimit": [ + "codes" + ], + "x-interfacename": [ + "GetBaseGlobal" + ], + "x-lengthlimit": [ + { + "codes": "1,500" + } + ], + "x-rolelimit": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], + "x-sort": [ + 3 + ], + "x-tablename": [ + "t_base_global" + ] + } + }, "/base/global/AddGlobalInfo": { "post": { "consumes": [ @@ -2425,7 +2545,7 @@ "1" ], "x-sort": [ - 3 + 4 ] } }, @@ -2471,7 +2591,7 @@ "1" ], "x-sort": [ - 4 + 5 ] } }, @@ -2569,7 +2689,7 @@ "1" ], "x-sort": [ - 5 + 6 ] } }, @@ -3549,12 +3669,12 @@ ] } }, - "/base/student/ExportStudentAccountExcel": { + "/base/student/ExportStudentExcel": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "导出本校学生账号信息到EXCEL", + "description": "导出本校学生信息到EXCEL", "parameters": [ { "description": "学校ID", @@ -3581,7 +3701,7 @@ } } }, - "summary": "导出本校学生账号信息到EXCEL", + "summary": "导出本校学生信息到EXCEL", "tags": [ "学生信息" ], @@ -3606,12 +3726,12 @@ ] } }, - "/base/student/ExportStudentExcel": { + "/base/student/ExportStudentAccountExcel": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "导出本校学生信息到EXCEL", + "description": "导出本校学生账号信息到EXCEL", "parameters": [ { "description": "学校ID", @@ -3638,7 +3758,7 @@ } } }, - "summary": "导出本校学生信息到EXCEL", + "summary": "导出本校学生账号信息到EXCEL", "tags": [ "学生信息" ], @@ -7517,12 +7637,12 @@ ] } }, - "/base/organization/PageSchoolInfo": { + "/base/organization/PageMainSchoolInfo": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取学校列表", + "description": "获取主校列表", "parameters": [ { "description": "第几页", @@ -7546,16 +7666,9 @@ "type": "string" }, { - "description": "学校办学类型 -1:全部", - "in": "query", - "name": "xxbxlxm", - "required": true, - "type": "string" - }, - { - "description": "学校名称", + "description": "学校ID,增加学校时无需传,修改学校时需要传被修改学校的ID", "in": "query", - "name": "orgName", + "name": "orgId", "type": "string" } ], @@ -7566,11 +7679,11 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/base.organization.PageSchoolInfo" + "$ref": "#/definitions/base.organization.PageMainSchoolInfo" } } }, - "summary": "获取学校列表", + "summary": "获取主校列表", "tags": [ "组织机构" ], @@ -7600,9 +7713,6 @@ "x-lengthlimit": [ { "areaCode": "6,6" - }, - { - "orgName": "1,30" } ], "x-removeswaggerfield": [ @@ -7646,12 +7756,12 @@ ] } }, - "/base/organization/PageMainSchoolInfo": { + "/base/organization/PageSchoolInfo": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "获取主校列表", + "description": "获取学校列表", "parameters": [ { "description": "第几页", @@ -7675,9 +7785,16 @@ "type": "string" }, { - "description": "学校ID,增加学校时无需传,修改学校时需要传被修改学校的ID", + "description": "学校办学类型 -1:全部", "in": "query", - "name": "orgId", + "name": "xxbxlxm", + "required": true, + "type": "string" + }, + { + "description": "学校名称", + "in": "query", + "name": "orgName", "type": "string" } ], @@ -7688,11 +7805,11 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/base.organization.PageMainSchoolInfo" + "$ref": "#/definitions/base.organization.PageSchoolInfo" } } }, - "summary": "获取主校列表", + "summary": "获取学校列表", "tags": [ "组织机构" ], @@ -7722,6 +7839,9 @@ "x-lengthlimit": [ { "areaCode": "6,6" + }, + { + "orgName": "1,30" } ], "x-removeswaggerfield": [ @@ -8784,6 +8904,88 @@ ] } }, + "/base/area/AddGovArea": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "增加行政区划信息", + "parameters": [ + { + "description": "区域代码", + "in": "formData", + "name": "areaCode", + "required": true, + "type": "string" + }, + { + "description": "区域名称", + "in": "formData", + "name": "areaName", + "required": true, + "type": "string" + }, + { + "description": "上级代码", + "in": "formData", + "name": "masterCode", + "required": true, + "type": "string" + }, + { + "description": "区域类型", + "in": "formData", + "name": "areaTypeId", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "summary": "增加行政区划信息", + "tags": [ + "行政区划" + ], + "x-emptylimit": [ + "areaTypeId", + "areaCode", + "areaName", + "masterCode" + ], + "x-intlimit": [ + "areaTypeId" + ], + "x-lengthlimit": [ + { + "areaCode": "6,6" + }, + { + "masterCode": "6,6" + }, + { + "areaName": "3,50" + } + ], + "x-rolelimit": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] + } + }, "/base/area/PageGovArea": { "get": { "consumes": [ @@ -8939,58 +9141,6 @@ ] } }, - "/base/area/GetGovArea": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "获取行政区划信息(单条)", - "parameters": [ - { - "description": "行政区划码", - "in": "query", - "name": "areaCode", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "summary": "获取行政区划信息(单条)", - "tags": [ - "行政区划" - ], - "x-emptylimit": [ - "areaCode" - ], - "x-intlimit": [ - "areaCode" - ], - "x-lengthlimit": [ - { - "areaCode": "6,6" - } - ], - "x-rolelimit": [ - "1", - "2", - "3", - "4", - "5", - "6", - "7" - ] - } - }, "/base/area/DeleteGovArea": { "post": { "consumes": [ @@ -9040,40 +9190,19 @@ ] } }, - "/base/area/AddGovArea": { - "post": { + "/base/area/GetGovArea": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "增加行政区划信息", + "description": "获取行政区划信息(单条)", "parameters": [ { - "description": "区域代码", - "in": "formData", + "description": "行政区划码", + "in": "query", "name": "areaCode", "required": true, "type": "string" - }, - { - "description": "区域名称", - "in": "formData", - "name": "areaName", - "required": true, - "type": "string" - }, - { - "description": "上级代码", - "in": "formData", - "name": "masterCode", - "required": true, - "type": "string" - }, - { - "description": "区域类型", - "in": "formData", - "name": "areaTypeId", - "required": true, - "type": "integer" } ], "produces": [ @@ -9087,28 +9216,19 @@ } } }, - "summary": "增加行政区划信息", + "summary": "获取行政区划信息(单条)", "tags": [ "行政区划" ], "x-emptylimit": [ - "areaTypeId", - "areaCode", - "areaName", - "masterCode" + "areaCode" ], "x-intlimit": [ - "areaTypeId" + "areaCode" ], "x-lengthlimit": [ { "areaCode": "6,6" - }, - { - "masterCode": "6,6" - }, - { - "areaName": "3,50" } ], "x-rolelimit": [ diff --git a/dsBaseWeb/docs/swagger.yaml b/dsBaseWeb/docs/swagger.yaml index 0f77d918..70b3b888 100644 --- a/dsBaseWeb/docs/swagger.yaml +++ b/dsBaseWeb/docs/swagger.yaml @@ -297,7 +297,7 @@ definitions: type: integer global_code: description: 全局变量代码 - example: AAAAAA + example: passwordType type: string global_id: description: 全局变量ID @@ -305,7 +305,7 @@ definitions: type: string global_remarks: description: 全局变量备注 - example: "11111111" + example: 1:等保要求的密码强度 2:非等保要求的密码强度 type: string global_type_id: description: 全局变量分类 @@ -313,7 +313,54 @@ definitions: type: integer global_value: description: 全局变量值 - example: "3333333" + example: "2" + type: string + sort_id: + description: 排序号 + example: 5 + type: integer + type: array + message: + description: 返回的消息 + example: 操作成功 + type: string + success: + description: 是否成功 + example: "true" + type: boolean + type: object + base.global.GetGlobalValueByCodes: + properties: + count: + description: 一共有多少条 + example: "1" + type: integer + list: + items: + properties: + b_use: + description: 是否启用 0:未启用 1:启用 + example: 1 + type: integer + global_code: + description: 全局变量代码 + example: passwordType + type: string + global_id: + description: 全局变量ID + example: 954839E9-D743-4FC2-A8EA-EE32327A2895 + type: string + global_remarks: + description: 全局变量备注 + example: 1:等保要求的密码强度 2:非等保要求的密码强度 + type: string + global_type_id: + description: 全局变量分类 + example: 1 + type: integer + global_value: + description: 全局变量值 + example: "2" type: string sort_id: description: 排序号 @@ -344,7 +391,7 @@ definitions: type: integer global_code: description: 全局变量代码 - example: AAAAAA + example: passwordType type: string global_id: description: 全局变量ID @@ -352,7 +399,7 @@ definitions: type: string global_remarks: description: 全局变量备注 - example: "11111111" + example: 1:等保要求的密码强度 2:非等保要求的密码强度 type: string global_type_id: description: 全局变量分类 @@ -360,7 +407,7 @@ definitions: type: integer global_value: description: 全局变量值 - example: "3333333" + example: "2" type: string sort_id: description: 排序号 @@ -681,7 +728,7 @@ definitions: example: "2020-07-28 09:50:16" type: timestamp directly_under_type: - description: 直属类型 1:普通 2:省直 3:市直 + description: 直属类型 1:普通 2:省直 3:市直 4:中直 example: 0 type: integer fddbr: @@ -2578,7 +2625,7 @@ paths: x-rolelimit: - "1" x-sort: - - 3 + - 4 /base/global/DeleteGlobalInfo: post: consumes: @@ -2607,7 +2654,7 @@ paths: x-rolelimit: - "1" x-sort: - - 4 + - 5 /base/global/GetGlobalInfo: get: consumes: @@ -2641,6 +2688,45 @@ paths: - 2 x-tablename: - t_base_global + /base/global/GetGlobalValueByCodes: + get: + consumes: + - application/x-www-form-urlencoded + description: 根据多个全局变量Code获取全局变量值 + parameters: + - description: 全局变量Code,多个用逗号分隔 + in: query + name: codes + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/base.global.GetGlobalValueByCodes' + summary: 根据多个全局变量Code获取全局变量值 + tags: + - 全局变量 + x-emptylimit: + - codes + x-interfacename: + - GetBaseGlobal + x-lengthlimit: + - codes: 1,500 + x-rolelimit: + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + x-sort: + - 3 + x-tablename: + - t_base_global /base/global/PageGlobalInfo: get: consumes: @@ -2749,7 +2835,7 @@ paths: x-rolelimit: - "1" x-sort: - - 5 + - 6 /base/loginperson/DisableAccountInfo: post: consumes: