From 59bad3ac3e2c619b650fb2486fa1afb22546cac1 Mon Sep 17 00:00:00 2001 From: wubin Date: Thu, 17 Sep 2020 08:23:22 +0800 Subject: [PATCH] update --- .../BaseOrganizationDao.go | 2 ++ .../AccessSystemController.go | 4 ++- dsSupport/docs/docs.go | 28 +++++++------------ dsSupport/docs/swagger.json | 26 ++++++----------- dsSupport/docs/swagger.yaml | 20 +++++-------- 5 files changed, 31 insertions(+), 49 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go index f0bc0972..29a8740e 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go @@ -145,6 +145,8 @@ func PageBaseOrganization(in *BaseOrganizationProto.QueryArg) ([]map[string]inte //是哪个单位类型的 if in.OrgType > 0 { myBuilder.Where(builder.Eq{"t1.org_type": in.OrgType}) + } else { + myBuilder.Where(builder.In("t1.org_type", []int{1, 2, 7})) } //学校办学类型 -1为查询全部 diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go index 3934628d..cc0fe037 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go @@ -794,6 +794,7 @@ func PageGovArea(c *gin.Context) { // @Param page query int true "第几页" // @Param limit query int true "一页显示多少条" // @Param areaCode query string true "行政区划码" +// @Param orgType query int true "单位类型 -1:全部 1:教育局 2:学校 7:教辅单位" // @Param orgName query string false "行政区划码" // @Success 200 {object} Model.Res // @Router /support/accessSystem/GetOrganizationList [get] @@ -804,8 +805,9 @@ func GetOrganizationList(c *gin.Context) { page := CommonUtil.ConvertStringToInt32(c.Query("page")) limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) areaCode := c.Query("areaCode") + orgType := CommonUtil.ConvertStringToInt32(c.Query("orgType")) orgName := c.Query("orgName") - r, err := BaseOrganizationService.GetOrganizationList(page, limit, areaCode, orgName) + r, err := BaseOrganizationService.GetOrganizationList(page, limit, areaCode, orgType, orgName) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, diff --git a/dsSupport/docs/docs.go b/dsSupport/docs/docs.go index a9be98d5..1ef24380 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-16 17:27:17.425148 +0800 CST m=+0.158909101 +// 2020-09-17 08:09:16.5994261 +0800 CST m=+0.099943401 package docs @@ -591,6 +591,13 @@ var doc = `{ "in": "query", "required": true }, + { + "type": "integer", + "description": "单位类型 -1:全部 1:教育局 2:学校 7:教辅单位", + "name": "orgType", + "in": "query", + "required": true + }, { "type": "string", "description": "行政区划码", @@ -2759,28 +2766,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 1d0c28e5..ca625d65 100644 --- a/dsSupport/docs/swagger.json +++ b/dsSupport/docs/swagger.json @@ -574,6 +574,13 @@ "in": "query", "required": true }, + { + "type": "integer", + "description": "单位类型 -1:全部 1:教育局 2:学校 7:教辅单位", + "name": "orgType", + "in": "query", + "required": true + }, { "type": "string", "description": "行政区划码", @@ -2742,28 +2749,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 bc3e002e..1b9ac773 100644 --- a/dsSupport/docs/swagger.yaml +++ b/dsSupport/docs/swagger.yaml @@ -334,23 +334,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: @@ -716,6 +705,11 @@ paths: name: areaCode required: true type: string + - description: 单位类型 -1:全部 1:教育局 2:学校 7:教辅单位 + in: query + name: orgType + required: true + type: integer - description: 行政区划码 in: query name: orgName