diff --git a/Logs/dsSso.log b/Logs/dsSso.log index b49e6abf..de848927 100644 --- a/Logs/dsSso.log +++ b/Logs/dsSso.log @@ -6,3 +6,5 @@ [Error]2020/08/24 16:59:45 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value [Error]2020/08/24 17:16:04 SqlQueryError sql: expected 1 arguments, got 3 [Error]2020/08/24 17:16:04 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/09 14:31:02 SqlQueryError sql: expected 1 arguments, got 3 +[Error]2020/09/09 14:31:02 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value 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/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go index c9c6ceb2..26fea22f 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"). @@ -1326,7 +1326,7 @@ func PageTeacherMultipleBureau(in *BaseTeacherProto.PageMultipleBureauArg) ([]ma //设置主单位 func SettingMainOrg(in *BaseTeacherProto.SettingMainOrgArg) (bool, string, error) { //将旧的设置为删除状态 - sql := `update t_base_teacher_org set b_use=-2 where person_id=? and b_use=1 and is_main=1` + sql := `update t_base_teacher_org set is_main=0 where person_id=? and b_use=1` _, _ = db.SQL(sql, in.PersonId).Execute() //将新的ID设置为主单位状态 diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go index 933a505d..937e6c94 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemController/AccessSystemController.go @@ -20,6 +20,9 @@ func Routers(r *gin.RouterGroup) { rr.POST("/AddAccessSystemInfo", AddAccessSystemInfo) rr.POST("/UpdateAccessSystemInfo", UpdateAccessSystemInfo) rr.POST("/DeleteAccessSystemInfo", DeleteAccessSystemInfo) + rr.POST("/EnableAccessSystemInfo", EnableAccessSystemInfo) + rr.POST("/DisableAccessSystemInfo", DisableAccessSystemInfo) + rr.GET("/GetAccessSystemRangeInfo", GetAccessSystemRangeInfo) rr.POST("/SettingAccessSystemRangeInfo", SettingAccessSystemRangeInfo) rr.GET("/GetAccessSystemSsoInfo", GetAccessSystemSsoInfo) @@ -178,6 +181,64 @@ func DeleteAccessSystemInfo(c *gin.Context) { }) } +// @Summary 启用接入系统 +// @Description 启用接入系统 +// @Tags 接入系统 +// @Accept application/x-www-form-urlencoded +// @Produce json +// @Param appId formData string true "系统ID" +// @Success 200 {object} Model.Res +// @Router /support/accessSystem/EnableAccessSystemInfo [post] +// @X-EmptyLimit ["appId"] +// @X-LengthLimit [{"appId":"36,36"}] +// @X-TableName ["t_app_base"] +// @X-Sort [4] +func EnableAccessSystemInfo(c *gin.Context) { + //系统ID + appId := c.PostForm("appId") + err := AccessSystemDao.ChangeAppStatus(appId, 1) + if err != nil { + c.JSON(http.StatusOK, Model.Res{ + Success: false, + Message: err.Error(), + }) + return + } + c.JSON(http.StatusOK, Model.Res{ + Success: true, + Message: "操作成功!", + }) +} + +// @Summary 禁用接入系统 +// @Description 禁用接入系统 +// @Tags 接入系统 +// @Accept application/x-www-form-urlencoded +// @Produce json +// @Param appId formData string true "系统ID" +// @Success 200 {object} Model.Res +// @Router /support/accessSystem/DisableAccessSystemInfo [post] +// @X-EmptyLimit ["appId"] +// @X-LengthLimit [{"appId":"36,36"}] +// @X-TableName ["t_app_base"] +// @X-Sort [5] +func DisableAccessSystemInfo(c *gin.Context) { + //系统ID + appId := c.PostForm("appId") + err := AccessSystemDao.ChangeAppStatus(appId, -2) + if err != nil { + c.JSON(http.StatusOK, Model.Res{ + Success: false, + Message: err.Error(), + }) + return + } + c.JSON(http.StatusOK, Model.Res{ + Success: true, + Message: "操作成功!", + }) +} + // @Summary 获取接入系统的使用范围 // @Description 获取接入系统的使用范围 // @Tags 接入系统 @@ -189,7 +250,7 @@ func DeleteAccessSystemInfo(c *gin.Context) { // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [5] +// @X-Sort [6] func GetAccessSystemRangeInfo(c *gin.Context) { //系统ID appId := c.Query("appId") @@ -202,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, }) } @@ -229,7 +283,7 @@ func GetAccessSystemRangeInfo(c *gin.Context) { // @X-EmptyLimit ["orgId","rangeCode"] // @X-LengthLimit [{"orgId":"36,36"},{"rangeCode":"1,3700"}] // @X-TableName ["t_app_base"] -// @X-Sort [4] +// @X-Sort [7] func SettingAccessSystemRangeInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -265,7 +319,7 @@ func SettingAccessSystemRangeInfo(c *gin.Context) { // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [6] +// @X-Sort [8] func GetAccessSystemSsoInfo(c *gin.Context) { //系统ID appId := c.Query("appId") @@ -297,7 +351,7 @@ func GetAccessSystemSsoInfo(c *gin.Context) { // @X-EmptyLimit ["appId","redirectUri"] // @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}] // @X-TableName ["t_app_base"] -// @X-Sort [7] +// @X-Sort [9] func SettingAccessSystemSsoInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -333,7 +387,7 @@ func SettingAccessSystemSsoInfo(c *gin.Context) { // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [8] +// @X-Sort [10] func EmptyAccessSystemSsoInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -363,7 +417,7 @@ func EmptyAccessSystemSsoInfo(c *gin.Context) { // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [6] +// @X-Sort [11] func GetAccessSystemIntegratedInfo(c *gin.Context) { //系统ID appId := c.Query("appId") @@ -396,7 +450,7 @@ func GetAccessSystemIntegratedInfo(c *gin.Context) { // @X-EmptyLimit ["appId","redirectUri"] // @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}] // @X-TableName ["t_app_base"] -// @X-Sort [7] +// @X-Sort [12] func SettingAccessSystemIntegratedInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -440,7 +494,7 @@ func SettingAccessSystemIntegratedInfo(c *gin.Context) { // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [8] +// @X-Sort [13] func EmptyAccessSystemIntegratedInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -467,8 +521,8 @@ func EmptyAccessSystemIntegratedInfo(c *gin.Context) { // @Success 200 {object} Model.Res // @Router /support/accessSystem/GetPositionTreeInfo [get] // @X-RemoveSwaggerField ["id_int","b_use","last_updated_time","postion_flag"] -// @X-Sort [11] -func GetPositionTreeInfo(c *gin.Context) { +// @X-Sort [14] +func GetPositionTreeInfo(c *gin.Context) { r, err := BasePositionService.TreePositionInfo() if err != nil { c.JSON(http.StatusOK, Model.Res{ @@ -495,7 +549,7 @@ func GetPositionTreeInfo(c *gin.Context) { // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [9] +// @X-Sort [15] func GetAccessSystemIdentityPositionInfo(c *gin.Context) { //系统ID appId := c.Query("appId") @@ -570,7 +624,7 @@ func GetAccessSystemIdentityPositionInfo(c *gin.Context) { // @X-LengthLimit [{"appId":"36,36"}] // @X-IntRangeLimit [{"teacherFlag":"1,3"},{"studentFlag":"1,2"},{"parentFlag":"1,2"}] // @X-TableName ["t_app_base"] -// @X-Sort [10] +// @X-Sort [16] func SettingAccessSystemIdentityPositionInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -631,7 +685,7 @@ func SettingAccessSystemIdentityPositionInfo(c *gin.Context) { // @X-EmptyLimit ["appId"] // @X-LengthLimit [{"appId":"36,36"}] // @X-TableName ["t_app_base"] -// @X-Sort [9] +// @X-Sort [17] func GetAccessSystemStageInfo(c *gin.Context) { //系统ID appId := c.Query("appId") @@ -672,7 +726,7 @@ func GetAccessSystemStageInfo(c *gin.Context) { // @X-LengthLimit [{"appId":"36,36"}] // @X-IntRangeLimit [{"teacherFlag":"1,3"},{"studentFlag":"1,2"},{"parentFlag":"1,2"}] // @X-TableName ["t_app_base"] -// @X-Sort [10] +// @X-Sort [18] func SettingAccessSystemStageInfo(c *gin.Context) { //系统ID appId := c.PostForm("appId") @@ -693,7 +747,6 @@ func SettingAccessSystemStageInfo(c *gin.Context) { }) } - // @Summary 获取行政区划信息 // @Description 获取行政区划信息 // @Tags 接入系统 @@ -707,7 +760,7 @@ func SettingAccessSystemStageInfo(c *gin.Context) { // @X-EmptyLimit ["page","limit","areaCode"] // @X-IntLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"}] -// @X-Sort [11] +// @X-Sort [19] func PageGovArea(c *gin.Context) { page := CommonUtil.ConvertStringToInt32(c.Query("page")) limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) @@ -727,4 +780,4 @@ func PageGovArea(c *gin.Context) { Message: "获取成功", Count: r.Count, }) -} \ No newline at end of file +} diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go index 27f5f5c3..cec6cd31 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go @@ -99,6 +99,9 @@ func UpdateSso(appId string, redirectUri string, logoutUri string) error { model := new(models.TAppBase) //修改REDIS缓存 _, err := db.Where("app_id = ?", appId).Get(&model) + //1、清除Redis缓存 + var selector = SqlKit.GetBean("t_app_base") + SqlKit.DeleteCacheByIds([]string{appId}, selector) //删除REDIS缓存 _ = deleteRedisCache(model.AccessKey) model.RedirectUri = redirectUri @@ -109,6 +112,38 @@ func UpdateSso(appId string, redirectUri string, logoutUri string) error { return err } +/** +功能:修改接入系统的状态,1:正常,-2:被禁用 +*/ +func ChangeAppStatus(appId string, bUse int32) error { + //1、修改数据库 + model := new(models.TAppBase) + model.BUse = bUse + _, err := db.ID(appId).Update(model) + if err != nil { + return err + } + //2、获取数据库中的完整数据 + _, err = db.Where("app_id = ?", appId).Get(&model) + if err != nil { + return err + } + + //3、清除主键Redis缓存 + var selector = SqlKit.GetBean("t_app_base") + SqlKit.DeleteCacheByIds([]string{appId}, selector) + + //4、删除SSO中的缓存数据 + if bUse <= 0 { + //删除REDIS缓存 + _ = deleteRedisCache(model.AccessKey) + } else { + //插入REDIS缓存 + _ = insertRedisCache(model.AccessKey, model.SecretKey, model.RedirectUri) + } + return nil +} + /** 功能:清空统一认证信息 */ @@ -116,6 +151,10 @@ func ClearSso(appId string) error { model := new(models.TAppBase) //修改REDIS缓存 _, err := db.Where("app_id = ?", appId).Get(&model) + //1、清除Redis缓存 + var selector = SqlKit.GetBean("t_app_base") + SqlKit.DeleteCacheByIds([]string{appId}, selector) + //删除REDIS缓存 _ = deleteRedisCache(model.AccessKey) model.RedirectUri = "" @@ -295,13 +334,83 @@ func SaveAppRange(appId string, rangeCodes []string) error { return nil } +/* +功能:用于返回APP使用范围准备的实体 +*/ +type OrgBean struct { + OrgId string `json:"org_id"` + OrgName string `json:"org_name"` +} +type AppRangeBean struct { + FullFlag int `json:"full_flag"` + CityCode string `json:"city_code"` + DistrictList []string `json:"district_list"` + OrgList []OrgBean `json:"org_list"` +} + /** 功能:获取指定APP的使用范围对应信息 */ -func GetAppRange(appId string) ([]map[string]interface{}, error) { +func GetAppRange(appId string) (AppRangeBean, error) { + var bean AppRangeBean + var districtList = make([]string, 0) + var orgList = make([]OrgBean, 0) + sql := `select range_code from t_app_range where app_id=?` list, err := db.SQL(sql, appId).Query().List() - return list, err + if len(list) == 0 { + return bean, errors.New("没有找到此app的接入范围数据!") + } + aCode := list[0]["range_code"].(string) + //1、是不是全市 + if len(aCode) == 6 && aCode[len(aCode)-2:] == "00" { + bean.FullFlag = 1 + //城市code + bean.CityCode = list[0]["range_code"].(string) + //县区列表 + bean.DistrictList = make([]string, 0) + //组织机构列表 + bean.OrgList = make([]OrgBean, 0) + } else { + bean.FullFlag = 0 + //如果是县区 + if len(aCode) == 6 { + //查找对应的城市 + bean.CityCode = aCode[0:4] + "00" + } else { + //如果是单位+查找对应的城市 + sql := `select city_code from t_base_organization where org_id=?` + _list2, err := db.SQL(sql, aCode).Query().List() + if err != nil { + return bean, err + } + if len(_list2) == 0 { + return bean, errors.New("没有找到指定的org_id!") + } + bean.CityCode = _list2[0]["city_code"].(string) + } + //2、填充县区和单位列表 + for i := range list { + c := list[i]["range_code"].(string) + //县区 + if len(c) == 6 { + districtList = append(districtList, c) + } else { //单位 + var o OrgBean + o.OrgId = c + sql = `select org_name from t_base_organization where org_id=?` + list2, err := db.SQL(sql, o.OrgId).Query().List() + if err != nil { + return bean, err + } + o.OrgName = list2[0]["org_name"].(string) + orgList = append(orgList, o) + } + } + } + bean.OrgList = orgList + bean.DistrictList = districtList + return bean, err } /******************************************以下为内部函数***************************/ diff --git a/dsSupport/Test/ElasticsearchToGreenPlum/ElasticsearchToGreenPlum.go b/dsSupport/Test/ElasticsearchToGreenPlum/ElasticsearchToGreenPlum.go index 6372c0e0..e147fa6b 100644 --- a/dsSupport/Test/ElasticsearchToGreenPlum/ElasticsearchToGreenPlum.go +++ b/dsSupport/Test/ElasticsearchToGreenPlum/ElasticsearchToGreenPlum.go @@ -77,14 +77,15 @@ func main() { value := gjson.Get(resStr, "data_content") addRecord(pk, value.String()) } - //批量执行 - batchSave(indexName, pk) + //继续用的 scoll_id scrollId := result.ScrollId //第一次命中的个数 var nowCount = int64(len(result.Hits.Hits)) //总的命中个数 allCount := result.TotalHits() + //批量执行 + batchSave(indexName, pk,nowCount,allCount) //开始循环 for { @@ -111,7 +112,7 @@ func main() { if len(pkStrArray) == 0 { //应该是有错误的数据,导致拿不到结果 continue } - batchSave(indexName, pk) + batchSave(indexName, pk,nowCount,allCount) } fmt.Println("索引" + indexName + "同步完成!") } @@ -177,7 +178,7 @@ func addRecord(pk string, jsonStr string) { } //提交 -func batchSave(tableName string, pkName string) { +func batchSave(tableName string, pkName string,nowCount int64,allCount int64) { var pkStr = "" //数组去重 pkStrArray = CommonUtil.RemoveRepeatedElement(pkStrArray) @@ -207,5 +208,5 @@ func batchSave(tableName string, pkName string) { fmt.Println(sql) panic(err) } - fmt.Println(tableName + "批量执行" + CommonUtil.ConvertIntToString(len(insertStrArray)) + "条.") + fmt.Println(tableName + "批量执行" + CommonUtil.ConvertIntToString(len(insertStrArray)) + "条,目前:"+CommonUtil.ConvertInt64ToString(nowCount)+"/"+CommonUtil.ConvertInt64ToString(allCount)) } diff --git a/dsSupport/docs/docs.go b/dsSupport/docs/docs.go index 9ab23368..b4615491 100644 --- a/dsSupport/docs/docs.go +++ b/dsSupport/docs/docs.go @@ -141,6 +141,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": "清空接入系统的集成信息", @@ -180,7 +226,7 @@ var doc = `{ } ], "x-sort": [ - 8 + 13 ], "x-tablename": [ "t_app_base" @@ -226,7 +272,53 @@ var doc = `{ } ], "x-sort": [ - 8 + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EnableAccessSystemInfo": { + "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": [ + 4 ], "x-tablename": [ "t_app_base" @@ -272,7 +364,7 @@ var doc = `{ } ], "x-sort": [ - 9 + 15 ], "x-tablename": [ "t_app_base" @@ -318,7 +410,7 @@ var doc = `{ } ], "x-sort": [ - 6 + 11 ], "x-tablename": [ "t_app_base" @@ -364,7 +456,7 @@ var doc = `{ } ], "x-sort": [ - 5 + 6 ], "x-tablename": [ "t_app_base" @@ -410,7 +502,7 @@ var doc = `{ } ], "x-sort": [ - 6 + 8 ], "x-tablename": [ "t_app_base" @@ -456,7 +548,7 @@ var doc = `{ } ], "x-sort": [ - 9 + 17 ], "x-tablename": [ "t_app_base" @@ -491,7 +583,7 @@ var doc = `{ "postion_flag" ], "x-sort": [ - 11 + 14 ] }, "post": { @@ -649,7 +741,7 @@ var doc = `{ } ], "x-sort": [ - 11 + 19 ] } }, @@ -733,7 +825,7 @@ var doc = `{ } ], "x-sort": [ - 10 + 16 ], "x-tablename": [ "t_app_base" @@ -800,7 +892,7 @@ var doc = `{ } ], "x-sort": [ - 7 + 12 ], "x-tablename": [ "t_app_base" @@ -857,7 +949,7 @@ var doc = `{ } ], "x-sort": [ - 4 + 7 ], "x-tablename": [ "t_app_base" @@ -923,7 +1015,7 @@ var doc = `{ } ], "x-sort": [ - 7 + 9 ], "x-tablename": [ "t_app_base" @@ -988,7 +1080,7 @@ var doc = `{ } ], "x-sort": [ - 10 + 18 ], "x-tablename": [ "t_app_base" diff --git a/dsSupport/docs/swagger.json b/dsSupport/docs/swagger.json index 01ef6b07..367587c2 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": "清空接入系统的集成信息", @@ -164,7 +210,7 @@ } ], "x-sort": [ - 8 + 13 ], "x-tablename": [ "t_app_base" @@ -210,7 +256,53 @@ } ], "x-sort": [ - 8 + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EnableAccessSystemInfo": { + "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": [ + 4 ], "x-tablename": [ "t_app_base" @@ -256,7 +348,7 @@ } ], "x-sort": [ - 9 + 15 ], "x-tablename": [ "t_app_base" @@ -302,7 +394,7 @@ } ], "x-sort": [ - 6 + 11 ], "x-tablename": [ "t_app_base" @@ -348,7 +440,7 @@ } ], "x-sort": [ - 5 + 6 ], "x-tablename": [ "t_app_base" @@ -394,7 +486,7 @@ } ], "x-sort": [ - 6 + 8 ], "x-tablename": [ "t_app_base" @@ -440,7 +532,7 @@ } ], "x-sort": [ - 9 + 17 ], "x-tablename": [ "t_app_base" @@ -475,7 +567,7 @@ "postion_flag" ], "x-sort": [ - 11 + 14 ] }, "post": { @@ -633,7 +725,7 @@ } ], "x-sort": [ - 11 + 19 ] } }, @@ -717,7 +809,7 @@ } ], "x-sort": [ - 10 + 16 ], "x-tablename": [ "t_app_base" @@ -784,7 +876,7 @@ } ], "x-sort": [ - 7 + 12 ], "x-tablename": [ "t_app_base" @@ -841,7 +933,7 @@ } ], "x-sort": [ - 4 + 7 ], "x-tablename": [ "t_app_base" @@ -907,7 +999,7 @@ } ], "x-sort": [ - 7 + 9 ], "x-tablename": [ "t_app_base" @@ -972,7 +1064,7 @@ } ], "x-sort": [ - 10 + 18 ], "x-tablename": [ "t_app_base" diff --git a/dsSupport/docs/swagger.yaml b/dsSupport/docs/swagger.yaml index 86a02fc3..4cb77ae4 100644 --- a/dsSupport/docs/swagger.yaml +++ b/dsSupport/docs/swagger.yaml @@ -431,6 +431,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: @@ -457,7 +486,7 @@ paths: x-lengthlimit: - orgId: 36,36 x-sort: - - 8 + - 13 x-tablename: - t_app_base /support/accessSystem/EmptyAccessSystemSsoInfo: @@ -486,7 +515,36 @@ paths: x-lengthlimit: - orgId: 36,36 x-sort: - - 8 + - 10 + x-tablename: + - t_app_base + /support/accessSystem/EnableAccessSystemInfo: + 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: + - 4 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemIdentityPositionInfo: @@ -515,7 +573,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 9 + - 15 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemIntegratedInfo: @@ -544,7 +602,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 6 + - 11 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemRangeInfo: @@ -573,7 +631,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 5 + - 6 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemSsoInfo: @@ -602,7 +660,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 6 + - 8 x-tablename: - t_app_base /support/accessSystem/GetAccessSystemStageInfo: @@ -631,7 +689,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 9 + - 17 x-tablename: - t_app_base /support/accessSystem/GetPositionTreeInfo: @@ -655,7 +713,7 @@ paths: - last_updated_time - postion_flag x-sort: - - 11 + - 14 post: consumes: - application/x-www-form-urlencoded @@ -759,7 +817,7 @@ paths: x-lengthlimit: - areaCode: 6,6 x-sort: - - 11 + - 19 /support/accessSystem/SettingAccessSystemIdentityPositionInfo: post: consumes: @@ -812,7 +870,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 10 + - 16 x-tablename: - t_app_base /support/accessSystem/SettingAccessSystemIntegratedInfo: @@ -854,7 +912,7 @@ paths: - redirectUri: 2,300 - logoutUri: 2,300 x-sort: - - 7 + - 12 x-tablename: - t_app_base /support/accessSystem/SettingAccessSystemRange: @@ -890,7 +948,7 @@ paths: - orgId: 36,36 - rangeCode: 1,3700 x-sort: - - 4 + - 7 x-tablename: - t_app_base /support/accessSystem/SettingAccessSystemSsoInfo: @@ -931,7 +989,7 @@ paths: - redirectUri: 2,300 - logoutUri: 2,300 x-sort: - - 7 + - 9 x-tablename: - t_app_base /support/accessSystem/SettingAccessSystemStageInfo: @@ -970,7 +1028,7 @@ paths: x-lengthlimit: - appId: 36,36 x-sort: - - 10 + - 18 x-tablename: - t_app_base /support/accessSystem/UpdateAccessSystemInfo: 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=