diff --git a/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go b/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go index 76aed82d..2bbc4273 100644 --- a/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go +++ b/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go @@ -40,7 +40,7 @@ func ReadDataaccess(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go b/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go index eb4a0cc4..6c81e37e 100644 --- a/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go +++ b/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go @@ -47,7 +47,7 @@ func ReadDataerror(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/MyModel/DataSource/DatasourceController/DatasourceController.go b/dsSupport/MyModel/DataSource/DatasourceController/DatasourceController.go index 7c1f1421..7354aafe 100644 --- a/dsSupport/MyModel/DataSource/DatasourceController/DatasourceController.go +++ b/dsSupport/MyModel/DataSource/DatasourceController/DatasourceController.go @@ -15,6 +15,7 @@ func Routers(r *gin.RouterGroup) { rr.POST("/datasource/UpdateDatasource/:id", DatasourceOpenAPI.UpdateDatasource) rr.POST("/datasource/DeleteDatasource/:id", DatasourceOpenAPI.DeleteDatasource) rr.POST("/datasource/ReadESDoc", DatasourceOpenAPI.ReadESDoc) + rr.POST("/datasource/GetESDoc", DatasourceOpenAPI.GetESDoc) return } diff --git a/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go b/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go index eb635993..32387c71 100644 --- a/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go +++ b/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go @@ -40,7 +40,7 @@ func ReadDatasource(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return @@ -211,6 +211,52 @@ func ReadESDoc(c *gin.Context) { success, message, esdata := DatasourceService.ReadESDoc(datasourceCode, orgIDs, page, begin, conditions, sort) //fmt.Println("esdata=", esdata) + if success { + c.JSON(http.StatusOK, MySwagger.Result{ + Success: true, + Fail: false, + Message: message, + Datas: esdata, + }) + + return + } else { + c.JSON(http.StatusOK, MySwagger.Result{ + Success: false, + Fail: true, + Message: message, + }) + + return + } + + return +} + +// 获取es数据 godoc +// @Summary 获取es数据 +// @Description 获取es数据 +// @Tags datasource +// @ID getESDoc +// @Accept json +// @Produce json +// @Param input body MySwagger.DatasourceESSwag true "es数据" +// @Success 200 {object} MySwagger.Result +// @Failure 400 {object} MySwagger.Result +// @Router /v1/openapi/datasource/GetESDoc [post] +func GetESDoc(c *gin.Context) { + var raw MySwagger.DatasourceESSwag + + if err := c.ShouldBindJSON(&raw); err != nil { + c.JSON(http.StatusBadRequest, MySwagger.Result{Success: false, Message: "JSON格式错误"}) + fmt.Println(err) + return + } + + datasourceCode := raw.DatasourceCode + dataID := raw.DataId + + success, message, esdata := DatasourceService.GetESDoc(datasourceCode, dataID) if success { c.JSON(http.StatusOK, MySwagger.Result{ Success: true, diff --git a/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go b/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go index 1365e600..f237249c 100644 --- a/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go +++ b/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go @@ -3,7 +3,6 @@ package DatasourceService import ( "dsSupport/MyModel/AccessSystem/AccessSystemDao" "dsSupport/MyModel/DataSource/DatasourceDAO" - "dsSupport/MyModel/JYT2012/Jyt2012Service" "dsSupport/MyModel/MySwagger" "dsSupport/MyModel/OrgTree/OrgtreeService" "dsSupport/Utils/CacheUtil" @@ -92,9 +91,6 @@ func CreateDatasource(model models.TDataexDatasource) (bool, string, error) { if e != nil { return false, "SystemId不存在", nil } - if !Jyt2012Service.IsJyt2012ExistsById(model.DicId) { - return false, "DicId不存在", nil - } if !OrgtreeService.IsOrgtreeExistsById(model.ProvideOrgid) { return false, "OrgId不存在", nil } @@ -164,6 +160,24 @@ func RemoveDatasource(id string) (bool, string, error) { return result, message, error } +func GetESDoc(datasourceCode string, dataId string) (bool, string, map[string]interface{}) { + result, message, esdata := ES7Util.IndexDocGet(datasourceCode, dataId) + var query = "AND datasource_code='" + datasourceCode + "'" + res, _, data, _ := DatasourceDAO.GetDatasourceRow(query) + var datasourceName interface{} + if res == true { + datasourceName = data["datasource_name"] + } + + m := make(map[string]interface{}) + j, _ := json.Marshal(esdata) + json.Unmarshal(j, &m) + + m["datasource_name"] = datasourceName + + return result, message, m +} + func ReadESDoc(datasourceCode string, orgIDs []string, page int, begin string, conditions map[string]interface{}, sort map[string]interface{}) (bool, string, []map[string]interface{}) { result, message, esdata := ES7Util.SearchDocPage(datasourceCode, orgIDs, page, begin, conditions, sort) var query = "AND datasource_code='" + datasourceCode + "'" diff --git a/dsSupport/MyModel/DataStatistic/DatastatisticOpenAPI/DatastatisticOpenAPI.go b/dsSupport/MyModel/DataStatistic/DatastatisticOpenAPI/DatastatisticOpenAPI.go index 904e7107..e82faaa9 100644 --- a/dsSupport/MyModel/DataStatistic/DatastatisticOpenAPI/DatastatisticOpenAPI.go +++ b/dsSupport/MyModel/DataStatistic/DatastatisticOpenAPI/DatastatisticOpenAPI.go @@ -26,7 +26,7 @@ func ReadESDocAmount(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go b/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go index 59ccb3d7..70dbaece 100644 --- a/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go +++ b/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go @@ -49,7 +49,7 @@ func ReadJyt2012(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go b/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go index 05d145cb..1634ac52 100644 --- a/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go +++ b/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go @@ -37,7 +37,7 @@ func ReadMetadata(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/MyModel/MySwagger/DatasourceESSwag.go b/dsSupport/MyModel/MySwagger/DatasourceESSwag.go index 98503f6f..af55d03a 100644 --- a/dsSupport/MyModel/MySwagger/DatasourceESSwag.go +++ b/dsSupport/MyModel/MySwagger/DatasourceESSwag.go @@ -4,7 +4,8 @@ type DatasourceESSwag struct { DatasourceCode string `json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"` OrgIDs []string `json:"orgids" xorm:"not null comment('提供数据范围【1:本机构,2:本机构以及下属机构,-1:不限制】') VARCHAR(36)" example:"[F38BD0DB-0142-4356-8F2B-623813FC2578,F38BD0DB-0142-4356-8F2B-623813FC2578]"` BeginTime string `json:"begin_time" example:"2020-06-22 17:26:53"` - Conditions map[string]interface{} `json:"conditions" example:"[{res_id:12300,res_name:初一语文一单元作业,teacher_id:123001,time_spend:100s}]"` - Sort map[string]interface{} `json:"sort" example:"[{res_id:12300,res_name:初一语文一单元作业,teacher_id:123001,time_spend:100s}]"` + Conditions map[string]interface{} `json:"conditions" example:""` + Sort map[string]interface{} `json:"sort" example:""` + DataId string `json:"data_id" example:"CfBQnRJPyXMEI5nqLT0"` Page int `json:"page" example:"1"` } \ No newline at end of file diff --git a/dsSupport/MyModel/MySwagger/Result.go b/dsSupport/MyModel/MySwagger/Result.go index 4902cff2..f8662087 100644 --- a/dsSupport/MyModel/MySwagger/Result.go +++ b/dsSupport/MyModel/MySwagger/Result.go @@ -5,5 +5,6 @@ type Result struct { Fail bool `json:"fail" example:"false"` Message string `json:"message" example:"操作成功"` Total int `json:"total" example:"120"` - Data []map[string]interface{} `json:"data" ` + Data map[string]interface{} `json:"data" ` + Datas []map[string]interface{} `json:"data" ` } diff --git a/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go b/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go index 2b44f1df..e529cedb 100644 --- a/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go +++ b/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go @@ -35,7 +35,7 @@ func ReadOrgtree(c *gin.Context) { Fail: false, Message: message, Total: count, - Data: data, + Datas: data, }) return diff --git a/dsSupport/Utils/ES7Util/ES7Util.go b/dsSupport/Utils/ES7Util/ES7Util.go index d7488398..91c663a9 100644 --- a/dsSupport/Utils/ES7Util/ES7Util.go +++ b/dsSupport/Utils/ES7Util/ES7Util.go @@ -1,700 +1,732 @@ -package ES7Util - -import ( - "context" - "dsSupport/Utils/CommonUtil" - "dsSupport/Utils/ConfigUtil" - "dsSupport/Utils/ES7Util/DataEX" - "dsSupport/Utils/ES7Util/MySwagger" - "dsSupport/Utils/RedisUtil" - "encoding/json" - "fmt" - "github.com/olivere/elastic/v7" - "reflect" - "strconv" - "strings" - "time" -) - -var ES7Client *elastic.Client -var ServerVersion string -var CTX context.Context - -/** - * @Author zhangjun - * @Description ES7 客户端工具初始化 - * @Date 2020-06-12 16:34 - * @Param - * @return - **/ -func init() { - //初始化ES Client,使用配置文件 - ES7Client, _ = elastic.NewClient(elastic.SetURL(ConfigUtil.ESAddress...)) - - CTX=context.Background() - - //Ping,获取ES server启动信息 - info, _, _ := ES7Client.Ping(ConfigUtil.ESAddress[0]).Do(CTX) - - ServerVersion =ES7Client.String() +"【"+ info.Version.Number+"】" -} - -/** - * @Author zhangjun - * @Description 创建ES索引 - * @Date 2020-06-12 14:31 - * @Param indexName string ES索引名称【相当于数据库表名】 - * @Param dataMap string ES索引Mapping【相当于数据库表定义】 - * @return bool 成功/失败 - * @return error 异常 - **/ -func IndexCreate(indexName string,dataMap string) (bool,error){ - - const emptyMap = ` -{ - "settings":{ - "number_of_shards": 3, - "number_of_replicas": 1 - }, - "mappings":{ - } -}` - if dataMap==""{ - dataMap=emptyMap - } - - createIndex, err := ES7Client.CreateIndex(indexName).Body(dataMap).Pretty(true).Do(CTX) - - if createIndex.Acknowledged { - - return true,nil - } else{ - - return false,err - } -} - -/** - * @Author zhangjun - * @Description 判断ES索引是否存在,并同步到 Redis 缓存 - * @Date 2020-06-12 14:42 - * @Param indexName string ES索引名称【相当于数据库表名】 - * @return bool 成功/失败 - * @return error 异常 - **/ -func IndexExist(indexName string) (bool,error){ - - count,_:= RedisUtil.RedisClient.Exists("es_index_"+indexName).Result() - - if count>0 { - - return true,nil - }else{ - - exists, _ := ES7Client.IndexExists(indexName).Do(CTX) - - if exists { - RedisUtil.SET("es_index_"+indexName,indexName,10*time.Hour) - - return true,nil - }else { - - return false,nil - } - } -} - -/** - * @Author zhangjun - * @Description 使用一条索引数据创建索引,并删除这条数据 - * @Date 2020-06-12 14:38 - * @Param indexName string ES索引名称【相当于数据库表名】 - * @Param data map[string]interface{} 一条索引数据 - * @return bool 成功/失败 - * @return error 异常 - **/ -func IndexInit(indexName string,dataex map[string]interface{}) (bool,error) { - - IndexCreate(indexName,"") - - begin:= time.Now(); - end:=time.Date(9999,9,9,9,9,9,0,begin.Location()) - - //dataex := make(map[string]interface{}) - //dataex["org_id"]="123" - //dataex["org_name"]="长春市第一中学" - //dataex["org_type"]=2 - var myMap=make(map[string]interface{}) - - for key, val := range dataex { - switch val.(type){ - case int,int32,int64: - new,_:=strconv.ParseFloat(val.(string),64) - myMap[key]=new +0.1 - case float64: - new,_:=val.(float64) - myMap[key]=new +0.1 - default: - myMap[key]=val - } - } - - dataJson := DataEX.ESData{SystemId: "BASE001", - DatasourceId: indexName, - ProvinceId: "220000", - CityId: "220100", - AreaId: "220101", - RegionId: "R22010101", - BureauId: "B22010101", - MainId: "M2201010101", - OrgId: "O22010101010101", - OrgType: 1, - GradeId: "G2020", - ClassId: "C202001", - DeptId: "D20200001", - StageId: "S0001", - DataId: "D22010101010101", - DataContent: myMap, - FileUri: "/path/file", - BeginTime: DataEX.JsonDate(begin) , - EndTime: DataEX.JsonDate(end), - DelFlag: -1, - EnableFlag: 1, - } - - result, err := ES7Client.Index().Index(indexName).Id("2020-2020").BodyJson(dataJson).Do(CTX) - - if result.Result=="created" { - //change by zhangjun 2020-06-30 - //ES7Client.Delete().Index(indexName).Id("2020-2020").Do(CTX) - - res,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) - - bytes,_:=json.Marshal( res[indexName] ) - mapping :=string(bytes) - - new :=strings.Replace(mapping,"\"fields\":{\"keyword\":{\"ignore_above\":256,\"type\":\"keyword\"}},","",-1) - new=strings.Replace(new,"{\"mappings\"","{\"settings\":{\"number_of_shards\": 3,\"number_of_replicas\": 1},\"mappings\"",-1) - new=strings.Replace(new,"\"text\"","\"keyword\"",-1) - - //Delete the dafault date format - //new=strings.Replace(new ,"\"format\":\"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis\",","",-1) - //new=strings.Replace(new,"\"date\"}","\"date\",\"format\":\"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis\"}",-1) - - ES7Client.DeleteIndex(indexName).Do(CTX) - - ES7Client.CreateIndex(indexName).Body(new).Pretty(true).Do(CTX) - - return true,nil - }else{ - - return false,err - } -} - -/** - * @Author zhangjun - * @Description 获取ES索引 Mapping 结构 - * @Date 2020-06-12 17:07 - * @Param indexName string ES索引名称【相当于数据库表名】 - * @return map[string]interface mapping data_content数据 - **/ -func IndexDatamap(indexName string) map[string]interface{} { - result,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) - - return result["data_content"].(map[string]interface{}) -} - -/** - * @Author zhangjun - * @Description 添加文档 - * @Date 2020-06-15 16:52 - * @Param indexName string - * @Param data ESData 文档数据 - * @return - **/ -func IndexDocAdd(indexName string,indexData *DataEX.ESData) (bool,string,error){ - indexData.BeginTime = DataEX.JsonDate(time.Now()); - indexData.EndTime =DataEX.JsonDate(time.Date(9999,9,9,9,9,9,0,time.Now().Location())) - - newid:=CommonUtil.GetUUID() - - result, err := ES7Client.Index().Index(indexName).Id(newid).BodyJson(indexData).Do(CTX) - - if result.Result=="created" { - return true,"文档操作成功",nil - }else{ - return false,"文档操作失败",err - } -} - -/** - * @Author zhangjun - * @Description Kafka 2 ES - * @Date 2020-08-02 02:44 - * @Param - * @return - **/ -func IndexDocAdd2(indexName string,indexData *DataEX.ESData){ - - //defer func() { - // if err := recover(); err != nil { - // fmt.Println("IndexDocAdd2 Panic Recover :", err) - // } - //}() - - indexData.BeginTime = DataEX.JsonDate(time.Now()); - - indexData.EndTime =DataEX.JsonDate(time.Date(9999,9,9,9,9,9,0,time.Now().Location())) - - res, err := ES7Client.Index().Index(indexName).Id(indexData.DataId).BodyJson(indexData).Do(CTX) - - if err != nil { - fmt.Println("IndexDocAdd2 Error :" +err.Error()) - }else { - if res.Result == "created" { - //fmt.Println("IndexDocAdd2 Result :" ,res) - } - if res.Result == "updated"{ - //fmt.Println("IndexDocAdd2 Result :" ,res) - } - } -} - -/** - * @Author zhangjun - * @Description 批量添加文档 - * @Date 2020-06-17 09:31 - * @Param indexName string - * @Param indexData 【】ESData 文档数据数组 - * @return bool 成功/失败 - * @return error 错误 - * @return 【】string 成功数据ID数组 - * @return 【】map【string】string 失败数据map数组 - **/ -func IndexDocAddBatch(indexName string,indexData []*DataEX.ESData) (bool,error,[]string,[]MySwagger.FailResult){ - - var requests []elastic.BulkableRequest - var tempMap =make(map[string]string) - var IDs []string - var Fails []MySwagger.FailResult - - for no:=0;no< len(indexData);no++{ - //indexData[no].BeginTime = time.Now(); - //indexData[no].EndTime =time.Date(9999,9,9,9,9,9,0,time.Now().Location()) - - newid:=CommonUtil.GetUUID() - - //文档ID 绑定 数据ID - tempMap[newid]=indexData[no].DataId - IDs=append(IDs,indexData[no].DataId) - - req := elastic.NewBulkIndexRequest() - - req.Index(indexName).Id(newid).Doc(indexData[no]) - - requests=append(requests,req) - } - - //批量添加索引文档,只返回错误记录 - result, _ := ES7Client.Bulk().Index(indexName).Add(requests...).FilterPath("items.*.error").Do(CTX) - //result, err := ES7Client.Bulk().Index(indexName).Add(requests...).Do(CTX) - - ES7Client.Refresh(indexName).Do(CTX) - - if len(result.Items) ==0 { - - return true,nil,IDs,nil - }else { - for no:=0;no< len(result.Items);no++{ - - reason :=result.Items[no]["index"].Error.Reason - - docID := reason[strings.Index(reason,"document with id '")+ 18:strings.Index(reason,"document with id '") + 18 + 36] - dataID:= tempMap[docID] - - IDs=remove(IDs,dataID) - - var fail MySwagger.FailResult - fail.FailID=dataID - fail.FailReason=reason - - Fails =append(Fails,fail) - } - - return true,nil,IDs,Fails - } -} - -/** - * @Author zhangjun - * @Description 逻辑删除相同dataID的文档 - * @Date 2020-06-16 15:59 - * @Param indexName string 索引名称 - * @Param dataID string 数据ID - * @return - **/ -func IndexDocDel(indexName string,dataID string) (bool,string,error){ - - //change by zhangjun 2020-07-01 - //term := elastic.NewTermQuery("data_id.keyword", dataID) - term := elastic.NewTermQuery("data_id", dataID) - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term).Filter(term2) - - script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", time.Now()) - - response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) - - if err !=nil{ - return false,"文档修改失败",err - } - - if response.Updated >0{ - return true,"文档修改成功",nil - } - return true,"文档修改成功,没有符合筛选条件的文档",nil -} - -/** - * @Author zhangjun - * @Description 批量逻辑删除 - * @Date 2020-06-17 09:33 - * @Param indexName string 索引名称 - * @Param dataIDs 【】string 数据ID数组 - * @return - **/ -func IndexDocDelBatch(indexName string, end time.Time, dataIDs []string) (bool,string,error){ - - //change by zhangjun 2020-07-01 - //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) - term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term).Filter(term2) - - script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(end)) - - response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) - - ES7Client.Refresh(indexName).Do(CTX) - - if err !=nil{ - return false,"文档批量修改失败",err - } - - if response.Updated >0{ - return true,"文档批量修改成功",nil - } - return true,"文档批量修改成功,没有符合筛选条件的文档",nil -} - -func IndexDocDelBatch2(indexName string,end time.Time, dataIDs []string) (bool,string,error){ - - //change by zhangjun 2020-07-01 - //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) - term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) - term2 := elastic.NewTermQuery("enable_flag", 1) - term3 := elastic.NewRangeQuery("begin_time").Lt(end) - - query:=elastic.NewBoolQuery() - query.Filter(term).Filter(term2).Filter(term3) - - script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(end)) - - response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) - - ES7Client.Refresh(indexName).Do(CTX) - - if err !=nil{ - return false,"文档批量修改失败",err - } - - if response.Updated >0{ - return true,"文档批量修改成功",nil - } - return true,"文档批量修改成功,没有符合筛选条件的文档",nil -} - -func IndexDocDelRestore(indexName string, end time.Time, dataIDs []string) (bool,string,error){ - - //change by zhangjun 2020-07-01 - //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) - term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) - term2 := elastic.NewTermQuery("enable_flag", 0) - term3 := elastic.NewTermQuery("end_time",end) - - query:=elastic.NewBoolQuery() - query.Filter(term).Filter(term2).Filter(term3) - - newEnd :=time.Date(9999,9,9,9,9,9,0,time.Now().Location()) - - script := elastic.NewScript("ctx._source.enable_flag = 1 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(newEnd)) - - response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) - - ES7Client.Refresh(indexName).Do(CTX) - - if err !=nil{ - return false,"文档批量修改失败",err - } - - if response.Updated >0{ - return true,"文档批量修改成功",nil - } - return true,"文档批量修改成功,没有符合筛选条件的文档",nil -} - -func IndexDocGet(indexName string,dataID string) (bool,string,DataEX.ESData) { - var data DataEX.ESData - //change by zhangjun 2020-07-01 - //term := elastic.NewTermQuery("data_id.keyword", dataID) - term := elastic.NewTermQuery("data_id", dataID) - term2 := elastic.NewTermQuery("enable_flag", 1) - query:=elastic.NewBoolQuery() - query.Filter(term).Filter(term2) - - result,err:=ES7Client.Search().Index(indexName).Query(query).Do(CTX) - - if err == nil{ - var ttyp DataEX.ESData - for _, item := range result.Each(reflect.TypeOf(ttyp)) { - - data = item.(DataEX.ESData) - break - } - return true,"获取数据成功", data - }else{ - return false,"获取数据失败", data - } -} - -func IndexDocPage(indexName string,orgIDs []string,page int,begin string) (bool,string,[]DataEX.ESData) { - var list []DataEX.ESData - - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term2) - - if len(orgIDs)!=0{ - //change by zhangjun 2020-07-01 - //term := elastic.NewTermsQuery("org_id.keyword", string2interface(orgIDs)...) - term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) - query.Filter(term) - } - - if begin!=""{ - term3 := elastic.NewRangeQuery("begin_time").Gte(begin) - query.Filter(term3) - } - - result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort("begin_time",true).Do(CTX) - - if err == nil{ - var ttyp DataEX.ESData - for _, item := range result.Each(reflect.TypeOf(ttyp)) { - - data := item.(DataEX.ESData) - list=append(list,data) - } - return true,"获取数据成功", list - }else{ - return false,"获取数据失败", list - } -} - -func IndexDocQuery(indexName string,orgIDs []string,page int,conditions []string) (bool,string,[]DataEX.ESData) { - var list []DataEX.ESData - - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term2) - - if len(orgIDs)!=0{ - //change by zhangjun 2020-07-01 - //term := elastic.NewTermsQuery("org_id.keyword", string2interface(orgIDs)...) - term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) - query.Filter(term) - } - - if len(conditions)>0{ - for no:=0;no< len(conditions);no++{ - if strings.Contains(conditions[no],">="){ - arr:=strings.Split(conditions[no],">=") - term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Gte(strings.TrimSpace(arr[1])) - query.Filter(term3) - continue - } - if strings.Contains(conditions[no],"<="){ - arr:=strings.Split(conditions[no],"<=") - term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Lte(strings.TrimSpace(arr[1])) - query.Filter(term3) - continue - } - if strings.Contains(conditions[no],"="){ - arr:=strings.Split(conditions[no],"=") - term3 := elastic.NewTermQuery(strings.TrimSpace(arr[0]) ,strings.TrimSpace(arr[1])) - query.Filter(term3) - continue - } - if strings.Contains(conditions[no],">"){ - arr:=strings.Split(conditions[no],">") - term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Gt(strings.TrimSpace(arr[1])) - query.Filter(term3) - continue - } - if strings.Contains(conditions[no],"<"){ - arr:=strings.Split(conditions[no],"<") - term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Lt(strings.TrimSpace(arr[1])) - query.Filter(term3) - continue - } - } - } - - result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort("begin_time",true).Do(CTX) - - if err == nil{ - var ttyp DataEX.ESData - for _, item := range result.Each(reflect.TypeOf(ttyp)) { - - data := item.(DataEX.ESData) - list=append(list,data) - } - return true,"获取数据成功", list - }else{ - return false,"获取数据失败", list - } -} - -func remove(array []string,del string)[]string { - var result []string - - for no:=0;no< len(array);no++{ - if array[no]!=del{ - result=append(result,array[no]) - } - } - return result -} - -func IndexRefresh(indexName string){ - - ES7Client.Refresh(indexName).Do(CTX) -} - -/** - * @Author zhangjun - * @Description 字符数组转换为接口数组,否则terms query会报错,很坑!!!! - * @Date 2020-06-17 16:10 - * @Param - * @return - **/ -func string2interface(arr []string) []interface{} { - - var result []interface{} - for no:=0;no< len(arr);no++{ - result=append(result,arr[no]) - } - return result -} - -func SearchDocPage(indexName string,orgIDs []string,page int,begin string, conditions map[string]interface{}, sort map[string]interface{}) (bool,string,[]DataEX.ESData) { - var list []DataEX.ESData - var field string - var ascending bool - - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term2) - - if len(orgIDs)!=0{ - term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) - query.Filter(term) - } - - if begin!=""{ - term3 := elastic.NewRangeQuery("begin_time").Gte(begin) - query.Filter(term3) - } - - if conditions != nil { - for k, v := range conditions { - condition := elastic.NewTermsQuery(k, v) - query.Filter(condition) - } - } - - if sort == nil { - field = "begin_time" - ascending = true - } else { - field = sort["field"].(string) - ascending = sort["ascending"].(bool) - } - - result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort(field, ascending).Do(CTX) - - if err == nil{ - var ttyp DataEX.ESData - for _, item := range result.Each(reflect.TypeOf(ttyp)) { - - data := item.(DataEX.ESData) - list=append(list,data) - } - return true,"获取数据成功", list - }else{ - return false,"获取数据失败", list - } -} - -/** - * @Author wangshuai - * @Description 获取ES索引 Mapping 结构 - * @Date 2020-07-31 17:07 - * @Param indexName string ES索引名称【相当于数据库表名】 - * @return map[string]interface mapping data_content数据 - **/ -func IndexDataContentMapping(indexName string) map[string]interface{} { - result,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) - //fmt.Println(result["user_student"].(map[string]interface{})["mappings"].(map[string]interface{})["properties"].(map[string]interface{})["data_content"].(map[string]interface{})["properties"]) - return result[indexName].(map[string]interface{})["mappings"].(map[string]interface{})["properties"].(map[string]interface{})["data_content"].(map[string]interface{})["properties"].(map[string]interface{}) -} - -func GetDocCount(indexName string) (int64, error) { - count, err := ES7Client.Count(indexName).Do(CTX) - - if err != nil { - return count, nil - }else { - return count, err - } -} - -func GetLatestDoc(indexName string) (bool,string,DataEX.ESData) { - var data DataEX.ESData - var list []DataEX.ESData - term2 := elastic.NewTermQuery("enable_flag", 1) - - query:=elastic.NewBoolQuery() - query.Filter(term2) - - result,err:=ES7Client.Search().Index(indexName).Query(query).From(1).Size(1).Sort("begin_time", false).Do(CTX) - if err == nil{ - var ttyp DataEX.ESData - for _, item := range result.Each(reflect.TypeOf(ttyp)) { - - data := item.(DataEX.ESData) - list = append(list,data) - } - return true,"获取数据成功", list[0] - }else{ - return false,"获取数据失败", data - } -} \ No newline at end of file +package ES7Util + +import ( + "context" + "dsSupport/Utils/CommonUtil" + "dsSupport/Utils/ConfigUtil" + "dsSupport/Utils/ES7Util/DataEX" + "dsSupport/Utils/ES7Util/MySwagger" + "dsSupport/Utils/RedisUtil" + "encoding/json" + "fmt" + "github.com/olivere/elastic/v7" + "reflect" + "strconv" + "strings" + "time" +) + +var ES7Client *elastic.Client +var ServerVersion string +var CTX context.Context + +/** + * @Author zhangjun + * @Description ES7 客户端工具初始化 + * @Date 2020-06-12 16:34 + * @Param + * @return + **/ +func init() { + //初始化ES Client,使用配置文件 + ES7Client, _ = elastic.NewClient(elastic.SetURL(ConfigUtil.ESAddress...)) + + CTX=context.Background() + + //Ping,获取ES server启动信息 + info, _, _ := ES7Client.Ping(ConfigUtil.ESAddress[0]).Do(CTX) + + ServerVersion =ES7Client.String() +"【"+ info.Version.Number+"】" +} + +/** + * @Author zhangjun + * @Description 创建ES索引 + * @Date 2020-06-12 14:31 + * @Param indexName string ES索引名称【相当于数据库表名】 + * @Param dataMap string ES索引Mapping【相当于数据库表定义】 + * @return bool 成功/失败 + * @return error 异常 + **/ +func IndexCreate(indexName string,dataMap string) (bool,error){ + + const emptyMap = ` +{ + "settings":{ + "number_of_shards": 3, + "number_of_replicas": 1 + }, + "mappings":{ + } +}` + if dataMap==""{ + dataMap=emptyMap + } + + createIndex, err := ES7Client.CreateIndex(indexName).Body(dataMap).Pretty(true).Do(CTX) + + if createIndex.Acknowledged { + + return true,nil + } else{ + + return false,err + } +} + +/** + * @Author zhangjun + * @Description 判断ES索引是否存在,并同步到 Redis 缓存 + * @Date 2020-06-12 14:42 + * @Param indexName string ES索引名称【相当于数据库表名】 + * @return bool 成功/失败 + * @return error 异常 + **/ +func IndexExist(indexName string) (bool,error){ + + count,_:= RedisUtil.RedisClient.Exists("es_index_"+indexName).Result() + + if count>0 { + + return true,nil + }else{ + + exists, _ := ES7Client.IndexExists(indexName).Do(CTX) + + if exists { + RedisUtil.SET("es_index_"+indexName,indexName,10*time.Hour) + + return true,nil + }else { + + return false,nil + } + } +} + +/** + * @Author zhangjun + * @Description 使用一条索引数据创建索引,并删除这条数据 + * @Date 2020-06-12 14:38 + * @Param indexName string ES索引名称【相当于数据库表名】 + * @Param data map[string]interface{} 一条索引数据 + * @return bool 成功/失败 + * @return error 异常 + **/ +func IndexInit(indexName string,dataex map[string]interface{}) (bool,error) { + + IndexCreate(indexName,"") + + begin:= time.Now(); + end:=time.Date(9999,9,9,9,9,9,0,begin.Location()) + + //dataex := make(map[string]interface{}) + //dataex["org_id"]="123" + //dataex["org_name"]="长春市第一中学" + //dataex["org_type"]=2 + var myMap=make(map[string]interface{}) + + for key, val := range dataex { + switch val.(type){ + case int,int32,int64: + new,_:=strconv.ParseFloat(val.(string),64) + myMap[key]=new +0.1 + case float64: + new,_:=val.(float64) + myMap[key]=new +0.1 + default: + myMap[key]=val + } + } + + dataJson := DataEX.ESData{SystemId: "BASE001", + DatasourceId: indexName, + ProvinceId: "220000", + CityId: "220100", + AreaId: "220101", + RegionId: "R22010101", + BureauId: "B22010101", + MainId: "M2201010101", + OrgId: "O22010101010101", + OrgType: 1, + GradeId: "G2020", + ClassId: "C202001", + DeptId: "D20200001", + StageId: "S0001", + DataId: "D22010101010101", + DataContent: myMap, + FileUri: "/path/file", + BeginTime: DataEX.JsonDate(begin) , + EndTime: DataEX.JsonDate(end), + DelFlag: -1, + EnableFlag: 1, + } + + result, err := ES7Client.Index().Index(indexName).Id("2020-2020").BodyJson(dataJson).Do(CTX) + + if result.Result=="created" { + //change by zhangjun 2020-06-30 + //ES7Client.Delete().Index(indexName).Id("2020-2020").Do(CTX) + + res,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) + + bytes,_:=json.Marshal( res[indexName] ) + mapping :=string(bytes) + + new :=strings.Replace(mapping,"\"fields\":{\"keyword\":{\"ignore_above\":256,\"type\":\"keyword\"}},","",-1) + new=strings.Replace(new,"{\"mappings\"","{\"settings\":{\"number_of_shards\": 3,\"number_of_replicas\": 1},\"mappings\"",-1) + new=strings.Replace(new,"\"text\"","\"keyword\"",-1) + + //Delete the dafault date format + //new=strings.Replace(new ,"\"format\":\"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis\",","",-1) + //new=strings.Replace(new,"\"date\"}","\"date\",\"format\":\"yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis\"}",-1) + + ES7Client.DeleteIndex(indexName).Do(CTX) + + ES7Client.CreateIndex(indexName).Body(new).Pretty(true).Do(CTX) + + return true,nil + }else{ + + return false,err + } +} + +/** + * @Author zhangjun + * @Description 获取ES索引 Mapping 结构 + * @Date 2020-06-12 17:07 + * @Param indexName string ES索引名称【相当于数据库表名】 + * @return map[string]interface mapping data_content数据 + **/ +func IndexDatamap(indexName string) map[string]interface{} { + result,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) + + return result["data_content"].(map[string]interface{}) +} + +/** + * @Author zhangjun + * @Description 添加文档 + * @Date 2020-06-15 16:52 + * @Param indexName string + * @Param data ESData 文档数据 + * @return + **/ +func IndexDocAdd(indexName string,indexData *DataEX.ESData) (bool,string,error){ + indexData.BeginTime = DataEX.JsonDate(time.Now()); + indexData.EndTime =DataEX.JsonDate(time.Date(9999,9,9,9,9,9,0,time.Now().Location())) + + newid:=CommonUtil.GetUUID() + + result, err := ES7Client.Index().Index(indexName).Id(newid).BodyJson(indexData).Do(CTX) + + if result.Result=="created" { + return true,"文档操作成功",nil + }else{ + return false,"文档操作失败",err + } +} + +/** + * @Author zhangjun + * @Description Kafka 2 ES + * @Date 2020-08-02 02:44 + * @Param + * @return + **/ +func IndexDocAdd2(indexName string,indexData *DataEX.ESData){ + + //defer func() { + // if err := recover(); err != nil { + // fmt.Println("IndexDocAdd2 Panic Recover :", err) + // } + //}() + + indexData.BeginTime = DataEX.JsonDate(time.Now()); + + indexData.EndTime =DataEX.JsonDate(time.Date(9999,9,9,9,9,9,0,time.Now().Location())) + + res, err := ES7Client.Index().Index(indexName).Id(indexData.DataId).BodyJson(indexData).Do(CTX) + + if err != nil { + fmt.Println("IndexDocAdd2 Error :" +err.Error()) + }else { + if res.Result == "created" { + //fmt.Println("IndexDocAdd2 Result :" ,res) + } + if res.Result == "updated"{ + //fmt.Println("IndexDocAdd2 Result :" ,res) + } + } +} + +/** + * @Author zhangjun + * @Description 批量添加文档 + * @Date 2020-06-17 09:31 + * @Param indexName string + * @Param indexData 【】ESData 文档数据数组 + * @return bool 成功/失败 + * @return error 错误 + * @return 【】string 成功数据ID数组 + * @return 【】map【string】string 失败数据map数组 + **/ +func IndexDocAddBatch(indexName string,indexData []*DataEX.ESData) (bool,error,[]string,[]MySwagger.FailResult){ + + var requests []elastic.BulkableRequest + var tempMap =make(map[string]string) + var IDs []string + var Fails []MySwagger.FailResult + + for no:=0;no< len(indexData);no++{ + //indexData[no].BeginTime = time.Now(); + //indexData[no].EndTime =time.Date(9999,9,9,9,9,9,0,time.Now().Location()) + + newid:=CommonUtil.GetUUID() + + //文档ID 绑定 数据ID + tempMap[newid]=indexData[no].DataId + IDs=append(IDs,indexData[no].DataId) + + req := elastic.NewBulkIndexRequest() + + req.Index(indexName).Id(newid).Doc(indexData[no]) + + requests=append(requests,req) + } + + //批量添加索引文档,只返回错误记录 + result, _ := ES7Client.Bulk().Index(indexName).Add(requests...).FilterPath("items.*.error").Do(CTX) + //result, err := ES7Client.Bulk().Index(indexName).Add(requests...).Do(CTX) + + ES7Client.Refresh(indexName).Do(CTX) + + if len(result.Items) ==0 { + + return true,nil,IDs,nil + }else { + for no:=0;no< len(result.Items);no++{ + + reason :=result.Items[no]["index"].Error.Reason + + docID := reason[strings.Index(reason,"document with id '")+ 18:strings.Index(reason,"document with id '") + 18 + 36] + dataID:= tempMap[docID] + + IDs=remove(IDs,dataID) + + var fail MySwagger.FailResult + fail.FailID=dataID + fail.FailReason=reason + + Fails =append(Fails,fail) + } + + return true,nil,IDs,Fails + } +} + +/** + * @Author zhangjun + * @Description 逻辑删除相同dataID的文档 + * @Date 2020-06-16 15:59 + * @Param indexName string 索引名称 + * @Param dataID string 数据ID + * @return + **/ +func IndexDocDel(indexName string,dataID string) (bool,string,error){ + + //change by zhangjun 2020-07-01 + //term := elastic.NewTermQuery("data_id.keyword", dataID) + term := elastic.NewTermQuery("data_id", dataID) + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term).Filter(term2) + + script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", time.Now()) + + response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) + + if err !=nil{ + return false,"文档修改失败",err + } + + if response.Updated >0{ + return true,"文档修改成功",nil + } + return true,"文档修改成功,没有符合筛选条件的文档",nil +} + +/** + * @Author zhangjun + * @Description 批量逻辑删除 + * @Date 2020-06-17 09:33 + * @Param indexName string 索引名称 + * @Param dataIDs 【】string 数据ID数组 + * @return + **/ +func IndexDocDelBatch(indexName string, end time.Time, dataIDs []string) (bool,string,error){ + + //change by zhangjun 2020-07-01 + //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) + term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term).Filter(term2) + + script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(end)) + + response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) + + ES7Client.Refresh(indexName).Do(CTX) + + if err !=nil{ + return false,"文档批量修改失败",err + } + + if response.Updated >0{ + return true,"文档批量修改成功",nil + } + return true,"文档批量修改成功,没有符合筛选条件的文档",nil +} + +func IndexDocDelBatch2(indexName string,end time.Time, dataIDs []string) (bool,string,error){ + + //change by zhangjun 2020-07-01 + //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) + term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) + term2 := elastic.NewTermQuery("enable_flag", 1) + term3 := elastic.NewRangeQuery("begin_time").Lt(end) + + query:=elastic.NewBoolQuery() + query.Filter(term).Filter(term2).Filter(term3) + + script := elastic.NewScript("ctx._source.enable_flag = 0 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(end)) + + response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) + + ES7Client.Refresh(indexName).Do(CTX) + + if err !=nil{ + return false,"文档批量修改失败",err + } + + if response.Updated >0{ + return true,"文档批量修改成功",nil + } + return true,"文档批量修改成功,没有符合筛选条件的文档",nil +} + +func IndexDocDelRestore(indexName string, end time.Time, dataIDs []string) (bool,string,error){ + + //change by zhangjun 2020-07-01 + //term := elastic.NewTermsQuery("data_id.keyword", string2interface(dataIDs)...) + term := elastic.NewTermsQuery("data_id", string2interface(dataIDs)...) + term2 := elastic.NewTermQuery("enable_flag", 0) + term3 := elastic.NewTermQuery("end_time",end) + + query:=elastic.NewBoolQuery() + query.Filter(term).Filter(term2).Filter(term3) + + newEnd :=time.Date(9999,9,9,9,9,9,0,time.Now().Location()) + + script := elastic.NewScript("ctx._source.enable_flag = 1 ; ctx._source.end_time = params.now ").Param("now", DataEX.JsonDate(newEnd)) + + response,err:= ES7Client.UpdateByQuery().Index(indexName).Query(query).Script(script).Do(CTX) + + ES7Client.Refresh(indexName).Do(CTX) + + if err !=nil{ + return false,"文档批量修改失败",err + } + + if response.Updated >0{ + return true,"文档批量修改成功",nil + } + return true,"文档批量修改成功,没有符合筛选条件的文档",nil +} + +func IndexDocGet(indexName string,dataID string) (bool,string,DataEX.ESData) { + var data DataEX.ESData + //change by zhangjun 2020-07-01 + //term := elastic.NewTermQuery("data_id.keyword", dataID) + term := elastic.NewTermQuery("data_id", dataID) + term2 := elastic.NewTermQuery("enable_flag", 1) + query:=elastic.NewBoolQuery() + query.Filter(term).Filter(term2) + + result,err:=ES7Client.Search().Index(indexName).Query(query).Do(CTX) + if err == nil{ + var ttyp DataEX.ESData + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + + data = item.(DataEX.ESData) + break + } + + return true,"获取数据成功", data + }else{ + return false,"获取数据失败", data + } +} + +func IndexDocPage(indexName string,orgIDs []string,page int,begin string) (bool,string,[]DataEX.ESData) { + var list []DataEX.ESData + + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term2) + + if len(orgIDs)!=0{ + //change by zhangjun 2020-07-01 + //term := elastic.NewTermsQuery("org_id.keyword", string2interface(orgIDs)...) + term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) + query.Filter(term) + } + + if begin!=""{ + term3 := elastic.NewRangeQuery("begin_time").Gte(begin) + query.Filter(term3) + } + + result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort("begin_time",true).Do(CTX) + + if err == nil{ + var ttyp DataEX.ESData + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + + data := item.(DataEX.ESData) + list=append(list,data) + } + return true,"获取数据成功", list + }else{ + return false,"获取数据失败", list + } +} + +func IndexDocQuery(indexName string,orgIDs []string,page int,conditions []string) (bool,string,[]DataEX.ESData) { + var list []DataEX.ESData + + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term2) + + if len(orgIDs)!=0{ + //change by zhangjun 2020-07-01 + //term := elastic.NewTermsQuery("org_id.keyword", string2interface(orgIDs)...) + term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) + query.Filter(term) + } + + if len(conditions)>0{ + for no:=0;no< len(conditions);no++{ + if strings.Contains(conditions[no],">="){ + arr:=strings.Split(conditions[no],">=") + term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Gte(strings.TrimSpace(arr[1])) + query.Filter(term3) + continue + } + if strings.Contains(conditions[no],"<="){ + arr:=strings.Split(conditions[no],"<=") + term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Lte(strings.TrimSpace(arr[1])) + query.Filter(term3) + continue + } + if strings.Contains(conditions[no],"="){ + arr:=strings.Split(conditions[no],"=") + term3 := elastic.NewTermQuery(strings.TrimSpace(arr[0]) ,strings.TrimSpace(arr[1])) + query.Filter(term3) + continue + } + if strings.Contains(conditions[no],">"){ + arr:=strings.Split(conditions[no],">") + term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Gt(strings.TrimSpace(arr[1])) + query.Filter(term3) + continue + } + if strings.Contains(conditions[no],"<"){ + arr:=strings.Split(conditions[no],"<") + term3 := elastic.NewRangeQuery(strings.TrimSpace(arr[0])).Lt(strings.TrimSpace(arr[1])) + query.Filter(term3) + continue + } + } + } + + result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort("begin_time",true).Do(CTX) + + if err == nil{ + var ttyp DataEX.ESData + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + + data := item.(DataEX.ESData) + list=append(list,data) + } + return true,"获取数据成功", list + }else{ + return false,"获取数据失败", list + } +} + +func remove(array []string,del string)[]string { + var result []string + + for no:=0;no< len(array);no++{ + if array[no]!=del{ + result=append(result,array[no]) + } + } + return result +} + +func IndexRefresh(indexName string){ + + ES7Client.Refresh(indexName).Do(CTX) +} + +/** + * @Author zhangjun + * @Description 字符数组转换为接口数组,否则terms query会报错,很坑!!!! + * @Date 2020-06-17 16:10 + * @Param + * @return + **/ +func string2interface(arr []string) []interface{} { + + var result []interface{} + for no:=0;no< len(arr);no++{ + result=append(result,arr[no]) + } + return result +} + +func SearchDocPage(indexName string,orgIDs []string,page int,begin string, conditions map[string]interface{}, sort map[string]interface{}) (bool,string,[]DataEX.ESData) { + var list []DataEX.ESData + var field string + var ascending bool + + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term2) + + if len(orgIDs)!=0{ + term := elastic.NewTermsQuery("org_id", string2interface(orgIDs)...) + query.Filter(term) + } + + if begin!=""{ + term3 := elastic.NewRangeQuery("begin_time").Gte(begin) + query.Filter(term3) + } + + if conditions != nil { + for k, v := range conditions { + condition := elastic.NewTermsQuery(k, v) + query.Filter(condition) + } + } + + if sort == nil { + field = "begin_time" + ascending = true + } else { + field = sort["field"].(string) + ascending = sort["ascending"].(bool) + } + + result,err:=ES7Client.Search().Index(indexName).Query(query).From(page * 100).Size(100).Sort(field, ascending).Do(CTX) + + if err == nil{ + var ttyp DataEX.ESData + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + + data := item.(DataEX.ESData) + list=append(list,data) + } + return true,"获取数据成功", list + }else{ + return false,"获取数据失败", list + } +} + +/** + * @Author wangshuai + * @Description 获取ES索引 Mapping 结构 + * @Date 2020-07-31 17:07 + * @Param indexName string ES索引名称【相当于数据库表名】 + * @return map[string]interface mapping data_content数据 + **/ +func IndexDataContentMapping(indexName string) map[string]interface{} { + result,_:= ES7Client.GetMapping().Index(indexName).Do(CTX) + //fmt.Println(result["user_student"].(map[string]interface{})["mappings"].(map[string]interface{})["properties"].(map[string]interface{})["data_content"].(map[string]interface{})["properties"]) + return result[indexName].(map[string]interface{})["mappings"].(map[string]interface{})["properties"].(map[string]interface{})["data_content"].(map[string]interface{})["properties"].(map[string]interface{}) +} + +func GetDocCount(indexName string) (int64, error) { + count, err := ES7Client.Count(indexName).Do(CTX) + + if err != nil { + return count, nil + }else { + return count, err + } +} + +func GetLatestDoc(indexName string) (bool,string,DataEX.ESData) { + var data DataEX.ESData + var list []DataEX.ESData + term2 := elastic.NewTermQuery("enable_flag", 1) + + query:=elastic.NewBoolQuery() + query.Filter(term2) + + result,err:=ES7Client.Search().Index(indexName).Query(query).From(1).Size(1).Sort("begin_time", false).Do(CTX) + if err == nil{ + var ttyp DataEX.ESData + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + + data := item.(DataEX.ESData) + list = append(list,data) + } + return true,"获取数据成功", list[0] + }else{ + return false,"获取数据失败", data + } +} + +func GetDoc(indexName string, dataId string) (bool,string,DataEX.ESData) { + var data DataEX.ESData + var list []DataEX.ESData + term2 := elastic.NewTermQuery("enable_flag", 1) + + + //query.Filter(term2) + + term3 := elastic.NewTermQuery("data_id", dataId) + query:=elastic.NewBoolQuery() + query.Filter(term2).Filter(term3) + + count, err := ES7Client.Count(indexName).Query(query).Do(CTX) + fmt.Println("count= ", count) + result,err:=ES7Client.Search().Index(indexName).Query(query).From(0).Sort("begin_time", false).Size(1).Do(CTX) + fmt.Println(result) + if err == nil{ + var ttyp DataEX.ESData + //fmt.Println("reflect.TypeOf(ttyp)=", reflect.TypeOf(ttyp)) + for _, item := range result.Each(reflect.TypeOf(ttyp)) { + //fmt.Println("item=", item) + data := item.(DataEX.ESData) + //fmt.Println("data=", data) + list = append(list,data) + } + fmt.Println("list=", list) + return true,"获取数据成功", data + }else{ + return false,"获取数据失败", data + } +} diff --git a/dsSupport/docs/docs.go b/dsSupport/docs/docs.go index 68001db5..14882969 100644 --- a/dsSupport/docs/docs.go +++ b/dsSupport/docs/docs.go @@ -1,2566 +1,2604 @@ -// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT -// This file was generated by swaggo/swag - -package docs - -import ( - "bytes" - "encoding/json" - "strings" - - "github.com/alecthomas/template" - "github.com/swaggo/swag" -) - -var doc = `{ - "schemes": {{ marshal .Schemes }}, - "swagger": "2.0", - "info": { - "description": "{{.Description}}", - "title": "{{.Title}}", - "contact": { - "name": "API Support", - "url": "http://www.swagger.io/support", - "email": "support@swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "{{.Version}}" - }, - "host": "{{.Host}}", - "basePath": "{{.BasePath}}", - "paths": { - "/support/accessSystem/AddAccessSystemInfo": { - "post": { - "description": "增加接入系统", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "增加接入系统", - "parameters": [ - { - "type": "string", - "description": "系统名称", - "name": "appName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统编码", - "name": "appCode", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "排序号", - "name": "sortId", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appName", - "appCode" - ], - "x-lengthlimit": [ - { - "appName": "2,30" - }, - { - "appCode": "2,20" - } - ], - "x-sort": [ - 1 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/DeleteAccessSystemInfo": { - "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": [ - 3 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { - "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": [ - "orgId" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - } - ], - "x-sort": [ - 8 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/EmptyAccessSystemSsoInfo": { - "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": [ - "orgId" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - } - ], - "x-sort": [ - 8 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemIdentityPositionInfo": { - "get": { - "description": "获取接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 9 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemIntegratedInfo": { - "get": { - "description": "获取接入系统的集成信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的集成信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 6 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemRangeInfo": { - "get": { - "description": "获取接入系统的使用范围", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的使用范围", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "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/GetAccessSystemSsoInfo": { - "get": { - "description": "获取接入系统的统一认证信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的统一认证信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 6 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemStageInfo": { - "get": { - "description": "获取接入系统的学段信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的学段信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 9 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetPositionTreeInfo": { - "get": { - "description": "获取职务树信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取职务树信息", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-removeswaggerfield": [ - "id_int", - "b_use", - "last_updated_time", - "postion_flag" - ], - "x-sort": [ - 11 - ] - }, - "post": { - "description": "登录", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "登录" - ], - "summary": "登录", - "parameters": [ - { - "type": "string", - "description": "登录名", - "name": "loginName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "登录密码", - "name": "loginPwd", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - } - } - }, - "/support/accessSystem/PageAccessSystemInfo": { - "get": { - "description": "获取接入系统列表", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统列表", - "parameters": [ - { - "type": "integer", - "description": "第几页", - "name": "page", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "一页显示多少条", - "name": "limit", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "page", - "limit" - ], - "x-intrangelimit": [ - { - "page": "1,1000" - }, - { - "limit": "1,1000" - } - ], - "x-sort": [ - 0 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemIdentityPositionInfo": { - "post": { - "description": "设置接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "教师身份是否可用 1:可用 2:不可用 3:部分职位可用", - "name": "teacherFlag", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "学生身份是否可用 1:可用 2:不可用", - "name": "studentFlag", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "家长身份是否可用 1:可用 2:不可用", - "name": "parentFlag", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "职务ID,多个用逗号分隔", - "name": "positionIds", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "teacherFlag", - "studentFlag", - "parentFlag" - ], - "x-intrangelimit": [ - { - "teacherFlag": "1,3" - }, - { - "studentFlag": "1,2" - }, - { - "parentFlag": "1,2" - } - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 10 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemIntegratedInfo": { - "post": { - "description": "设置接入系统的集成信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的集成信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "接入系统在集成页面的调用地址", - "name": "appUrl", - "in": "formData", - "required": true - }, - { - "type": "file", - "description": "接入系统在集成页面的图标", - "name": "appIcon", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "redirectUri" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "redirectUri": "2,300" - }, - { - "logoutUri": "2,300" - } - ], - "x-sort": [ - 7 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemRange": { - "post": { - "description": "设置接入系统的使用范围", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的使用范围", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "使用范围的行政区划码、单位ID,多个用逗号分隔", - "name": "rangeCode", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "orgId", - "rangeCode" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - }, - { - "rangeCode": "1,3700" - } - ], - "x-sort": [ - 4 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemSsoInfo": { - "post": { - "description": "设置接入系统的统一认证信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的统一认证信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "统一认证回调地址", - "name": "redirectUri", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "统一认证登出地址", - "name": "logoutUri", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "redirectUri" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "redirectUri": "2,300" - }, - { - "logoutUri": "2,300" - } - ], - "x-sort": [ - 7 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemStageInfo": { - "post": { - "description": "设置接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "学段ID,多个用逗号分隔,如果是通用传-1", - "name": "stageIds", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "stageIds" - ], - "x-intrangelimit": [ - { - "teacherFlag": "1,3" - }, - { - "studentFlag": "1,2" - }, - { - "parentFlag": "1,2" - } - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 10 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/UpdateAccessSystemInfo": { - "post": { - "description": "修改接入系统", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "修改接入系统", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统名称", - "name": "appName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统编码", - "name": "appCode", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "排序号", - "name": "sortId", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "appName", - "appCode" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "appName": "2,30" - }, - { - "appCode": "2,20" - } - ], - "x-sort": [ - 2 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/v1/openapi/dataaccess/CreateDataaccess": { - "post": { - "description": "创建数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "创建数据订阅", - "operationId": "createDataaccess", - "parameters": [ - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/DeleteDataaccess/{id}": { - "post": { - "description": "删除数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "删除数据订阅", - "operationId": "deleteDataaccess", - "parameters": [ - { - "type": "string", - "description": "数据订阅ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/ReadDataaccess": { - "post": { - "description": "获取元数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "获取数据订阅列表", - "operationId": "readDataaccess", - "parameters": [ - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/UpdateDataaccess/{id}": { - "post": { - "description": "修改数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "修改数据订阅", - "operationId": "updateDataaccess", - "parameters": [ - { - "type": "string", - "description": "数据订阅ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataerror/DeleteDataerror/{id}": { - "post": { - "description": "删除数据异常", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataerror" - ], - "summary": "删除数据异常", - "operationId": "deleteDataerror", - "parameters": [ - { - "type": "string", - "description": "数据异常ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataerror/ReadDataerror": { - "post": { - "description": "获取数据异常列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataerror" - ], - "summary": "获取数据异常列表", - "operationId": "readDataerror", - "parameters": [ - { - "description": "数据异常", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataerrorSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/CreateDatasource": { - "post": { - "description": "创建数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "创建数据源", - "operationId": "createDatasource", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/DeleteDatasource/{id}": { - "post": { - "description": "删除数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "删除数据源", - "operationId": "deleteDatasource", - "parameters": [ - { - "type": "string", - "description": "数据源ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/ReadDatasource": { - "post": { - "description": "获取数据源列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "获取数据源列表", - "operationId": "readDatasource", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/ReadESDoc": { - "post": { - "description": "获取es数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "获取es数据列表", - "operationId": "readESDoc", - "parameters": [ - { - "description": "es数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceESSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/UpdateDatasource/{id}": { - "post": { - "description": "修改数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "修改数据源", - "operationId": "updateDatasource", - "parameters": [ - { - "type": "string", - "description": "数据源ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datastatistic/ReadESDocAmount": { - "post": { - "description": "获取数据源列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datastatistic" - ], - "summary": "获取数据源列表", - "operationId": "readESDocAmount", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/CreateJyt2012": { - "post": { - "description": "创建标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "创建标准字典", - "operationId": "createJyt2012", - "parameters": [ - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/DeleteJyt2012/{id}": { - "post": { - "description": "删除标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "删除标准字典", - "operationId": "deleteJyt2012", - "parameters": [ - { - "type": "string", - "description": "标准字典ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/ReadJyt2012": { - "post": { - "description": "获取标准字典列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "获取标准字典列表", - "operationId": "readJyt2012", - "parameters": [ - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/UpdateJyt2012/{id}": { - "post": { - "description": "修改标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "修改标准字典", - "operationId": "updateJyt2012", - "parameters": [ - { - "type": "string", - "description": "标准字典ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/CreateMetadata": { - "post": { - "description": "创建元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "创建元数据", - "operationId": "createMetadata", - "parameters": [ - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/CreateMetadataES": { - "post": { - "description": "创建ES元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "创建ES元数据", - "operationId": "createMetadataES", - "parameters": [ - { - "description": "ES元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataESSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/DeleteMetadata/{id}": { - "post": { - "description": "删除元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "删除元数据", - "operationId": "deleteMetadata", - "parameters": [ - { - "type": "string", - "description": "元数据ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/ReadMetadata": { - "post": { - "description": "获取元数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "获取元数据列表", - "operationId": "readMetadata", - "parameters": [ - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/UpdateMetadata/{id}": { - "post": { - "description": "修改元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "修改元数据", - "operationId": "updateMetadata", - "parameters": [ - { - "type": "string", - "description": "元数据ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/CreateOrgtree": { - "post": { - "description": "创建机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "创建机构", - "operationId": "createOrgtree", - "parameters": [ - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/DeleteOrgtree/{id}": { - "post": { - "description": "删除机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "删除机构", - "operationId": "deleteOrgtree", - "parameters": [ - { - "type": "string", - "description": "机构ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/ReadOrgtree": { - "post": { - "description": "获取机构列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "获取机构列表", - "operationId": "readOrgtree", - "parameters": [ - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/UpdateOrgtree/{id}": { - "post": { - "description": "修改机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "修改机构", - "operationId": "updateOrgtree", - "parameters": [ - { - "type": "string", - "description": "机构ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - } - }, - "definitions": { - "Model.Res": { - "type": "object", - "properties": { - "count": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "list": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "message": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "parentFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "positionList": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "studentFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "success": { - "type": "object" - }, - "teacherFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - } - } - }, - "MySwagger.DataaccessSwag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "consume_orgid": { - "type": "string", - "example": "-1" - }, - "consume_systemid": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "consume_type": { - "type": "integer", - "example": -1 - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "datasource_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "query_flag": { - "type": "integer", - "example": 1 - }, - "set_flag": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.DataerrorSwag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "data_content": { - "type": "string" - }, - "data_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "datasource_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "file_uri": { - "type": "string", - "example": "/file/url/" - }, - "org_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "page": { - "type": "integer", - "example": 1 - }, - "system_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - } - } - }, - "MySwagger.DatasourceESSwag": { - "type": "object", - "properties": { - "begin_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "conditions": { - "type": "object", - "additionalProperties": true - }, - "datasource_code": { - "type": "string", - "example": "org_tree" - }, - "orgids": { - "type": "array", - "items": { - "type": "string" - } - }, - "page": { - "type": "integer", - "example": 1 - }, - "sort": { - "type": "object", - "additionalProperties": true - } - } - }, - "MySwagger.DatasourceSwag": { - "type": "object", - "properties": { - "collect_flag": { - "type": "integer", - "example": 1 - }, - "datasource_code": { - "type": "string", - "example": "org_tree" - }, - "datasource_detail": { - "type": "string", - "example": "教育主管单位、教辅单位、各级各类学校机构信息" - }, - "datasource_name": { - "type": "string", - "example": "组织机构信息" - }, - "datastore_type": { - "type": "integer", - "example": 2 - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "dic_id": { - "type": "string", - "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "provide_orgid": { - "type": "string", - "example": "-1" - }, - "provide_type": { - "type": "integer", - "example": 2 - }, - "set_flag": { - "type": "integer", - "example": 1 - }, - "system_id": { - "type": "string", - "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" - } - } - }, - "MySwagger.Jyt2012Swag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "dic_info": { - "type": "string", - "example": "我是字典项说明" - }, - "dic_name": { - "type": "string", - "example": "10" - }, - "dic_type": { - "type": "integer", - "example": 1 - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "jyt_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "parent_id": { - "type": "string", - "example": "38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "root_flag": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.MetadataESSwag": { - "type": "object", - "properties": { - "index_name": { - "type": "string", - "example": "org_tree" - } - } - }, - "MySwagger.MetadataSwag": { - "type": "object", - "properties": { - "check_dic": { - "type": "integer", - "example": 1 - }, - "check_exist": { - "type": "integer", - "example": 1 - }, - "check_name": { - "type": "integer", - "example": 1 - }, - "check_pattern": { - "type": "integer", - "example": 1 - }, - "check_type": { - "type": "integer", - "example": 1 - }, - "datasource_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "dic_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "item_info": { - "type": "string", - "example": "我是数据项说明" - }, - "item_length": { - "type": "integer", - "example": 36 - }, - "item_name": { - "type": "string", - "example": "org_name" - }, - "item_pattern": { - "type": "string" - }, - "item_type": { - "type": "string", - "example": "string" - }, - "page": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.OrgtreeSwag": { - "type": "object", - "properties": { - "area_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "cat_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "change_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "city_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "create_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "link_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "linksystem_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "org_name": { - "type": "string", - "example": "开平区教育局" - }, - "org_type": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "parent_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "province_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - } - } - }, - "MySwagger.Result": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "fail": { - "type": "boolean", - "example": false - }, - "message": { - "type": "string", - "example": "操作成功" - }, - "success": { - "type": "boolean", - "example": true - }, - "total": { - "type": "integer", - "example": 120 - } - } - } - } -}` - -type swaggerInfo struct { - Version string - Host string - BasePath string - Schemes []string - Title string - Description string -} - -// SwaggerInfo holds exported Swagger Info so clients can modify it -var SwaggerInfo = swaggerInfo{ - Version: "1.0", - Host: "127.0.0.1:8005", - BasePath: "", - Schemes: []string{}, - Title: "基础数据API", - Description: "分布式,大并发,高可用", -} - -type s struct{} - -func (s *s) ReadDoc() string { - sInfo := SwaggerInfo - sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) - - t, err := template.New("swagger_info").Funcs(template.FuncMap{ - "marshal": func(v interface{}) string { - a, _ := json.Marshal(v) - return string(a) - }, - }).Parse(doc) - if err != nil { - return doc - } - - var tpl bytes.Buffer - if err := t.Execute(&tpl, sInfo); err != nil { - return doc - } - - return tpl.String() -} - -func init() { - swag.Register(swag.Name, &s{}) -} +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// This file was generated by swaggo/swag + +package docs + +import ( + "bytes" + "encoding/json" + "strings" + + "github.com/alecthomas/template" + "github.com/swaggo/swag" +) + +var doc = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{.Description}}", + "title": "{{.Title}}", + "contact": { + "name": "API Support", + "url": "http://www.swagger.io/support", + "email": "support@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/support/accessSystem/AddAccessSystemInfo": { + "post": { + "description": "增加接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "增加接入系统", + "parameters": [ + { + "type": "string", + "description": "系统名称", + "name": "appName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统编码", + "name": "appCode", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "排序号", + "name": "sortId", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appName", + "appCode" + ], + "x-lengthlimit": [ + { + "appName": "2,30" + }, + { + "appCode": "2,20" + } + ], + "x-sort": [ + 1 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/DeleteAccessSystemInfo": { + "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": [ + 3 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { + "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": [ + "orgId" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + } + ], + "x-sort": [ + 8 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EmptyAccessSystemSsoInfo": { + "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": [ + "orgId" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + } + ], + "x-sort": [ + 8 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemIdentityPositionInfo": { + "get": { + "description": "获取接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 9 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemIntegratedInfo": { + "get": { + "description": "获取接入系统的集成信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的集成信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 6 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemRangeInfo": { + "get": { + "description": "获取接入系统的使用范围", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的使用范围", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "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/GetAccessSystemSsoInfo": { + "get": { + "description": "获取接入系统的统一认证信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的统一认证信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 6 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemStageInfo": { + "get": { + "description": "获取接入系统的学段信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的学段信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 9 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetPositionTreeInfo": { + "get": { + "description": "获取职务树信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取职务树信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-removeswaggerfield": [ + "id_int", + "b_use", + "last_updated_time", + "postion_flag" + ], + "x-sort": [ + 11 + ] + }, + "post": { + "description": "登录", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "登录", + "parameters": [ + { + "type": "string", + "description": "登录名", + "name": "loginName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "登录密码", + "name": "loginPwd", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + } + } + }, + "/support/accessSystem/PageAccessSystemInfo": { + "get": { + "description": "获取接入系统列表", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统列表", + "parameters": [ + { + "type": "integer", + "description": "第几页", + "name": "page", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "一页显示多少条", + "name": "limit", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "page", + "limit" + ], + "x-intrangelimit": [ + { + "page": "1,1000" + }, + { + "limit": "1,1000" + } + ], + "x-sort": [ + 0 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemIdentityPositionInfo": { + "post": { + "description": "设置接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "教师身份是否可用 1:可用 2:不可用 3:部分职位可用", + "name": "teacherFlag", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "学生身份是否可用 1:可用 2:不可用", + "name": "studentFlag", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "家长身份是否可用 1:可用 2:不可用", + "name": "parentFlag", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "职务ID,多个用逗号分隔", + "name": "positionIds", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "teacherFlag", + "studentFlag", + "parentFlag" + ], + "x-intrangelimit": [ + { + "teacherFlag": "1,3" + }, + { + "studentFlag": "1,2" + }, + { + "parentFlag": "1,2" + } + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemIntegratedInfo": { + "post": { + "description": "设置接入系统的集成信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的集成信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "接入系统在集成页面的调用地址", + "name": "appUrl", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "接入系统在集成页面的图标", + "name": "appIcon", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "redirectUri" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "redirectUri": "2,300" + }, + { + "logoutUri": "2,300" + } + ], + "x-sort": [ + 7 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemRange": { + "post": { + "description": "设置接入系统的使用范围", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的使用范围", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "使用范围的行政区划码、单位ID,多个用逗号分隔", + "name": "rangeCode", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "orgId", + "rangeCode" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + }, + { + "rangeCode": "1,3700" + } + ], + "x-sort": [ + 4 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemSsoInfo": { + "post": { + "description": "设置接入系统的统一认证信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的统一认证信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "统一认证回调地址", + "name": "redirectUri", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "统一认证登出地址", + "name": "logoutUri", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "redirectUri" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "redirectUri": "2,300" + }, + { + "logoutUri": "2,300" + } + ], + "x-sort": [ + 7 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemStageInfo": { + "post": { + "description": "设置接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "学段ID,多个用逗号分隔,如果是通用传-1", + "name": "stageIds", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "stageIds" + ], + "x-intrangelimit": [ + { + "teacherFlag": "1,3" + }, + { + "studentFlag": "1,2" + }, + { + "parentFlag": "1,2" + } + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/UpdateAccessSystemInfo": { + "post": { + "description": "修改接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "修改接入系统", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统名称", + "name": "appName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统编码", + "name": "appCode", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "排序号", + "name": "sortId", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "appName", + "appCode" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "appName": "2,30" + }, + { + "appCode": "2,20" + } + ], + "x-sort": [ + 2 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/v1/openapi/dataaccess/CreateDataaccess": { + "post": { + "description": "创建数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "创建数据订阅", + "operationId": "createDataaccess", + "parameters": [ + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/DeleteDataaccess/{id}": { + "post": { + "description": "删除数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "删除数据订阅", + "operationId": "deleteDataaccess", + "parameters": [ + { + "type": "string", + "description": "数据订阅ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/ReadDataaccess": { + "post": { + "description": "获取元数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "获取数据订阅列表", + "operationId": "readDataaccess", + "parameters": [ + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/UpdateDataaccess/{id}": { + "post": { + "description": "修改数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "修改数据订阅", + "operationId": "updateDataaccess", + "parameters": [ + { + "type": "string", + "description": "数据订阅ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataerror/DeleteDataerror/{id}": { + "post": { + "description": "删除数据异常", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataerror" + ], + "summary": "删除数据异常", + "operationId": "deleteDataerror", + "parameters": [ + { + "type": "string", + "description": "数据异常ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataerror/ReadDataerror": { + "post": { + "description": "获取数据异常列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataerror" + ], + "summary": "获取数据异常列表", + "operationId": "readDataerror", + "parameters": [ + { + "description": "数据异常", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataerrorSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/CreateDatasource": { + "post": { + "description": "创建数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "创建数据源", + "operationId": "createDatasource", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/DeleteDatasource/{id}": { + "post": { + "description": "删除数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "删除数据源", + "operationId": "deleteDatasource", + "parameters": [ + { + "type": "string", + "description": "数据源ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/GetESDoc": { + "post": { + "description": "获取es数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取es数据", + "operationId": "getESDoc", + "parameters": [ + { + "description": "es数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/ReadDatasource": { + "post": { + "description": "获取数据源列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取数据源列表", + "operationId": "readDatasource", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/ReadESDoc": { + "post": { + "description": "获取es数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取es数据列表", + "operationId": "readESDoc", + "parameters": [ + { + "description": "es数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/UpdateDatasource/{id}": { + "post": { + "description": "修改数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "修改数据源", + "operationId": "updateDatasource", + "parameters": [ + { + "type": "string", + "description": "数据源ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datastatistic/ReadESDocAmount": { + "post": { + "description": "获取数据源列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datastatistic" + ], + "summary": "获取数据源列表", + "operationId": "readESDocAmount", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/CreateJyt2012": { + "post": { + "description": "创建标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "创建标准字典", + "operationId": "createJyt2012", + "parameters": [ + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/DeleteJyt2012/{id}": { + "post": { + "description": "删除标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "删除标准字典", + "operationId": "deleteJyt2012", + "parameters": [ + { + "type": "string", + "description": "标准字典ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/ReadJyt2012": { + "post": { + "description": "获取标准字典列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "获取标准字典列表", + "operationId": "readJyt2012", + "parameters": [ + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/UpdateJyt2012/{id}": { + "post": { + "description": "修改标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "修改标准字典", + "operationId": "updateJyt2012", + "parameters": [ + { + "type": "string", + "description": "标准字典ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/CreateMetadata": { + "post": { + "description": "创建元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "创建元数据", + "operationId": "createMetadata", + "parameters": [ + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/CreateMetadataES": { + "post": { + "description": "创建ES元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "创建ES元数据", + "operationId": "createMetadataES", + "parameters": [ + { + "description": "ES元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/DeleteMetadata/{id}": { + "post": { + "description": "删除元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "删除元数据", + "operationId": "deleteMetadata", + "parameters": [ + { + "type": "string", + "description": "元数据ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/ReadMetadata": { + "post": { + "description": "获取元数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "获取元数据列表", + "operationId": "readMetadata", + "parameters": [ + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/UpdateMetadata/{id}": { + "post": { + "description": "修改元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "修改元数据", + "operationId": "updateMetadata", + "parameters": [ + { + "type": "string", + "description": "元数据ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/CreateOrgtree": { + "post": { + "description": "创建机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "创建机构", + "operationId": "createOrgtree", + "parameters": [ + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/DeleteOrgtree/{id}": { + "post": { + "description": "删除机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "删除机构", + "operationId": "deleteOrgtree", + "parameters": [ + { + "type": "string", + "description": "机构ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/ReadOrgtree": { + "post": { + "description": "获取机构列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "获取机构列表", + "operationId": "readOrgtree", + "parameters": [ + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/UpdateOrgtree/{id}": { + "post": { + "description": "修改机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "修改机构", + "operationId": "updateOrgtree", + "parameters": [ + { + "type": "string", + "description": "机构ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + } + }, + "definitions": { + "Model.Res": { + "type": "object", + "properties": { + "count": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "list": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "message": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "parentFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "positionList": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "studentFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "success": { + "type": "object" + }, + "teacherFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + } + } + }, + "MySwagger.DataaccessSwag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "consume_orgid": { + "type": "string", + "example": "-1" + }, + "consume_systemid": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "consume_type": { + "type": "integer", + "example": -1 + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "datasource_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "query_flag": { + "type": "integer", + "example": 1 + }, + "set_flag": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.DataerrorSwag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "data_content": { + "type": "string" + }, + "data_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "datasource_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "file_uri": { + "type": "string", + "example": "/file/url/" + }, + "org_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "page": { + "type": "integer", + "example": 1 + }, + "system_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + } + } + }, + "MySwagger.DatasourceESSwag": { + "type": "object", + "properties": { + "begin_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "conditions": { + "type": "object", + "additionalProperties": true + }, + "data_id": { + "type": "string", + "example": "CfBQnRJPyXMEI5nqLT0" + }, + "datasource_code": { + "type": "string", + "example": "org_tree" + }, + "orgids": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "[F38BD0DB-0142-4356-8F2B-623813FC2578", + "F38BD0DB-0142-4356-8F2B-623813FC2578]" + ] + }, + "page": { + "type": "integer", + "example": 1 + }, + "sort": { + "type": "object", + "additionalProperties": true + } + } + }, + "MySwagger.DatasourceSwag": { + "type": "object", + "properties": { + "collect_flag": { + "type": "integer", + "example": 1 + }, + "datasource_code": { + "type": "string", + "example": "org_tree" + }, + "datasource_detail": { + "type": "string", + "example": "教育主管单位、教辅单位、各级各类学校机构信息" + }, + "datasource_name": { + "type": "string", + "example": "组织机构信息" + }, + "datastore_type": { + "type": "integer", + "example": 2 + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "dic_id": { + "type": "string", + "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "provide_orgid": { + "type": "string", + "example": "-1" + }, + "provide_type": { + "type": "integer", + "example": 2 + }, + "set_flag": { + "type": "integer", + "example": 1 + }, + "system_id": { + "type": "string", + "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" + } + } + }, + "MySwagger.Jyt2012Swag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "dic_info": { + "type": "string", + "example": "我是字典项说明" + }, + "dic_name": { + "type": "string", + "example": "sex" + }, + "dic_type": { + "type": "integer", + "example": 1 + }, + "dic_value": { + "type": "string", + "example": "10" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "jyt_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "parent_id": { + "type": "string", + "example": "38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "root_flag": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.MetadataESSwag": { + "type": "object", + "properties": { + "index_name": { + "type": "string", + "example": "org_tree" + } + } + }, + "MySwagger.MetadataSwag": { + "type": "object", + "properties": { + "check_dic": { + "type": "integer", + "example": 1 + }, + "check_exist": { + "type": "integer", + "example": 1 + }, + "check_name": { + "type": "integer", + "example": 1 + }, + "check_pattern": { + "type": "integer", + "example": 1 + }, + "check_type": { + "type": "integer", + "example": 1 + }, + "datasource_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "dic_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "item_info": { + "type": "string", + "example": "我是数据项说明" + }, + "item_length": { + "type": "integer", + "example": 36 + }, + "item_name": { + "type": "string", + "example": "org_name" + }, + "item_pattern": { + "type": "string" + }, + "item_type": { + "type": "string", + "example": "string" + }, + "page": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.OrgtreeSwag": { + "type": "object", + "properties": { + "area_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "cat_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "change_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "city_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "create_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "link_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "linksystem_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "org_name": { + "type": "string", + "example": "开平区教育局" + }, + "org_type": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "parent_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "province_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + } + } + }, + "MySwagger.Result": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "接入系统票据验证失败" + }, + "success": { + "type": "boolean", + "example": false + } + } + } + } +}` + +type swaggerInfo struct { + Version string + Host string + BasePath string + Schemes []string + Title string + Description string +} + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = swaggerInfo{ + Version: "1.0", + Host: "127.0.0.1:8005", + BasePath: "", + Schemes: []string{}, + Title: "基础数据API", + Description: "分布式,大并发,高可用", +} + +type s struct{} + +func (s *s) ReadDoc() string { + sInfo := SwaggerInfo + sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) + + t, err := template.New("swagger_info").Funcs(template.FuncMap{ + "marshal": func(v interface{}) string { + a, _ := json.Marshal(v) + return string(a) + }, + }).Parse(doc) + if err != nil { + return doc + } + + var tpl bytes.Buffer + if err := t.Execute(&tpl, sInfo); err != nil { + return doc + } + + return tpl.String() +} + +func init() { + swag.Register(swag.Name, &s{}) +} diff --git a/dsSupport/docs/swagger.json b/dsSupport/docs/swagger.json index 398ac542..8d238dd3 100644 --- a/dsSupport/docs/swagger.json +++ b/dsSupport/docs/swagger.json @@ -1,2503 +1,2541 @@ -{ - "swagger": "2.0", - "info": { - "description": "分布式,大并发,高可用", - "title": "基础数据API", - "contact": { - "name": "API Support", - "url": "http://www.swagger.io/support", - "email": "support@swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "1.0" - }, - "host": "127.0.0.1:8005", - "paths": { - "/support/accessSystem/AddAccessSystemInfo": { - "post": { - "description": "增加接入系统", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "增加接入系统", - "parameters": [ - { - "type": "string", - "description": "系统名称", - "name": "appName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统编码", - "name": "appCode", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "排序号", - "name": "sortId", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appName", - "appCode" - ], - "x-lengthlimit": [ - { - "appName": "2,30" - }, - { - "appCode": "2,20" - } - ], - "x-sort": [ - 1 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/DeleteAccessSystemInfo": { - "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": [ - 3 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { - "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": [ - "orgId" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - } - ], - "x-sort": [ - 8 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/EmptyAccessSystemSsoInfo": { - "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": [ - "orgId" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - } - ], - "x-sort": [ - 8 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemIdentityPositionInfo": { - "get": { - "description": "获取接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 9 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemIntegratedInfo": { - "get": { - "description": "获取接入系统的集成信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的集成信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 6 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemRangeInfo": { - "get": { - "description": "获取接入系统的使用范围", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的使用范围", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "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/GetAccessSystemSsoInfo": { - "get": { - "description": "获取接入系统的统一认证信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的统一认证信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 6 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetAccessSystemStageInfo": { - "get": { - "description": "获取接入系统的学段信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统的学段信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 9 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/GetPositionTreeInfo": { - "get": { - "description": "获取职务树信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取职务树信息", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-removeswaggerfield": [ - "id_int", - "b_use", - "last_updated_time", - "postion_flag" - ], - "x-sort": [ - 11 - ] - }, - "post": { - "description": "登录", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "登录" - ], - "summary": "登录", - "parameters": [ - { - "type": "string", - "description": "登录名", - "name": "loginName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "登录密码", - "name": "loginPwd", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - } - } - }, - "/support/accessSystem/PageAccessSystemInfo": { - "get": { - "description": "获取接入系统列表", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "获取接入系统列表", - "parameters": [ - { - "type": "integer", - "description": "第几页", - "name": "page", - "in": "query", - "required": true - }, - { - "type": "integer", - "description": "一页显示多少条", - "name": "limit", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "page", - "limit" - ], - "x-intrangelimit": [ - { - "page": "1,1000" - }, - { - "limit": "1,1000" - } - ], - "x-sort": [ - 0 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemIdentityPositionInfo": { - "post": { - "description": "设置接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "教师身份是否可用 1:可用 2:不可用 3:部分职位可用", - "name": "teacherFlag", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "学生身份是否可用 1:可用 2:不可用", - "name": "studentFlag", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "家长身份是否可用 1:可用 2:不可用", - "name": "parentFlag", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "职务ID,多个用逗号分隔", - "name": "positionIds", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "teacherFlag", - "studentFlag", - "parentFlag" - ], - "x-intrangelimit": [ - { - "teacherFlag": "1,3" - }, - { - "studentFlag": "1,2" - }, - { - "parentFlag": "1,2" - } - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 10 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemIntegratedInfo": { - "post": { - "description": "设置接入系统的集成信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的集成信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "接入系统在集成页面的调用地址", - "name": "appUrl", - "in": "formData", - "required": true - }, - { - "type": "file", - "description": "接入系统在集成页面的图标", - "name": "appIcon", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "redirectUri" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "redirectUri": "2,300" - }, - { - "logoutUri": "2,300" - } - ], - "x-sort": [ - 7 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemRange": { - "post": { - "description": "设置接入系统的使用范围", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的使用范围", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "使用范围的行政区划码、单位ID,多个用逗号分隔", - "name": "rangeCode", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "orgId", - "rangeCode" - ], - "x-lengthlimit": [ - { - "orgId": "36,36" - }, - { - "rangeCode": "1,3700" - } - ], - "x-sort": [ - 4 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemSsoInfo": { - "post": { - "description": "设置接入系统的统一认证信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的统一认证信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "统一认证回调地址", - "name": "redirectUri", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "统一认证登出地址", - "name": "logoutUri", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "redirectUri" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "redirectUri": "2,300" - }, - { - "logoutUri": "2,300" - } - ], - "x-sort": [ - 7 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/SettingAccessSystemStageInfo": { - "post": { - "description": "设置接入系统的身份信息和职务信息", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "设置接入系统的身份信息和职务信息", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "学段ID,多个用逗号分隔,如果是通用传-1", - "name": "stageIds", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "stageIds" - ], - "x-intrangelimit": [ - { - "teacherFlag": "1,3" - }, - { - "studentFlag": "1,2" - }, - { - "parentFlag": "1,2" - } - ], - "x-lengthlimit": [ - { - "appId": "36,36" - } - ], - "x-sort": [ - 10 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/support/accessSystem/UpdateAccessSystemInfo": { - "post": { - "description": "修改接入系统", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "tags": [ - "接入系统" - ], - "summary": "修改接入系统", - "parameters": [ - { - "type": "string", - "description": "系统ID", - "name": "appId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统名称", - "name": "appName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "系统编码", - "name": "appCode", - "in": "formData", - "required": true - }, - { - "type": "integer", - "description": "排序号", - "name": "sortId", - "in": "formData" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Model.Res" - } - } - }, - "x-emptylimit": [ - "appId", - "appName", - "appCode" - ], - "x-lengthlimit": [ - { - "appId": "36,36" - }, - { - "appName": "2,30" - }, - { - "appCode": "2,20" - } - ], - "x-sort": [ - 2 - ], - "x-tablename": [ - "t_app_base" - ] - } - }, - "/v1/openapi/dataaccess/CreateDataaccess": { - "post": { - "description": "创建数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "创建数据订阅", - "operationId": "createDataaccess", - "parameters": [ - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/DeleteDataaccess/{id}": { - "post": { - "description": "删除数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "删除数据订阅", - "operationId": "deleteDataaccess", - "parameters": [ - { - "type": "string", - "description": "数据订阅ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/ReadDataaccess": { - "post": { - "description": "获取元数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "获取数据订阅列表", - "operationId": "readDataaccess", - "parameters": [ - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataaccess/UpdateDataaccess/{id}": { - "post": { - "description": "修改数据订阅", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataaccess" - ], - "summary": "修改数据订阅", - "operationId": "updateDataaccess", - "parameters": [ - { - "type": "string", - "description": "数据订阅ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "数据订阅", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataaccessSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataerror/DeleteDataerror/{id}": { - "post": { - "description": "删除数据异常", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataerror" - ], - "summary": "删除数据异常", - "operationId": "deleteDataerror", - "parameters": [ - { - "type": "string", - "description": "数据异常ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/dataerror/ReadDataerror": { - "post": { - "description": "获取数据异常列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "dataerror" - ], - "summary": "获取数据异常列表", - "operationId": "readDataerror", - "parameters": [ - { - "description": "数据异常", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DataerrorSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/CreateDatasource": { - "post": { - "description": "创建数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "创建数据源", - "operationId": "createDatasource", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/DeleteDatasource/{id}": { - "post": { - "description": "删除数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "删除数据源", - "operationId": "deleteDatasource", - "parameters": [ - { - "type": "string", - "description": "数据源ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/ReadDatasource": { - "post": { - "description": "获取数据源列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "获取数据源列表", - "operationId": "readDatasource", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/ReadESDoc": { - "post": { - "description": "获取es数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "获取es数据列表", - "operationId": "readESDoc", - "parameters": [ - { - "description": "es数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceESSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datasource/UpdateDatasource/{id}": { - "post": { - "description": "修改数据源", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datasource" - ], - "summary": "修改数据源", - "operationId": "updateDatasource", - "parameters": [ - { - "type": "string", - "description": "数据源ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/datastatistic/ReadESDocAmount": { - "post": { - "description": "获取数据源列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "datastatistic" - ], - "summary": "获取数据源列表", - "operationId": "readESDocAmount", - "parameters": [ - { - "description": "数据源", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.DatasourceSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/CreateJyt2012": { - "post": { - "description": "创建标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "创建标准字典", - "operationId": "createJyt2012", - "parameters": [ - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/DeleteJyt2012/{id}": { - "post": { - "description": "删除标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "删除标准字典", - "operationId": "deleteJyt2012", - "parameters": [ - { - "type": "string", - "description": "标准字典ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/ReadJyt2012": { - "post": { - "description": "获取标准字典列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "获取标准字典列表", - "operationId": "readJyt2012", - "parameters": [ - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/jyt2012/UpdateJyt2012/{id}": { - "post": { - "description": "修改标准字典", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "jyt2012" - ], - "summary": "修改标准字典", - "operationId": "updateJyt2012", - "parameters": [ - { - "type": "string", - "description": "标准字典ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "标准字典", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.Jyt2012Swag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/CreateMetadata": { - "post": { - "description": "创建元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "创建元数据", - "operationId": "createMetadata", - "parameters": [ - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/CreateMetadataES": { - "post": { - "description": "创建ES元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "创建ES元数据", - "operationId": "createMetadataES", - "parameters": [ - { - "description": "ES元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataESSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/DeleteMetadata/{id}": { - "post": { - "description": "删除元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "删除元数据", - "operationId": "deleteMetadata", - "parameters": [ - { - "type": "string", - "description": "元数据ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/ReadMetadata": { - "post": { - "description": "获取元数据列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "获取元数据列表", - "operationId": "readMetadata", - "parameters": [ - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/metadata/UpdateMetadata/{id}": { - "post": { - "description": "修改元数据", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "metadata" - ], - "summary": "修改元数据", - "operationId": "updateMetadata", - "parameters": [ - { - "type": "string", - "description": "元数据ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "元数据", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.MetadataSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/CreateOrgtree": { - "post": { - "description": "创建机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "创建机构", - "operationId": "createOrgtree", - "parameters": [ - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/DeleteOrgtree/{id}": { - "post": { - "description": "删除机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "删除机构", - "operationId": "deleteOrgtree", - "parameters": [ - { - "type": "string", - "description": "机构ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/ReadOrgtree": { - "post": { - "description": "获取机构列表", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "获取机构列表", - "operationId": "readOrgtree", - "parameters": [ - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - }, - "/v1/openapi/orgtree/UpdateOrgtree/{id}": { - "post": { - "description": "修改机构", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orgtree" - ], - "summary": "修改机构", - "operationId": "updateOrgtree", - "parameters": [ - { - "type": "string", - "description": "机构ID", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "机构", - "name": "input", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MySwagger.OrgtreeSwag" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/MySwagger.Result" - } - } - } - } - } - }, - "definitions": { - "Model.Res": { - "type": "object", - "properties": { - "count": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "list": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "message": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "parentFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "positionList": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "studentFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - }, - "success": { - "type": "object" - }, - "teacherFlag": { - "description": "omitempty有值就输出,没值则不输出", - "type": "object" - } - } - }, - "MySwagger.DataaccessSwag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "consume_orgid": { - "type": "string", - "example": "-1" - }, - "consume_systemid": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "consume_type": { - "type": "integer", - "example": -1 - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "datasource_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "query_flag": { - "type": "integer", - "example": 1 - }, - "set_flag": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.DataerrorSwag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "data_content": { - "type": "string" - }, - "data_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "datasource_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "file_uri": { - "type": "string", - "example": "/file/url/" - }, - "org_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "page": { - "type": "integer", - "example": 1 - }, - "system_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - } - } - }, - "MySwagger.DatasourceESSwag": { - "type": "object", - "properties": { - "begin_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "conditions": { - "type": "object", - "additionalProperties": true - }, - "datasource_code": { - "type": "string", - "example": "org_tree" - }, - "orgids": { - "type": "array", - "items": { - "type": "string" - } - }, - "page": { - "type": "integer", - "example": 1 - }, - "sort": { - "type": "object", - "additionalProperties": true - } - } - }, - "MySwagger.DatasourceSwag": { - "type": "object", - "properties": { - "collect_flag": { - "type": "integer", - "example": 1 - }, - "datasource_code": { - "type": "string", - "example": "org_tree" - }, - "datasource_detail": { - "type": "string", - "example": "教育主管单位、教辅单位、各级各类学校机构信息" - }, - "datasource_name": { - "type": "string", - "example": "组织机构信息" - }, - "datastore_type": { - "type": "integer", - "example": 2 - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "dic_id": { - "type": "string", - "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "provide_orgid": { - "type": "string", - "example": "-1" - }, - "provide_type": { - "type": "integer", - "example": 2 - }, - "set_flag": { - "type": "integer", - "example": 1 - }, - "system_id": { - "type": "string", - "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" - } - } - }, - "MySwagger.Jyt2012Swag": { - "type": "object", - "properties": { - "change_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "create_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-22 17:26:53" - }, - "dic_info": { - "type": "string", - "example": "我是字典项说明" - }, - "dic_name": { - "type": "string", - "example": "10" - }, - "dic_type": { - "type": "integer", - "example": 1 - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "jyt_flag": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "parent_id": { - "type": "string", - "example": "38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "root_flag": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.MetadataESSwag": { - "type": "object", - "properties": { - "index_name": { - "type": "string", - "example": "org_tree" - } - } - }, - "MySwagger.MetadataSwag": { - "type": "object", - "properties": { - "check_dic": { - "type": "integer", - "example": 1 - }, - "check_exist": { - "type": "integer", - "example": 1 - }, - "check_name": { - "type": "integer", - "example": 1 - }, - "check_pattern": { - "type": "integer", - "example": 1 - }, - "check_type": { - "type": "integer", - "example": 1 - }, - "datasource_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "dic_id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" - }, - "item_info": { - "type": "string", - "example": "我是数据项说明" - }, - "item_length": { - "type": "integer", - "example": 36 - }, - "item_name": { - "type": "string", - "example": "org_name" - }, - "item_pattern": { - "type": "string" - }, - "item_type": { - "type": "string", - "example": "string" - }, - "page": { - "type": "integer", - "example": 1 - } - } - }, - "MySwagger.OrgtreeSwag": { - "type": "object", - "properties": { - "area_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "cat_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "change_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "city_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "create_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "delete_flag": { - "type": "integer", - "example": 1 - }, - "delete_time": { - "type": "string", - "example": "2020-06-11 09:19:26" - }, - "enable_flag": { - "type": "integer", - "example": 1 - }, - "id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "link_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "linksystem_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "org_name": { - "type": "string", - "example": "开平区教育局" - }, - "org_type": { - "type": "integer", - "example": 1 - }, - "page": { - "type": "integer", - "example": 1 - }, - "parent_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - }, - "province_id": { - "type": "string", - "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" - } - } - }, - "MySwagger.Result": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "fail": { - "type": "boolean", - "example": false - }, - "message": { - "type": "string", - "example": "操作成功" - }, - "success": { - "type": "boolean", - "example": true - }, - "total": { - "type": "integer", - "example": 120 - } - } - } - } +{ + "swagger": "2.0", + "info": { + "description": "分布式,大并发,高可用", + "title": "基础数据API", + "contact": { + "name": "API Support", + "url": "http://www.swagger.io/support", + "email": "support@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0" + }, + "host": "127.0.0.1:8005", + "paths": { + "/support/accessSystem/AddAccessSystemInfo": { + "post": { + "description": "增加接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "增加接入系统", + "parameters": [ + { + "type": "string", + "description": "系统名称", + "name": "appName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统编码", + "name": "appCode", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "排序号", + "name": "sortId", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appName", + "appCode" + ], + "x-lengthlimit": [ + { + "appName": "2,30" + }, + { + "appCode": "2,20" + } + ], + "x-sort": [ + 1 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/DeleteAccessSystemInfo": { + "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": [ + 3 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EmptyAccessSystemIntegratedInfo": { + "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": [ + "orgId" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + } + ], + "x-sort": [ + 8 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/EmptyAccessSystemSsoInfo": { + "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": [ + "orgId" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + } + ], + "x-sort": [ + 8 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemIdentityPositionInfo": { + "get": { + "description": "获取接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 9 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemIntegratedInfo": { + "get": { + "description": "获取接入系统的集成信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的集成信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 6 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemRangeInfo": { + "get": { + "description": "获取接入系统的使用范围", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的使用范围", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "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/GetAccessSystemSsoInfo": { + "get": { + "description": "获取接入系统的统一认证信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的统一认证信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 6 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetAccessSystemStageInfo": { + "get": { + "description": "获取接入系统的学段信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统的学段信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 9 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/GetPositionTreeInfo": { + "get": { + "description": "获取职务树信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取职务树信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-removeswaggerfield": [ + "id_int", + "b_use", + "last_updated_time", + "postion_flag" + ], + "x-sort": [ + 11 + ] + }, + "post": { + "description": "登录", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "登录", + "parameters": [ + { + "type": "string", + "description": "登录名", + "name": "loginName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "登录密码", + "name": "loginPwd", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + } + } + }, + "/support/accessSystem/PageAccessSystemInfo": { + "get": { + "description": "获取接入系统列表", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "获取接入系统列表", + "parameters": [ + { + "type": "integer", + "description": "第几页", + "name": "page", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "一页显示多少条", + "name": "limit", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "page", + "limit" + ], + "x-intrangelimit": [ + { + "page": "1,1000" + }, + { + "limit": "1,1000" + } + ], + "x-sort": [ + 0 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemIdentityPositionInfo": { + "post": { + "description": "设置接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "教师身份是否可用 1:可用 2:不可用 3:部分职位可用", + "name": "teacherFlag", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "学生身份是否可用 1:可用 2:不可用", + "name": "studentFlag", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "家长身份是否可用 1:可用 2:不可用", + "name": "parentFlag", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "职务ID,多个用逗号分隔", + "name": "positionIds", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "teacherFlag", + "studentFlag", + "parentFlag" + ], + "x-intrangelimit": [ + { + "teacherFlag": "1,3" + }, + { + "studentFlag": "1,2" + }, + { + "parentFlag": "1,2" + } + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemIntegratedInfo": { + "post": { + "description": "设置接入系统的集成信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的集成信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "接入系统在集成页面的调用地址", + "name": "appUrl", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "接入系统在集成页面的图标", + "name": "appIcon", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "redirectUri" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "redirectUri": "2,300" + }, + { + "logoutUri": "2,300" + } + ], + "x-sort": [ + 7 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemRange": { + "post": { + "description": "设置接入系统的使用范围", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的使用范围", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "使用范围的行政区划码、单位ID,多个用逗号分隔", + "name": "rangeCode", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "orgId", + "rangeCode" + ], + "x-lengthlimit": [ + { + "orgId": "36,36" + }, + { + "rangeCode": "1,3700" + } + ], + "x-sort": [ + 4 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemSsoInfo": { + "post": { + "description": "设置接入系统的统一认证信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的统一认证信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "统一认证回调地址", + "name": "redirectUri", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "统一认证登出地址", + "name": "logoutUri", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "redirectUri" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "redirectUri": "2,300" + }, + { + "logoutUri": "2,300" + } + ], + "x-sort": [ + 7 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/SettingAccessSystemStageInfo": { + "post": { + "description": "设置接入系统的身份信息和职务信息", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "设置接入系统的身份信息和职务信息", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "学段ID,多个用逗号分隔,如果是通用传-1", + "name": "stageIds", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "stageIds" + ], + "x-intrangelimit": [ + { + "teacherFlag": "1,3" + }, + { + "studentFlag": "1,2" + }, + { + "parentFlag": "1,2" + } + ], + "x-lengthlimit": [ + { + "appId": "36,36" + } + ], + "x-sort": [ + 10 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/support/accessSystem/UpdateAccessSystemInfo": { + "post": { + "description": "修改接入系统", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接入系统" + ], + "summary": "修改接入系统", + "parameters": [ + { + "type": "string", + "description": "系统ID", + "name": "appId", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统名称", + "name": "appName", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "系统编码", + "name": "appCode", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "排序号", + "name": "sortId", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Model.Res" + } + } + }, + "x-emptylimit": [ + "appId", + "appName", + "appCode" + ], + "x-lengthlimit": [ + { + "appId": "36,36" + }, + { + "appName": "2,30" + }, + { + "appCode": "2,20" + } + ], + "x-sort": [ + 2 + ], + "x-tablename": [ + "t_app_base" + ] + } + }, + "/v1/openapi/dataaccess/CreateDataaccess": { + "post": { + "description": "创建数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "创建数据订阅", + "operationId": "createDataaccess", + "parameters": [ + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/DeleteDataaccess/{id}": { + "post": { + "description": "删除数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "删除数据订阅", + "operationId": "deleteDataaccess", + "parameters": [ + { + "type": "string", + "description": "数据订阅ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/ReadDataaccess": { + "post": { + "description": "获取元数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "获取数据订阅列表", + "operationId": "readDataaccess", + "parameters": [ + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataaccess/UpdateDataaccess/{id}": { + "post": { + "description": "修改数据订阅", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataaccess" + ], + "summary": "修改数据订阅", + "operationId": "updateDataaccess", + "parameters": [ + { + "type": "string", + "description": "数据订阅ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "数据订阅", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataaccessSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataerror/DeleteDataerror/{id}": { + "post": { + "description": "删除数据异常", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataerror" + ], + "summary": "删除数据异常", + "operationId": "deleteDataerror", + "parameters": [ + { + "type": "string", + "description": "数据异常ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/dataerror/ReadDataerror": { + "post": { + "description": "获取数据异常列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "dataerror" + ], + "summary": "获取数据异常列表", + "operationId": "readDataerror", + "parameters": [ + { + "description": "数据异常", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DataerrorSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/CreateDatasource": { + "post": { + "description": "创建数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "创建数据源", + "operationId": "createDatasource", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/DeleteDatasource/{id}": { + "post": { + "description": "删除数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "删除数据源", + "operationId": "deleteDatasource", + "parameters": [ + { + "type": "string", + "description": "数据源ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/GetESDoc": { + "post": { + "description": "获取es数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取es数据", + "operationId": "getESDoc", + "parameters": [ + { + "description": "es数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/ReadDatasource": { + "post": { + "description": "获取数据源列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取数据源列表", + "operationId": "readDatasource", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/ReadESDoc": { + "post": { + "description": "获取es数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "获取es数据列表", + "operationId": "readESDoc", + "parameters": [ + { + "description": "es数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datasource/UpdateDatasource/{id}": { + "post": { + "description": "修改数据源", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datasource" + ], + "summary": "修改数据源", + "operationId": "updateDatasource", + "parameters": [ + { + "type": "string", + "description": "数据源ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/datastatistic/ReadESDocAmount": { + "post": { + "description": "获取数据源列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "datastatistic" + ], + "summary": "获取数据源列表", + "operationId": "readESDocAmount", + "parameters": [ + { + "description": "数据源", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.DatasourceSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/CreateJyt2012": { + "post": { + "description": "创建标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "创建标准字典", + "operationId": "createJyt2012", + "parameters": [ + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/DeleteJyt2012/{id}": { + "post": { + "description": "删除标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "删除标准字典", + "operationId": "deleteJyt2012", + "parameters": [ + { + "type": "string", + "description": "标准字典ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/ReadJyt2012": { + "post": { + "description": "获取标准字典列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "获取标准字典列表", + "operationId": "readJyt2012", + "parameters": [ + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/jyt2012/UpdateJyt2012/{id}": { + "post": { + "description": "修改标准字典", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "jyt2012" + ], + "summary": "修改标准字典", + "operationId": "updateJyt2012", + "parameters": [ + { + "type": "string", + "description": "标准字典ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "标准字典", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.Jyt2012Swag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/CreateMetadata": { + "post": { + "description": "创建元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "创建元数据", + "operationId": "createMetadata", + "parameters": [ + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/CreateMetadataES": { + "post": { + "description": "创建ES元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "创建ES元数据", + "operationId": "createMetadataES", + "parameters": [ + { + "description": "ES元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataESSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/DeleteMetadata/{id}": { + "post": { + "description": "删除元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "删除元数据", + "operationId": "deleteMetadata", + "parameters": [ + { + "type": "string", + "description": "元数据ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/ReadMetadata": { + "post": { + "description": "获取元数据列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "获取元数据列表", + "operationId": "readMetadata", + "parameters": [ + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/metadata/UpdateMetadata/{id}": { + "post": { + "description": "修改元数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "metadata" + ], + "summary": "修改元数据", + "operationId": "updateMetadata", + "parameters": [ + { + "type": "string", + "description": "元数据ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "元数据", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.MetadataSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/CreateOrgtree": { + "post": { + "description": "创建机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "创建机构", + "operationId": "createOrgtree", + "parameters": [ + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/DeleteOrgtree/{id}": { + "post": { + "description": "删除机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "删除机构", + "operationId": "deleteOrgtree", + "parameters": [ + { + "type": "string", + "description": "机构ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/ReadOrgtree": { + "post": { + "description": "获取机构列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "获取机构列表", + "operationId": "readOrgtree", + "parameters": [ + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + }, + "/v1/openapi/orgtree/UpdateOrgtree/{id}": { + "post": { + "description": "修改机构", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orgtree" + ], + "summary": "修改机构", + "operationId": "updateOrgtree", + "parameters": [ + { + "type": "string", + "description": "机构ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "机构", + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MySwagger.OrgtreeSwag" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/MySwagger.Result" + } + } + } + } + } + }, + "definitions": { + "Model.Res": { + "type": "object", + "properties": { + "count": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "list": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "message": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "parentFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "positionList": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "studentFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + }, + "success": { + "type": "object" + }, + "teacherFlag": { + "description": "omitempty有值就输出,没值则不输出", + "type": "object" + } + } + }, + "MySwagger.DataaccessSwag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "consume_orgid": { + "type": "string", + "example": "-1" + }, + "consume_systemid": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "consume_type": { + "type": "integer", + "example": -1 + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "datasource_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "query_flag": { + "type": "integer", + "example": 1 + }, + "set_flag": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.DataerrorSwag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "data_content": { + "type": "string" + }, + "data_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "datasource_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "file_uri": { + "type": "string", + "example": "/file/url/" + }, + "org_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "page": { + "type": "integer", + "example": 1 + }, + "system_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + } + } + }, + "MySwagger.DatasourceESSwag": { + "type": "object", + "properties": { + "begin_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "conditions": { + "type": "object", + "additionalProperties": true + }, + "data_id": { + "type": "string", + "example": "CfBQnRJPyXMEI5nqLT0" + }, + "datasource_code": { + "type": "string", + "example": "org_tree" + }, + "orgids": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "[F38BD0DB-0142-4356-8F2B-623813FC2578", + "F38BD0DB-0142-4356-8F2B-623813FC2578]" + ] + }, + "page": { + "type": "integer", + "example": 1 + }, + "sort": { + "type": "object", + "additionalProperties": true + } + } + }, + "MySwagger.DatasourceSwag": { + "type": "object", + "properties": { + "collect_flag": { + "type": "integer", + "example": 1 + }, + "datasource_code": { + "type": "string", + "example": "org_tree" + }, + "datasource_detail": { + "type": "string", + "example": "教育主管单位、教辅单位、各级各类学校机构信息" + }, + "datasource_name": { + "type": "string", + "example": "组织机构信息" + }, + "datastore_type": { + "type": "integer", + "example": 2 + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "dic_id": { + "type": "string", + "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "provide_orgid": { + "type": "string", + "example": "-1" + }, + "provide_type": { + "type": "integer", + "example": 2 + }, + "set_flag": { + "type": "integer", + "example": 1 + }, + "system_id": { + "type": "string", + "example": "1C0F6832-65C6-4888-BDDE-A3373B11499D" + } + } + }, + "MySwagger.Jyt2012Swag": { + "type": "object", + "properties": { + "change_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "create_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-22 17:26:53" + }, + "dic_info": { + "type": "string", + "example": "我是字典项说明" + }, + "dic_name": { + "type": "string", + "example": "sex" + }, + "dic_type": { + "type": "integer", + "example": 1 + }, + "dic_value": { + "type": "string", + "example": "10" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "jyt_flag": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "parent_id": { + "type": "string", + "example": "38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "root_flag": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.MetadataESSwag": { + "type": "object", + "properties": { + "index_name": { + "type": "string", + "example": "org_tree" + } + } + }, + "MySwagger.MetadataSwag": { + "type": "object", + "properties": { + "check_dic": { + "type": "integer", + "example": 1 + }, + "check_exist": { + "type": "integer", + "example": 1 + }, + "check_name": { + "type": "integer", + "example": 1 + }, + "check_pattern": { + "type": "integer", + "example": 1 + }, + "check_type": { + "type": "integer", + "example": 1 + }, + "datasource_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "dic_id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "F38BD0DB-0142-4356-8F2B-623813FC2578" + }, + "item_info": { + "type": "string", + "example": "我是数据项说明" + }, + "item_length": { + "type": "integer", + "example": 36 + }, + "item_name": { + "type": "string", + "example": "org_name" + }, + "item_pattern": { + "type": "string" + }, + "item_type": { + "type": "string", + "example": "string" + }, + "page": { + "type": "integer", + "example": 1 + } + } + }, + "MySwagger.OrgtreeSwag": { + "type": "object", + "properties": { + "area_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "cat_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "change_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "city_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "create_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "delete_flag": { + "type": "integer", + "example": 1 + }, + "delete_time": { + "type": "string", + "example": "2020-06-11 09:19:26" + }, + "enable_flag": { + "type": "integer", + "example": 1 + }, + "id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "link_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "linksystem_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "org_name": { + "type": "string", + "example": "开平区教育局" + }, + "org_type": { + "type": "integer", + "example": 1 + }, + "page": { + "type": "integer", + "example": 1 + }, + "parent_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + }, + "province_id": { + "type": "string", + "example": "0383FF67-CCBA-4256-891E-BAFD487547FA" + } + } + }, + "MySwagger.Result": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "接入系统票据验证失败" + }, + "success": { + "type": "boolean", + "example": false + } + } + } + } } \ No newline at end of file diff --git a/dsSupport/docs/swagger.yaml b/dsSupport/docs/swagger.yaml index b7331312..2a509f21 100644 --- a/dsSupport/docs/swagger.yaml +++ b/dsSupport/docs/swagger.yaml @@ -1,1660 +1,1685 @@ -definitions: - Model.Res: - properties: - count: - description: omitempty有值就输出,没值则不输出 - type: object - list: - description: omitempty有值就输出,没值则不输出 - type: object - message: - description: omitempty有值就输出,没值则不输出 - type: object - parentFlag: - description: omitempty有值就输出,没值则不输出 - type: object - positionList: - description: omitempty有值就输出,没值则不输出 - type: object - studentFlag: - description: omitempty有值就输出,没值则不输出 - type: object - success: - type: object - teacherFlag: - description: omitempty有值就输出,没值则不输出 - type: object - type: object - MySwagger.DataaccessSwag: - properties: - change_time: - example: "2020-06-22 17:26:53" - type: string - consume_orgid: - example: "-1" - type: string - consume_systemid: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - consume_type: - example: -1 - type: integer - create_time: - example: "2020-06-22 17:26:53" - type: string - datasource_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - delete_flag: - example: 1 - type: integer - delete_time: - example: "2020-06-22 17:26:53" - type: string - enable_flag: - example: 1 - type: integer - page: - example: 1 - type: integer - query_flag: - example: 1 - type: integer - set_flag: - example: 1 - type: integer - type: object - MySwagger.DataerrorSwag: - properties: - change_time: - example: "2020-06-22 17:26:53" - type: string - create_time: - example: "2020-06-22 17:26:53" - type: string - data_content: - type: string - data_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - datasource_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - delete_flag: - example: 1 - type: integer - delete_time: - example: "2020-06-22 17:26:53" - type: string - enable_flag: - example: 1 - type: integer - file_uri: - example: /file/url/ - type: string - org_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - page: - example: 1 - type: integer - system_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - type: object - MySwagger.DatasourceESSwag: - properties: - begin_time: - example: "2020-06-22 17:26:53" - type: string - conditions: - additionalProperties: true - type: object - datasource_code: - example: org_tree - type: string - orgids: - items: - type: string - type: array - page: - example: 1 - type: integer - sort: - additionalProperties: true - type: object - type: object - MySwagger.DatasourceSwag: - properties: - collect_flag: - example: 1 - type: integer - datasource_code: - example: org_tree - type: string - datasource_detail: - example: 教育主管单位、教辅单位、各级各类学校机构信息 - type: string - datasource_name: - example: 组织机构信息 - type: string - datastore_type: - example: 2 - type: integer - delete_flag: - example: 1 - type: integer - dic_id: - example: 1C0F6832-65C6-4888-BDDE-A3373B11499D - type: string - enable_flag: - example: 1 - type: integer - page: - example: 1 - type: integer - provide_orgid: - example: "-1" - type: string - provide_type: - example: 2 - type: integer - set_flag: - example: 1 - type: integer - system_id: - example: 1C0F6832-65C6-4888-BDDE-A3373B11499D - type: string - type: object - MySwagger.Jyt2012Swag: - properties: - change_time: - example: "2020-06-22 17:26:53" - type: string - create_time: - example: "2020-06-22 17:26:53" - type: string - delete_flag: - example: 1 - type: integer - delete_time: - example: "2020-06-22 17:26:53" - type: string - dic_info: - example: 我是字典项说明 - type: string - dic_name: - example: "10" - type: string - dic_type: - example: 1 - type: integer - enable_flag: - example: 1 - type: integer - id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - jyt_flag: - example: 1 - type: integer - page: - example: 1 - type: integer - parent_id: - example: 38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - root_flag: - example: 1 - type: integer - type: object - MySwagger.MetadataESSwag: - properties: - index_name: - example: org_tree - type: string - type: object - MySwagger.MetadataSwag: - properties: - check_dic: - example: 1 - type: integer - check_exist: - example: 1 - type: integer - check_name: - example: 1 - type: integer - check_pattern: - example: 1 - type: integer - check_type: - example: 1 - type: integer - datasource_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - delete_flag: - example: 1 - type: integer - dic_id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - enable_flag: - example: 1 - type: integer - id: - example: F38BD0DB-0142-4356-8F2B-623813FC2578 - type: string - item_info: - example: 我是数据项说明 - type: string - item_length: - example: 36 - type: integer - item_name: - example: org_name - type: string - item_pattern: - type: string - item_type: - example: string - type: string - page: - example: 1 - type: integer - type: object - MySwagger.OrgtreeSwag: - properties: - area_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - cat_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - change_time: - example: "2020-06-11 09:19:26" - type: string - city_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - create_time: - example: "2020-06-11 09:19:26" - type: string - delete_flag: - example: 1 - type: integer - delete_time: - example: "2020-06-11 09:19:26" - type: string - enable_flag: - example: 1 - type: integer - id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - link_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - linksystem_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - org_name: - example: 开平区教育局 - type: string - org_type: - example: 1 - type: integer - page: - example: 1 - type: integer - parent_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - province_id: - example: 0383FF67-CCBA-4256-891E-BAFD487547FA - type: string - type: object - MySwagger.Result: - properties: - data: - items: - additionalProperties: true - type: object - type: array - fail: - example: false - type: boolean - message: - example: 操作成功 - type: string - success: - example: true - type: boolean - total: - example: 120 - type: integer - type: object -host: 127.0.0.1:8005 -info: - contact: - email: support@swagger.io - name: API Support - url: http://www.swagger.io/support - description: 分布式,大并发,高可用 - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - title: 基础数据API - version: "1.0" -paths: - /support/accessSystem/AddAccessSystemInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 增加接入系统 - parameters: - - description: 系统名称 - in: formData - name: appName - required: true - type: string - - description: 系统编码 - in: formData - name: appCode - required: true - type: string - - description: 排序号 - in: formData - name: sortId - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 增加接入系统 - tags: - - 接入系统 - x-emptylimit: - - appName - - appCode - x-lengthlimit: - - appName: 2,30 - - appCode: 2,20 - x-sort: - - 1 - x-tablename: - - t_app_base - /support/accessSystem/DeleteAccessSystemInfo: - 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: - - 3 - x-tablename: - - t_app_base - /support/accessSystem/EmptyAccessSystemIntegratedInfo: - 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: - - orgId - x-lengthlimit: - - orgId: 36,36 - x-sort: - - 8 - x-tablename: - - t_app_base - /support/accessSystem/EmptyAccessSystemSsoInfo: - 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: - - orgId - x-lengthlimit: - - orgId: 36,36 - x-sort: - - 8 - x-tablename: - - t_app_base - /support/accessSystem/GetAccessSystemIdentityPositionInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统的身份信息和职务信息 - parameters: - - description: 系统ID - in: query - 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: - - 9 - x-tablename: - - t_app_base - /support/accessSystem/GetAccessSystemIntegratedInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统的集成信息 - parameters: - - description: 系统ID - in: query - 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: - - 6 - x-tablename: - - t_app_base - /support/accessSystem/GetAccessSystemRangeInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统的使用范围 - parameters: - - description: 系统ID - in: query - 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/GetAccessSystemSsoInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统的统一认证信息 - parameters: - - description: 系统ID - in: query - 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: - - 6 - x-tablename: - - t_app_base - /support/accessSystem/GetAccessSystemStageInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统的学段信息 - parameters: - - description: 系统ID - in: query - 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: - - 9 - x-tablename: - - t_app_base - /support/accessSystem/GetPositionTreeInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取职务树信息 - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 获取职务树信息 - tags: - - 接入系统 - x-removeswaggerfield: - - id_int - - b_use - - last_updated_time - - postion_flag - x-sort: - - 11 - post: - consumes: - - application/x-www-form-urlencoded - description: 登录 - parameters: - - description: 登录名 - in: formData - name: loginName - required: true - type: string - - description: 登录密码 - in: formData - name: loginPwd - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 登录 - tags: - - 登录 - /support/accessSystem/PageAccessSystemInfo: - get: - consumes: - - application/x-www-form-urlencoded - description: 获取接入系统列表 - parameters: - - description: 第几页 - in: query - name: page - required: true - type: integer - - description: 一页显示多少条 - in: query - name: limit - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 获取接入系统列表 - tags: - - 接入系统 - x-emptylimit: - - page - - limit - x-intrangelimit: - - page: 1,1000 - - limit: 1,1000 - x-sort: - - 0 - x-tablename: - - t_app_base - /support/accessSystem/SettingAccessSystemIdentityPositionInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 设置接入系统的身份信息和职务信息 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 教师身份是否可用 1:可用 2:不可用 3:部分职位可用 - in: formData - name: teacherFlag - required: true - type: integer - - description: 学生身份是否可用 1:可用 2:不可用 - in: formData - name: studentFlag - required: true - type: integer - - description: 家长身份是否可用 1:可用 2:不可用 - in: formData - name: parentFlag - required: true - type: integer - - description: 职务ID,多个用逗号分隔 - in: formData - name: positionIds - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 设置接入系统的身份信息和职务信息 - tags: - - 接入系统 - x-emptylimit: - - appId - - teacherFlag - - studentFlag - - parentFlag - x-intrangelimit: - - teacherFlag: 1,3 - - studentFlag: 1,2 - - parentFlag: 1,2 - x-lengthlimit: - - appId: 36,36 - x-sort: - - 10 - x-tablename: - - t_app_base - /support/accessSystem/SettingAccessSystemIntegratedInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 设置接入系统的集成信息 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 接入系统在集成页面的调用地址 - in: formData - name: appUrl - required: true - type: string - - description: 接入系统在集成页面的图标 - in: formData - name: appIcon - required: true - type: file - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 设置接入系统的集成信息 - tags: - - 接入系统 - x-emptylimit: - - appId - - redirectUri - x-lengthlimit: - - appId: 36,36 - - redirectUri: 2,300 - - logoutUri: 2,300 - x-sort: - - 7 - x-tablename: - - t_app_base - /support/accessSystem/SettingAccessSystemRange: - post: - consumes: - - application/x-www-form-urlencoded - description: 设置接入系统的使用范围 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 使用范围的行政区划码、单位ID,多个用逗号分隔 - in: formData - name: rangeCode - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 设置接入系统的使用范围 - tags: - - 接入系统 - x-emptylimit: - - orgId - - rangeCode - x-lengthlimit: - - orgId: 36,36 - - rangeCode: 1,3700 - x-sort: - - 4 - x-tablename: - - t_app_base - /support/accessSystem/SettingAccessSystemSsoInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 设置接入系统的统一认证信息 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 统一认证回调地址 - in: formData - name: redirectUri - required: true - type: string - - description: 统一认证登出地址 - in: formData - name: logoutUri - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 设置接入系统的统一认证信息 - tags: - - 接入系统 - x-emptylimit: - - appId - - redirectUri - x-lengthlimit: - - appId: 36,36 - - redirectUri: 2,300 - - logoutUri: 2,300 - x-sort: - - 7 - x-tablename: - - t_app_base - /support/accessSystem/SettingAccessSystemStageInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 设置接入系统的身份信息和职务信息 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 学段ID,多个用逗号分隔,如果是通用传-1 - in: formData - name: stageIds - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 设置接入系统的身份信息和职务信息 - tags: - - 接入系统 - x-emptylimit: - - appId - - stageIds - x-intrangelimit: - - teacherFlag: 1,3 - - studentFlag: 1,2 - - parentFlag: 1,2 - x-lengthlimit: - - appId: 36,36 - x-sort: - - 10 - x-tablename: - - t_app_base - /support/accessSystem/UpdateAccessSystemInfo: - post: - consumes: - - application/x-www-form-urlencoded - description: 修改接入系统 - parameters: - - description: 系统ID - in: formData - name: appId - required: true - type: string - - description: 系统名称 - in: formData - name: appName - required: true - type: string - - description: 系统编码 - in: formData - name: appCode - required: true - type: string - - description: 排序号 - in: formData - name: sortId - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/Model.Res' - summary: 修改接入系统 - tags: - - 接入系统 - x-emptylimit: - - appId - - appName - - appCode - x-lengthlimit: - - appId: 36,36 - - appName: 2,30 - - appCode: 2,20 - x-sort: - - 2 - x-tablename: - - t_app_base - /v1/openapi/dataaccess/CreateDataaccess: - post: - consumes: - - application/json - description: 创建数据订阅 - operationId: createDataaccess - parameters: - - description: 数据订阅 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DataaccessSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建数据订阅 - tags: - - dataaccess - /v1/openapi/dataaccess/DeleteDataaccess/{id}: - post: - consumes: - - application/json - description: 删除数据订阅 - operationId: deleteDataaccess - parameters: - - description: 数据订阅ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除数据订阅 - tags: - - dataaccess - /v1/openapi/dataaccess/ReadDataaccess: - post: - consumes: - - application/json - description: 获取元数据列表 - operationId: readDataaccess - parameters: - - description: 数据订阅 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DataaccessSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取数据订阅列表 - tags: - - dataaccess - /v1/openapi/dataaccess/UpdateDataaccess/{id}: - post: - consumes: - - application/json - description: 修改数据订阅 - operationId: updateDataaccess - parameters: - - description: 数据订阅ID - in: path - name: id - required: true - type: string - - description: 数据订阅 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DataaccessSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 修改数据订阅 - tags: - - dataaccess - /v1/openapi/dataerror/DeleteDataerror/{id}: - post: - consumes: - - application/json - description: 删除数据异常 - operationId: deleteDataerror - parameters: - - description: 数据异常ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除数据异常 - tags: - - dataerror - /v1/openapi/dataerror/ReadDataerror: - post: - consumes: - - application/json - description: 获取数据异常列表 - operationId: readDataerror - parameters: - - description: 数据异常 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DataerrorSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取数据异常列表 - tags: - - dataerror - /v1/openapi/datasource/CreateDatasource: - post: - consumes: - - application/json - description: 创建数据源 - operationId: createDatasource - parameters: - - description: 数据源 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DatasourceSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建数据源 - tags: - - datasource - /v1/openapi/datasource/DeleteDatasource/{id}: - post: - consumes: - - application/json - description: 删除数据源 - operationId: deleteDatasource - parameters: - - description: 数据源ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除数据源 - tags: - - datasource - /v1/openapi/datasource/ReadDatasource: - post: - consumes: - - application/json - description: 获取数据源列表 - operationId: readDatasource - parameters: - - description: 数据源 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DatasourceSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取数据源列表 - tags: - - datasource - /v1/openapi/datasource/ReadESDoc: - post: - consumes: - - application/json - description: 获取es数据列表 - operationId: readESDoc - parameters: - - description: es数据 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DatasourceESSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取es数据列表 - tags: - - datasource - /v1/openapi/datasource/UpdateDatasource/{id}: - post: - consumes: - - application/json - description: 修改数据源 - operationId: updateDatasource - parameters: - - description: 数据源ID - in: path - name: id - required: true - type: string - - description: 数据源 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DatasourceSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 修改数据源 - tags: - - datasource - /v1/openapi/datastatistic/ReadESDocAmount: - post: - consumes: - - application/json - description: 获取数据源列表 - operationId: readESDocAmount - parameters: - - description: 数据源 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.DatasourceSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取数据源列表 - tags: - - datastatistic - /v1/openapi/jyt2012/CreateJyt2012: - post: - consumes: - - application/json - description: 创建标准字典 - operationId: createJyt2012 - parameters: - - description: 标准字典 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.Jyt2012Swag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建标准字典 - tags: - - jyt2012 - /v1/openapi/jyt2012/DeleteJyt2012/{id}: - post: - consumes: - - application/json - description: 删除标准字典 - operationId: deleteJyt2012 - parameters: - - description: 标准字典ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除标准字典 - tags: - - jyt2012 - /v1/openapi/jyt2012/ReadJyt2012: - post: - consumes: - - application/json - description: 获取标准字典列表 - operationId: readJyt2012 - parameters: - - description: 标准字典 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.Jyt2012Swag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取标准字典列表 - tags: - - jyt2012 - /v1/openapi/jyt2012/UpdateJyt2012/{id}: - post: - consumes: - - application/json - description: 修改标准字典 - operationId: updateJyt2012 - parameters: - - description: 标准字典ID - in: path - name: id - required: true - type: string - - description: 标准字典 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.Jyt2012Swag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 修改标准字典 - tags: - - jyt2012 - /v1/openapi/metadata/CreateMetadata: - post: - consumes: - - application/json - description: 创建元数据 - operationId: createMetadata - parameters: - - description: 元数据 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.MetadataSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建元数据 - tags: - - metadata - /v1/openapi/metadata/CreateMetadataES: - post: - consumes: - - application/json - description: 创建ES元数据 - operationId: createMetadataES - parameters: - - description: ES元数据 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.MetadataESSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建ES元数据 - tags: - - metadata - /v1/openapi/metadata/DeleteMetadata/{id}: - post: - consumes: - - application/json - description: 删除元数据 - operationId: deleteMetadata - parameters: - - description: 元数据ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除元数据 - tags: - - metadata - /v1/openapi/metadata/ReadMetadata: - post: - consumes: - - application/json - description: 获取元数据列表 - operationId: readMetadata - parameters: - - description: 元数据 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.MetadataSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取元数据列表 - tags: - - metadata - /v1/openapi/metadata/UpdateMetadata/{id}: - post: - consumes: - - application/json - description: 修改元数据 - operationId: updateMetadata - parameters: - - description: 元数据ID - in: path - name: id - required: true - type: string - - description: 元数据 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.MetadataSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 修改元数据 - tags: - - metadata - /v1/openapi/orgtree/CreateOrgtree: - post: - consumes: - - application/json - description: 创建机构 - operationId: createOrgtree - parameters: - - description: 机构 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.OrgtreeSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 创建机构 - tags: - - orgtree - /v1/openapi/orgtree/DeleteOrgtree/{id}: - post: - consumes: - - application/json - description: 删除机构 - operationId: deleteOrgtree - parameters: - - description: 机构ID - in: path - name: id - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 删除机构 - tags: - - orgtree - /v1/openapi/orgtree/ReadOrgtree: - post: - consumes: - - application/json - description: 获取机构列表 - operationId: readOrgtree - parameters: - - description: 机构 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.OrgtreeSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 获取机构列表 - tags: - - orgtree - /v1/openapi/orgtree/UpdateOrgtree/{id}: - post: - consumes: - - application/json - description: 修改机构 - operationId: updateOrgtree - parameters: - - description: 机构ID - in: path - name: id - required: true - type: string - - description: 机构 - in: body - name: input - required: true - schema: - $ref: '#/definitions/MySwagger.OrgtreeSwag' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/MySwagger.Result' - "400": - description: Bad Request - schema: - $ref: '#/definitions/MySwagger.Result' - summary: 修改机构 - tags: - - orgtree -swagger: "2.0" +definitions: + Model.Res: + properties: + count: + description: omitempty有值就输出,没值则不输出 + type: object + list: + description: omitempty有值就输出,没值则不输出 + type: object + message: + description: omitempty有值就输出,没值则不输出 + type: object + parentFlag: + description: omitempty有值就输出,没值则不输出 + type: object + positionList: + description: omitempty有值就输出,没值则不输出 + type: object + studentFlag: + description: omitempty有值就输出,没值则不输出 + type: object + success: + type: object + teacherFlag: + description: omitempty有值就输出,没值则不输出 + type: object + type: object + MySwagger.DataaccessSwag: + properties: + change_time: + example: "2020-06-22 17:26:53" + type: string + consume_orgid: + example: "-1" + type: string + consume_systemid: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + consume_type: + example: -1 + type: integer + create_time: + example: "2020-06-22 17:26:53" + type: string + datasource_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + delete_flag: + example: 1 + type: integer + delete_time: + example: "2020-06-22 17:26:53" + type: string + enable_flag: + example: 1 + type: integer + page: + example: 1 + type: integer + query_flag: + example: 1 + type: integer + set_flag: + example: 1 + type: integer + type: object + MySwagger.DataerrorSwag: + properties: + change_time: + example: "2020-06-22 17:26:53" + type: string + create_time: + example: "2020-06-22 17:26:53" + type: string + data_content: + type: string + data_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + datasource_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + delete_flag: + example: 1 + type: integer + delete_time: + example: "2020-06-22 17:26:53" + type: string + enable_flag: + example: 1 + type: integer + file_uri: + example: /file/url/ + type: string + org_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + page: + example: 1 + type: integer + system_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + type: object + MySwagger.DatasourceESSwag: + properties: + begin_time: + example: "2020-06-22 17:26:53" + type: string + conditions: + additionalProperties: true + type: object + data_id: + example: CfBQnRJPyXMEI5nqLT0 + type: string + datasource_code: + example: org_tree + type: string + orgids: + example: + - '[F38BD0DB-0142-4356-8F2B-623813FC2578' + - F38BD0DB-0142-4356-8F2B-623813FC2578] + items: + type: string + type: array + page: + example: 1 + type: integer + sort: + additionalProperties: true + type: object + type: object + MySwagger.DatasourceSwag: + properties: + collect_flag: + example: 1 + type: integer + datasource_code: + example: org_tree + type: string + datasource_detail: + example: 教育主管单位、教辅单位、各级各类学校机构信息 + type: string + datasource_name: + example: 组织机构信息 + type: string + datastore_type: + example: 2 + type: integer + delete_flag: + example: 1 + type: integer + dic_id: + example: 1C0F6832-65C6-4888-BDDE-A3373B11499D + type: string + enable_flag: + example: 1 + type: integer + page: + example: 1 + type: integer + provide_orgid: + example: "-1" + type: string + provide_type: + example: 2 + type: integer + set_flag: + example: 1 + type: integer + system_id: + example: 1C0F6832-65C6-4888-BDDE-A3373B11499D + type: string + type: object + MySwagger.Jyt2012Swag: + properties: + change_time: + example: "2020-06-22 17:26:53" + type: string + create_time: + example: "2020-06-22 17:26:53" + type: string + delete_flag: + example: 1 + type: integer + delete_time: + example: "2020-06-22 17:26:53" + type: string + dic_info: + example: 我是字典项说明 + type: string + dic_name: + example: sex + type: string + dic_type: + example: 1 + type: integer + dic_value: + example: "10" + type: string + enable_flag: + example: 1 + type: integer + id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + jyt_flag: + example: 1 + type: integer + page: + example: 1 + type: integer + parent_id: + example: 38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + root_flag: + example: 1 + type: integer + type: object + MySwagger.MetadataESSwag: + properties: + index_name: + example: org_tree + type: string + type: object + MySwagger.MetadataSwag: + properties: + check_dic: + example: 1 + type: integer + check_exist: + example: 1 + type: integer + check_name: + example: 1 + type: integer + check_pattern: + example: 1 + type: integer + check_type: + example: 1 + type: integer + datasource_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + delete_flag: + example: 1 + type: integer + dic_id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + enable_flag: + example: 1 + type: integer + id: + example: F38BD0DB-0142-4356-8F2B-623813FC2578 + type: string + item_info: + example: 我是数据项说明 + type: string + item_length: + example: 36 + type: integer + item_name: + example: org_name + type: string + item_pattern: + type: string + item_type: + example: string + type: string + page: + example: 1 + type: integer + type: object + MySwagger.OrgtreeSwag: + properties: + area_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + cat_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + change_time: + example: "2020-06-11 09:19:26" + type: string + city_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + create_time: + example: "2020-06-11 09:19:26" + type: string + delete_flag: + example: 1 + type: integer + delete_time: + example: "2020-06-11 09:19:26" + type: string + enable_flag: + example: 1 + type: integer + id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + link_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + linksystem_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + org_name: + example: 开平区教育局 + type: string + org_type: + example: 1 + type: integer + page: + example: 1 + type: integer + parent_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + province_id: + example: 0383FF67-CCBA-4256-891E-BAFD487547FA + type: string + type: object + MySwagger.Result: + properties: + message: + example: 接入系统票据验证失败 + type: string + success: + example: false + type: boolean + type: object +host: 127.0.0.1:8005 +info: + contact: + email: support@swagger.io + name: API Support + url: http://www.swagger.io/support + description: 分布式,大并发,高可用 + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: 基础数据API + version: "1.0" +paths: + /support/accessSystem/AddAccessSystemInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 增加接入系统 + parameters: + - description: 系统名称 + in: formData + name: appName + required: true + type: string + - description: 系统编码 + in: formData + name: appCode + required: true + type: string + - description: 排序号 + in: formData + name: sortId + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 增加接入系统 + tags: + - 接入系统 + x-emptylimit: + - appName + - appCode + x-lengthlimit: + - appName: 2,30 + - appCode: 2,20 + x-sort: + - 1 + x-tablename: + - t_app_base + /support/accessSystem/DeleteAccessSystemInfo: + 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: + - 3 + x-tablename: + - t_app_base + /support/accessSystem/EmptyAccessSystemIntegratedInfo: + 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: + - orgId + x-lengthlimit: + - orgId: 36,36 + x-sort: + - 8 + x-tablename: + - t_app_base + /support/accessSystem/EmptyAccessSystemSsoInfo: + 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: + - orgId + x-lengthlimit: + - orgId: 36,36 + x-sort: + - 8 + x-tablename: + - t_app_base + /support/accessSystem/GetAccessSystemIdentityPositionInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统的身份信息和职务信息 + parameters: + - description: 系统ID + in: query + 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: + - 9 + x-tablename: + - t_app_base + /support/accessSystem/GetAccessSystemIntegratedInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统的集成信息 + parameters: + - description: 系统ID + in: query + 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: + - 6 + x-tablename: + - t_app_base + /support/accessSystem/GetAccessSystemRangeInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统的使用范围 + parameters: + - description: 系统ID + in: query + 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/GetAccessSystemSsoInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统的统一认证信息 + parameters: + - description: 系统ID + in: query + 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: + - 6 + x-tablename: + - t_app_base + /support/accessSystem/GetAccessSystemStageInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统的学段信息 + parameters: + - description: 系统ID + in: query + 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: + - 9 + x-tablename: + - t_app_base + /support/accessSystem/GetPositionTreeInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取职务树信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 获取职务树信息 + tags: + - 接入系统 + x-removeswaggerfield: + - id_int + - b_use + - last_updated_time + - postion_flag + x-sort: + - 11 + post: + consumes: + - application/x-www-form-urlencoded + description: 登录 + parameters: + - description: 登录名 + in: formData + name: loginName + required: true + type: string + - description: 登录密码 + in: formData + name: loginPwd + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 登录 + tags: + - 登录 + /support/accessSystem/PageAccessSystemInfo: + get: + consumes: + - application/x-www-form-urlencoded + description: 获取接入系统列表 + parameters: + - description: 第几页 + in: query + name: page + required: true + type: integer + - description: 一页显示多少条 + in: query + name: limit + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 获取接入系统列表 + tags: + - 接入系统 + x-emptylimit: + - page + - limit + x-intrangelimit: + - page: 1,1000 + - limit: 1,1000 + x-sort: + - 0 + x-tablename: + - t_app_base + /support/accessSystem/SettingAccessSystemIdentityPositionInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 设置接入系统的身份信息和职务信息 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 教师身份是否可用 1:可用 2:不可用 3:部分职位可用 + in: formData + name: teacherFlag + required: true + type: integer + - description: 学生身份是否可用 1:可用 2:不可用 + in: formData + name: studentFlag + required: true + type: integer + - description: 家长身份是否可用 1:可用 2:不可用 + in: formData + name: parentFlag + required: true + type: integer + - description: 职务ID,多个用逗号分隔 + in: formData + name: positionIds + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 设置接入系统的身份信息和职务信息 + tags: + - 接入系统 + x-emptylimit: + - appId + - teacherFlag + - studentFlag + - parentFlag + x-intrangelimit: + - teacherFlag: 1,3 + - studentFlag: 1,2 + - parentFlag: 1,2 + x-lengthlimit: + - appId: 36,36 + x-sort: + - 10 + x-tablename: + - t_app_base + /support/accessSystem/SettingAccessSystemIntegratedInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 设置接入系统的集成信息 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 接入系统在集成页面的调用地址 + in: formData + name: appUrl + required: true + type: string + - description: 接入系统在集成页面的图标 + in: formData + name: appIcon + required: true + type: file + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 设置接入系统的集成信息 + tags: + - 接入系统 + x-emptylimit: + - appId + - redirectUri + x-lengthlimit: + - appId: 36,36 + - redirectUri: 2,300 + - logoutUri: 2,300 + x-sort: + - 7 + x-tablename: + - t_app_base + /support/accessSystem/SettingAccessSystemRange: + post: + consumes: + - application/x-www-form-urlencoded + description: 设置接入系统的使用范围 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 使用范围的行政区划码、单位ID,多个用逗号分隔 + in: formData + name: rangeCode + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 设置接入系统的使用范围 + tags: + - 接入系统 + x-emptylimit: + - orgId + - rangeCode + x-lengthlimit: + - orgId: 36,36 + - rangeCode: 1,3700 + x-sort: + - 4 + x-tablename: + - t_app_base + /support/accessSystem/SettingAccessSystemSsoInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 设置接入系统的统一认证信息 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 统一认证回调地址 + in: formData + name: redirectUri + required: true + type: string + - description: 统一认证登出地址 + in: formData + name: logoutUri + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 设置接入系统的统一认证信息 + tags: + - 接入系统 + x-emptylimit: + - appId + - redirectUri + x-lengthlimit: + - appId: 36,36 + - redirectUri: 2,300 + - logoutUri: 2,300 + x-sort: + - 7 + x-tablename: + - t_app_base + /support/accessSystem/SettingAccessSystemStageInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 设置接入系统的身份信息和职务信息 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 学段ID,多个用逗号分隔,如果是通用传-1 + in: formData + name: stageIds + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 设置接入系统的身份信息和职务信息 + tags: + - 接入系统 + x-emptylimit: + - appId + - stageIds + x-intrangelimit: + - teacherFlag: 1,3 + - studentFlag: 1,2 + - parentFlag: 1,2 + x-lengthlimit: + - appId: 36,36 + x-sort: + - 10 + x-tablename: + - t_app_base + /support/accessSystem/UpdateAccessSystemInfo: + post: + consumes: + - application/x-www-form-urlencoded + description: 修改接入系统 + parameters: + - description: 系统ID + in: formData + name: appId + required: true + type: string + - description: 系统名称 + in: formData + name: appName + required: true + type: string + - description: 系统编码 + in: formData + name: appCode + required: true + type: string + - description: 排序号 + in: formData + name: sortId + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Model.Res' + summary: 修改接入系统 + tags: + - 接入系统 + x-emptylimit: + - appId + - appName + - appCode + x-lengthlimit: + - appId: 36,36 + - appName: 2,30 + - appCode: 2,20 + x-sort: + - 2 + x-tablename: + - t_app_base + /v1/openapi/dataaccess/CreateDataaccess: + post: + consumes: + - application/json + description: 创建数据订阅 + operationId: createDataaccess + parameters: + - description: 数据订阅 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DataaccessSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建数据订阅 + tags: + - dataaccess + /v1/openapi/dataaccess/DeleteDataaccess/{id}: + post: + consumes: + - application/json + description: 删除数据订阅 + operationId: deleteDataaccess + parameters: + - description: 数据订阅ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除数据订阅 + tags: + - dataaccess + /v1/openapi/dataaccess/ReadDataaccess: + post: + consumes: + - application/json + description: 获取元数据列表 + operationId: readDataaccess + parameters: + - description: 数据订阅 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DataaccessSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取数据订阅列表 + tags: + - dataaccess + /v1/openapi/dataaccess/UpdateDataaccess/{id}: + post: + consumes: + - application/json + description: 修改数据订阅 + operationId: updateDataaccess + parameters: + - description: 数据订阅ID + in: path + name: id + required: true + type: string + - description: 数据订阅 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DataaccessSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 修改数据订阅 + tags: + - dataaccess + /v1/openapi/dataerror/DeleteDataerror/{id}: + post: + consumes: + - application/json + description: 删除数据异常 + operationId: deleteDataerror + parameters: + - description: 数据异常ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除数据异常 + tags: + - dataerror + /v1/openapi/dataerror/ReadDataerror: + post: + consumes: + - application/json + description: 获取数据异常列表 + operationId: readDataerror + parameters: + - description: 数据异常 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DataerrorSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取数据异常列表 + tags: + - dataerror + /v1/openapi/datasource/CreateDatasource: + post: + consumes: + - application/json + description: 创建数据源 + operationId: createDatasource + parameters: + - description: 数据源 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建数据源 + tags: + - datasource + /v1/openapi/datasource/DeleteDatasource/{id}: + post: + consumes: + - application/json + description: 删除数据源 + operationId: deleteDatasource + parameters: + - description: 数据源ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除数据源 + tags: + - datasource + /v1/openapi/datasource/GetESDoc: + post: + consumes: + - application/json + description: 获取es数据 + operationId: getESDoc + parameters: + - description: es数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceESSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取es数据 + tags: + - datasource + /v1/openapi/datasource/ReadDatasource: + post: + consumes: + - application/json + description: 获取数据源列表 + operationId: readDatasource + parameters: + - description: 数据源 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取数据源列表 + tags: + - datasource + /v1/openapi/datasource/ReadESDoc: + post: + consumes: + - application/json + description: 获取es数据列表 + operationId: readESDoc + parameters: + - description: es数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceESSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取es数据列表 + tags: + - datasource + /v1/openapi/datasource/UpdateDatasource/{id}: + post: + consumes: + - application/json + description: 修改数据源 + operationId: updateDatasource + parameters: + - description: 数据源ID + in: path + name: id + required: true + type: string + - description: 数据源 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 修改数据源 + tags: + - datasource + /v1/openapi/datastatistic/ReadESDocAmount: + post: + consumes: + - application/json + description: 获取数据源列表 + operationId: readESDocAmount + parameters: + - description: 数据源 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.DatasourceSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取数据源列表 + tags: + - datastatistic + /v1/openapi/jyt2012/CreateJyt2012: + post: + consumes: + - application/json + description: 创建标准字典 + operationId: createJyt2012 + parameters: + - description: 标准字典 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.Jyt2012Swag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建标准字典 + tags: + - jyt2012 + /v1/openapi/jyt2012/DeleteJyt2012/{id}: + post: + consumes: + - application/json + description: 删除标准字典 + operationId: deleteJyt2012 + parameters: + - description: 标准字典ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除标准字典 + tags: + - jyt2012 + /v1/openapi/jyt2012/ReadJyt2012: + post: + consumes: + - application/json + description: 获取标准字典列表 + operationId: readJyt2012 + parameters: + - description: 标准字典 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.Jyt2012Swag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取标准字典列表 + tags: + - jyt2012 + /v1/openapi/jyt2012/UpdateJyt2012/{id}: + post: + consumes: + - application/json + description: 修改标准字典 + operationId: updateJyt2012 + parameters: + - description: 标准字典ID + in: path + name: id + required: true + type: string + - description: 标准字典 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.Jyt2012Swag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 修改标准字典 + tags: + - jyt2012 + /v1/openapi/metadata/CreateMetadata: + post: + consumes: + - application/json + description: 创建元数据 + operationId: createMetadata + parameters: + - description: 元数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.MetadataSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建元数据 + tags: + - metadata + /v1/openapi/metadata/CreateMetadataES: + post: + consumes: + - application/json + description: 创建ES元数据 + operationId: createMetadataES + parameters: + - description: ES元数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.MetadataESSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建ES元数据 + tags: + - metadata + /v1/openapi/metadata/DeleteMetadata/{id}: + post: + consumes: + - application/json + description: 删除元数据 + operationId: deleteMetadata + parameters: + - description: 元数据ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除元数据 + tags: + - metadata + /v1/openapi/metadata/ReadMetadata: + post: + consumes: + - application/json + description: 获取元数据列表 + operationId: readMetadata + parameters: + - description: 元数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.MetadataSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取元数据列表 + tags: + - metadata + /v1/openapi/metadata/UpdateMetadata/{id}: + post: + consumes: + - application/json + description: 修改元数据 + operationId: updateMetadata + parameters: + - description: 元数据ID + in: path + name: id + required: true + type: string + - description: 元数据 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.MetadataSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 修改元数据 + tags: + - metadata + /v1/openapi/orgtree/CreateOrgtree: + post: + consumes: + - application/json + description: 创建机构 + operationId: createOrgtree + parameters: + - description: 机构 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.OrgtreeSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 创建机构 + tags: + - orgtree + /v1/openapi/orgtree/DeleteOrgtree/{id}: + post: + consumes: + - application/json + description: 删除机构 + operationId: deleteOrgtree + parameters: + - description: 机构ID + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 删除机构 + tags: + - orgtree + /v1/openapi/orgtree/ReadOrgtree: + post: + consumes: + - application/json + description: 获取机构列表 + operationId: readOrgtree + parameters: + - description: 机构 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.OrgtreeSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 获取机构列表 + tags: + - orgtree + /v1/openapi/orgtree/UpdateOrgtree/{id}: + post: + consumes: + - application/json + description: 修改机构 + operationId: updateOrgtree + parameters: + - description: 机构ID + in: path + name: id + required: true + type: string + - description: 机构 + in: body + name: input + required: true + schema: + $ref: '#/definitions/MySwagger.OrgtreeSwag' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/MySwagger.Result' + "400": + description: Bad Request + schema: + $ref: '#/definitions/MySwagger.Result' + summary: 修改机构 + tags: + - orgtree +swagger: "2.0"