From 475bd4e1d8b345821d74bea1f223fefcb3a03404 Mon Sep 17 00:00:00 2001 From: wubin Date: Wed, 9 Sep 2020 16:26:48 +0800 Subject: [PATCH 1/5] update --- .../BaseOrganizationDao.go | 2 +- .../AccessSystemController.go | 2 +- dsSupport/docs/docs.go | 73 +++++++++++++------ dsSupport/docs/swagger.json | 71 +++++++++++++----- dsSupport/docs/swagger.yaml | 50 +++++++++---- dsSupport/go.sum | 4 + 6 files changed, 143 insertions(+), 59 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go index c144ffb0..f0bc0972 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go @@ -133,7 +133,7 @@ func PageBaseOrganization(in *BaseOrganizationProto.QueryArg) ([]map[string]inte //是市,还是区? areaCode := in.AreaCode //1是教育局,需要要城市及所辖县区的教育局 - if in.OrgType == 1 { + if in.OrgType == 1 || in.OrgType == -1 { myBuilder.Where(builder.Eq{"t1.city_code": areaCode}) } else { myBuilder.Where(builder.Eq{"t1.area_code": areaCode}) diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go index 8c268651..04115ae0 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go @@ -217,7 +217,7 @@ func EnableAccessSystemInfo(c *gin.Context) { // @Produce json // @Param appId formData string true "系统ID" // @Success 200 {object} Model.Res -// @Router /support/accessSystem/EnableAccessSystemInfo [post] +// @Router /support/accessSystem/DisableAccessSystemInfo [post] // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] diff --git a/dsSupport/docs/docs.go b/dsSupport/docs/docs.go index 443d1f07..7899afbb 100644 --- a/dsSupport/docs/docs.go +++ b/dsSupport/docs/docs.go @@ -1,6 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at -// 2020-09-09 15:18:23.3021677 +0800 CST m=+0.139932701 +// 2020-09-09 15:20:41.904822 +0800 CST m=+0.089966201 package docs @@ -142,6 +142,52 @@ var doc = `{ ] } }, + "/support/accessSystem/DisableAccessSystemInfo": { + "post": { + "description": "禁用接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "禁用接入系统", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 5 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { "post": { "description": "清空接入系统的集成信息", @@ -236,7 +282,7 @@ var doc = `{ }, "/support/accessSystem/EnableAccessSystemInfo": { "post": { - "description": "禁用接入系统", + "description": "启用接入系统", "consumes": [ "application/x-www-form-urlencoded" ], @@ -246,7 +292,7 @@ var doc = `{ "tags": [ "接入系统" ], - "summary": "禁用接入系统", + "summary": "启用接入系统", "parameters": [ { "type": "string", @@ -273,7 +319,7 @@ var doc = `{ } ], "x-sort": [ - 5 + 4 ], "x-tablename": [ "t_app_base" @@ -2650,28 +2696,13 @@ var doc = `{ "MySwagger.Result": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "fail": { - "type": "boolean", - "example": false - }, "message": { "type": "string", - "example": "操作成功" + "example": "接入系统票据验证失败" }, "success": { "type": "boolean", - "example": true - }, - "total": { - "type": "integer", - "example": 120 + "example": false } } } diff --git a/dsSupport/docs/swagger.json b/dsSupport/docs/swagger.json index 80328804..c841556b 100644 --- a/dsSupport/docs/swagger.json +++ b/dsSupport/docs/swagger.json @@ -125,6 +125,52 @@ ] } }, + "/support/accessSystem/DisableAccessSystemInfo": { + "post": { + "description": "禁用接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "禁用接入系统", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 5 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { "post": { "description": "清空接入系统的集成信息", @@ -219,7 +265,7 @@ }, "/support/accessSystem/EnableAccessSystemInfo": { "post": { - "description": "禁用接入系统", + "description": "启用接入系统", "consumes": [ "application/x-www-form-urlencoded" ], @@ -229,7 +275,7 @@ "tags": [ "接入系统" ], - "summary": "禁用接入系统", + "summary": "启用接入系统", "parameters": [ { "type": "string", @@ -256,7 +302,7 @@ } ], "x-sort": [ - 5 + 4 ], "x-tablename": [ "t_app_base" @@ -2633,28 +2679,13 @@ "MySwagger.Result": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "fail": { - "type": "boolean", - "example": false - }, "message": { "type": "string", - "example": "操作成功" + "example": "接入系统票据验证失败" }, "success": { "type": "boolean", - "example": true - }, - "total": { - "type": "integer", - "example": 120 + "example": false } } } diff --git a/dsSupport/docs/swagger.yaml b/dsSupport/docs/swagger.yaml index a54cfe3a..aa54dfd2 100644 --- a/dsSupport/docs/swagger.yaml +++ b/dsSupport/docs/swagger.yaml @@ -331,23 +331,12 @@ definitions: type: object MySwagger.Result: properties: - data: - items: - additionalProperties: true - type: object - type: array - fail: - example: false - type: boolean message: - example: 操作成功 + example: 接入系统票据验证失败 type: string success: - example: true + example: false type: boolean - total: - example: 120 - type: integer type: object host: 127.0.0.1:8005 info: @@ -431,6 +420,35 @@ paths: - 3 x-tablename: - t_app_base + /support/accessSystem/DisableAccessSystemInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 禁用接入系统 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 禁用接入系统 + tags: + - 接入系统 + x-emptylimit: + - appId + x-lengthlimit: + - appId: 36,36 + x-sort: + - 5 + x-tablename: + - t_app_base /support/accessSystem/EmptyAccessSystemIntegratedInfo: post: consumes: @@ -493,7 +511,7 @@ paths: post: consumes: - application/x-www-form-urlencoded - description: 禁用接入系统 + description: 启用接入系统 parameters: - description: 系统ID in: formData @@ -507,7 +525,7 @@ paths: description: OK schema: $ref: '#/definitions/Model.Res' - summary: 禁用接入系统 + summary: 启用接入系统 tags: - 接入系统 x-emptylimit: @@ -515,7 +533,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 5 + - 4 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemIdentityPositionInfo: diff --git a/dsSupport/go.sum b/dsSupport/go.sum index 7d8bb604..465f75cc 100644 --- a/dsSupport/go.sum +++ b/dsSupport/go.sum @@ -98,6 +98,7 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -131,6 +132,7 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.12.0 h1:/f3b24xrDhkhddlaobPe2JgBqfdt+gC/NYl0QY9IOuI= github.com/pkg/sftp v1.12.0/go.mod h1:fUqqXB5vEgVCZ131L+9say31RAri6aF6KDViawhxKK8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -178,6 +180,7 @@ github.com/xormplus/xorm v0.0.0-20200731130200-6811f3bde592 h1:uZkSqOig4izJR611D github.com/xormplus/xorm v0.0.0-20200731130200-6811f3bde592/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -214,6 +217,7 @@ golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200821140526-fda516888d29 h1:mNuhGagCf3lDDm5C0376C/sxh6V7fy9WbdEu/YDNA04= golang.org/x/sys v0.0.0-20200821140526-fda516888d29/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= From f1911269b8142f2ddb668fa5efe5415816716216 Mon Sep 17 00:00:00 2001 From: wubin Date: Wed, 9 Sep 2020 16:32:19 +0800 Subject: [PATCH 2/5] update --- .../AccessSystemController/AccessSystemController.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go index 04115ae0..f886438a 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go @@ -263,17 +263,10 @@ func GetAccessSystemRangeInfo(c *gin.Context) { }) return } - arr := make([]string, 0) - if len(res) > 0 { - for i := range res { - arr = append(arr, res[i]["range_code"].(string)) - } - - } c.JSON(http.StatusOK, Model.Res{ Success: true, Message: "操作成功!", - List: arr, + List: res, }) } From 4091be7a6a230c5c0ce6c61ca92d132a1ce6626a Mon Sep 17 00:00:00 2001 From: wubin Date: Wed, 9 Sep 2020 16:48:44 +0800 Subject: [PATCH 3/5] update --- .../AccessSystem/AccessSystemDao/AccessSystemDao.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go index a7da293c..9e52ee3f 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go @@ -338,14 +338,14 @@ func SaveAppRange(appId string, rangeCodes []string) error { 功能:用于返回APP使用范围准备的实体 */ type OrgBean struct { - OrgId string - OrgName string + OrgId string `json:"org_id"` + OrgName string `json:"org_name"` } type AppRangeBean struct { - FullFlag int - CityCode string - DistrictList []string - OrgList []OrgBean + FullFlag int `json:"full_flag"` + CityCode string `json:"city_code"` + DistrictList []string `json:"district_list"` + OrgList []OrgBean `json:"org_list"` } /** From 8c1f5c19151a4cb56ece8d784379b495b284bd4e Mon Sep 17 00:00:00 2001 From: wubin Date: Wed, 9 Sep 2020 16:55:29 +0800 Subject: [PATCH 4/5] update --- .../RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go index c9c6ceb2..9b2b93a5 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go @@ -1306,7 +1306,7 @@ func SettingTeacherMultipleBureau(in *BaseTeacherProto.SettingMultipleBureauArg) //根据教职工ID获取该教职工所在多单位列表 func PageTeacherMultipleBureau(in *BaseTeacherProto.PageMultipleBureauArg) ([]map[string]interface{}, int32, error) { - var myBuilder = builder.Dialect(builder.MYSQL).Select("t1.person_id,t4.xm,t1.org_id,t2.org_name,t1.bureau_id,t3.org_name as bureau_name,t1.is_main"). + var myBuilder = builder.Dialect(builder.MYSQL).Select("t1.id,t1.person_id,t4.xm,t1.org_id,t2.org_name,t1.bureau_id,t3.org_name as bureau_name,t1.is_main"). From("t_base_teacher_org as t1"). InnerJoin("t_base_organization as t2", "t1.org_id=t2.org_id"). InnerJoin("t_base_organization as t3", "t1.bureau_id=t3.org_id"). From 576b2071f36e2504f73f4d4dc0fd364e292acabc Mon Sep 17 00:00:00 2001 From: wubin Date: Wed, 9 Sep 2020 17:09:43 +0800 Subject: [PATCH 5/5] update --- .../AccessSystemController/AccessSystemController.go | 2 +- .../MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go index f886438a..937e6c94 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go @@ -225,7 +225,7 @@ func EnableAccessSystemInfo(c *gin.Context) { func DisableAccessSystemInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") - err := AccessSystemDao.ChangeAppStatus(appId, -1) + err := AccessSystemDao.ChangeAppStatus(appId, -2) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go index 9e52ee3f..cec6cd31 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go @@ -113,7 +113,7 @@ func UpdateSso(appId string, redirectUri string, logoutUri string) error { } /** -功能:修改接入系统的状态,1:正常,-1:被禁用 +功能:修改接入系统的状态,1:正常,-2:被禁用 */ func ChangeAppStatus(appId string, bUse int32) error { //1、修改数据库