master
wangshuai 5 years ago
parent ad250a8998
commit 1505a80dbf

@ -399,7 +399,7 @@ func SaveDataError2(fails []MySwagger.FailResult,datas []MySwagger.Data ,SystemI
* @Return error
*/
func GetMetadataResults(conditions string) (bool, string, int, []map[string]interface{}, error) {
sql := "SELECT * FROM t_dataex_metadata WHERE 1 = 1 AND " + conditions + " AND eneble_flag = 1 ORDER BY create_time DESC, change_time DESC"
sql := "SELECT * FROM t_dataex_metadata WHERE 1 = 1 AND " + conditions + " AND enable_flag = 1 ORDER BY create_time DESC, change_time DESC"
//数据条数
count, _ := DbUtil.Engine.SQL(sql).Query().Count()
//分页数据
@ -456,7 +456,7 @@ func GetJyt2012ResultsByParentId(parentId string) (bool, string, int, []map[stri
}
func GetJyt2012ResultsByParentIds(parentIds string) (bool, string, int, []map[string]interface{}, error) {
sql := "SELECT * FROM t_dataex_jyt2012 WHERE parent_id IN " + parentIds + " ORDER BY create_time DESC, change_time DESC"
sql := "SELECT * FROM t_dataex_jyt2012 WHERE parent_id IN (" + parentIds + ") ORDER BY create_time DESC, change_time DESC"
//数据条数
count, _ := DbUtil.Engine.SQL(sql).Query().Count()
if count > 0 {

@ -384,12 +384,12 @@ func DataexSetBatch(systemID string, datas []MySwagger.Data,datasource *models.T
var failIDs []string
var dataContentFailIDs []map[string]string
// 校验ESDataContent
// add by wangshuai 2020-09-16
//校验ESDataContent
//add by wangshuai 2020-09-16
//_, _, successDatas, failureIDs := ValidationUtil.ValidESDataContent(esData.DatasourceId, datas)
// 将校验通过数据赋值给datas
//将校验通过数据赋值给datas
//datas = successDatas
// 将校验失败数据赋值给failIDs
//将校验失败数据赋值给failIDs
//failIDs = failureIDs
//四、循环添加索引文档

@ -39,21 +39,19 @@ func ValidESDataContent(datasourceCode string, datas []MySwagger.Data) (bool, st
var dicIdsStr string
conditions = "datasource_id='" + datasourceCode + "'"
// 从元数据集合获取该数据源对应的含有字典ID的字典ID集合
//res, _, _, metadataDicIds, _ := DataexDAO.GetMetadataResults(conditions)
//if res == true {
//
//}
// 获取该数据源对应的元数据集合
result, _, _, metadatas, _ := DataexDAO.GetMetadataResults(conditions)
if result == true {
//dic := make(map[string]interface{})
for _, vv := range metadatas {
dicIds = append(dicIds, "'" + vv["dic_id"].(string) + "'")
// 从元数据集合获取该数据源对应的含有字典ID的字典ID集合
if vv["dic_id"].(string) != "" {
dicIds = append(dicIds, "'" + vv["dic_id"].(string) + "'")
}
}
// 字典ID集合字符串
dicIdsStr = strings.Join(dicIds, ", ")
// 获取含有
_, _, _, dics, _ = DataexDAO.GetJyt2012ResultsByParentIds(dicIdsStr)
for no := 0; no < len(datas) && no < 1000; no++ {
r = true
var jsonData map[string]interface{}

@ -17,8 +17,8 @@ import (
// @Description json:"`consume_systemid`" xorm:"not null comment('数据使用系统编码') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"query_flag" xorm:"not null default 1 comment('可查【1-1否】') INT(11)" example:"1"
// @Description json:"set_flag" xorm:"not null default -1 comment('可修改【1-1否】') INT(11)" example:"1"
// @Description json:"consume_type" xorm:"not null comment('使用数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"-1"
// @Description json:"`consume_orgid`" xorm:"not null comment('使用数据机构编码【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description `*`json:"consume_type" xorm:"not null comment('使用数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"-1"
// @Description `*`json:"consume_orgid" xorm:"not null comment('使用数据机构ID【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-22 17:26:53"
@ -72,14 +72,14 @@ func ReadDataaccess(c *gin.Context) {
// 创建数据订阅 godoc
// @Summary 创建数据订阅
// @Description json:"datasource_id" xorm:"not null comment('数据源ID') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"datasource_code" xorm:"comment('数据源编码') default 'NULL' VARCHAR(255)"
// @Description json:"`source_systemid`" xorm:"not null comment('源系统编码') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"`consume_systemid`" xorm:"not null comment('数据使用系统编码') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description `*`json:"datasource_id" xorm:"not null comment('数据源ID') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description `*`json:"datasource_code" xorm:"comment('数据源编码') default 'NULL' VARCHAR(255)"
// @Description `*`json:"`source_systemid`" xorm:"not null comment('源系统编码') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description `*`json:"`consume_systemid`" xorm:"not null comment('数据使用系统编码') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"query_flag" xorm:"not null default 1 comment('可查【1-1否】') INT(11)" example:"1"
// @Description json:"set_flag" xorm:"not null default -1 comment('可修改【1-1否】') INT(11)" example:"1"
// @Description json:"consume_type" xorm:"not null comment('使用数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"-1"
// @Description json:"`consume_orgid`" xorm:"not null comment('使用数据机构编码【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description `*`json:"consume_type" xorm:"not null comment('使用数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"-1"
// @Description `*`json:"consume_orgid" xorm:"not null comment('使用数据机构ID【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-22 17:26:53"
@ -133,7 +133,7 @@ func CreateDataaccess(c *gin.Context) {
// @Description json:"query_flag" xorm:"not null default 1 comment('可查【1-1否】') INT(11)" example:"1"
// @Description json:"set_flag" xorm:"not null default -1 comment('可修改【1-1否】') INT(11)" example:"1"
// @Description json:"consume_type" xorm:"not null comment('使用数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"-1"
// @Description json:"`consume_orgid`" xorm:"not null comment('使用数据机构编码【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description json:"consume_orgid" xorm:"not null comment('使用数据机构ID【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-22 17:26:53"
@ -183,7 +183,7 @@ func UpdateDataaccess(c *gin.Context) {
// 删除数据订阅 godoc
// @Summary 删除数据订阅
// @Description json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags dataaccess
// @ID deleteDataaccess
// @Accept json

@ -79,7 +79,7 @@ func ReadDataerror(c *gin.Context) {
// 删除数据异常 godoc
// @Summary 删除数据异常
// @Description json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags dataerror
// @ID deleteDataerror
// @Accept json

@ -71,15 +71,15 @@ func ReadDatasource(c *gin.Context) {
// 创建数据源 godoc
// @Summary 创建数据源
// @Description json:"`system_id`" xorm:"not null comment('数据提供系统编码') index VARCHAR(36)" example:"1C0F6832-65C6-4888-BDDE-A3373B11499D"
// @Description json:"datasource_name" xorm:"not null comment('数据源名称') VARCHAR(100)" example:"组织机构信息"
// @Description json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description `*`json:"`system_id`" xorm:"not null comment('数据提供系统编码') index VARCHAR(36)" example:"1C0F6832-65C6-4888-BDDE-A3373B11499D"
// @Description `*`json:"datasource_name" xorm:"not null comment('数据源名称') VARCHAR(100)" example:"组织机构信息"
// @Description `*`json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description json:"datasource_detail" xorm:"default 'NULL' comment('数据源说明') VARCHAR(500)" example:"教育主管单位、教辅单位、各级各类学校机构信息"
// @Description json:"set_flag" xorm:"not null default 1 comment('可修改【1-1否】') INT(11)" example:"1"
// @Description json:"collect_flag" xorm:"not null default 1 comment('可汇集【1-1否】') INT(11)" example:"1"
// @Description json:"provide_type" xorm:"not null comment('提供数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"2"
// @Description json:"provide_orgid" xorm:"not null comment('提供数据机构ID【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description json:"datastore_type" xorm:"not null comment('数据存储类型【1DB2ES3Kafka】') INT(11)" example:"2"
// @Description `*`json:"provide_type" xorm:"not null comment('提供数据范围【1本机构2本机构以及下属机构-1不限制】') INT(11)" example:"2"
// @Description `*`json:"provide_orgid" xorm:"not null comment('提供数据机构ID【-1不限制】') index VARCHAR(36)" example:"-1"
// @Description `*`json:"datastore_type" xorm:"not null comment('数据存储类型【1DB2ES3Kafka】') INT(11)" example:"2"
// @Description json:"dic_id, omitempty" xorm:"default 'NULL' comment('数据字典ID') index VARCHAR(36)" example:"1C0F6832-65C6-4888-BDDE-A3373B11499D"
// @Description json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-11删除-1正常】') INT(11)" example:"1"
// @Description json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认11启用-1禁用】') INT(11)" example:"1"
@ -186,7 +186,7 @@ func UpdateDatasource(c *gin.Context) {
// 删除数据源 godoc
// @Summary 删除数据源
// @Description json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags datasource
// @ID deleteDatasource
// @Accept json
@ -223,7 +223,7 @@ func DeleteDatasource(c *gin.Context) {
// 获取es数据列表 godoc
// @Summary 获取es数据列表
// @Description json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description `*`json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description json:"`orgids`" xorm:"not null comment('提供数据范围【1本机构2本机构以及下属机构-1不限制】') VARCHAR(36)" example:"[F38BD0DB-0142-4356-8F2B-623813FC2578,F38BD0DB-0142-4356-8F2B-623813FC2578]"
// @Description json:"begin_time" example:"2020-06-22 17:26:53"`
// @Description json:"conditions" example:""
@ -281,12 +281,12 @@ func ReadESDoc(c *gin.Context) {
// 获取es数据 godoc
// @Summary 获取es数据
// @Description json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description `*`json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(8)" example:"org_tree"
// @Description json:"`orgids`" xorm:"not null comment('提供数据范围【1本机构2本机构以及下属机构-1不限制】') VARCHAR(36)" example:"[F38BD0DB-0142-4356-8F2B-623813FC2578,F38BD0DB-0142-4356-8F2B-623813FC2578]"
// @Description json:"begin_time" example:"2020-06-22 17:26:53"`
// @Description json:"conditions" example:""
// @Description json:"sort" example:""
// @Description json:"data_id" example:"CfBQnRJPyXMEI5nqLT0"
// @Description `*`json:"data_id" example:"CfBQnRJPyXMEI5nqLT0"
// @Tags datasource
// @ID getESDoc
// @Accept json

@ -80,13 +80,13 @@ func ReadJyt2012(c *gin.Context) {
// 创建标准字典 godoc
// @Summary 创建标准字典
// @Description json:"dic_name" xorm:"not null comment('字典/字典项名称') VARCHAR(100)" example:"sex"
// @Description json:"dic_value" xorm:"not null comment('字典/字典项值') VARCHAR(100)" example:"10"
// @Description json:"dic_type" xorm:"not null default 1 comment('字典类型【1国标数据、关联数据源2国标字典、关联元数据】') INT(11)" example:"1"
// @Description json:"dic_info" xorm:"default ''NULL'' comment('字典项说明') VARCHAR(500)" example:"我是字典项说明"
// @Description `*`json:"dic_name" xorm:"not null comment('字典/字典项名称') VARCHAR(100)" example:"sex"
// @Description `*`json:"dic_value" xorm:"not null comment('字典/字典项值') VARCHAR(100)" example:"10"
// @Description `*`json:"dic_type" xorm:"not null default 1 comment('字典类型【1国标数据、关联数据源2国标字典、关联元数据】') INT(11)" example:"1"
// @Description `*`json:"dic_info" xorm:"default ''NULL'' comment('字典项说明') VARCHAR(500)" example:"我是字典项说明"
// @Description json:"root_flag" xorm:"not null default -1 comment('是否是字典【1-1否】') INT(11)" example:"1"
// @Description json:"jyt_flag" xorm:"not null default 1 comment('是否国标【1-1自定义】') INT(11)" example:"1"
// @Description json:"parent_id" xorm:"default ''NULL'' comment('字典ID【字典项父节点】') VARCHAR(36)" example:"38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description `*`json:"parent_id" xorm:"default ''NULL'' comment('字典ID【字典项父节点】') VARCHAR(36)" example:"38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-22 17:26:53"
// @Description json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-22 17:26:53"
@ -189,7 +189,7 @@ func UpdateJyt2012(c *gin.Context) {
// 删除标准字典 godoc
// @Summary 删除标准字典
// @Description json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags jyt2012
// @ID deleteJyt2012
// @Accept json

@ -70,18 +70,18 @@ func ReadMetadata(c *gin.Context) {
// 创建元数据 godoc
// @Summary 创建元数据
// @Description json:"`datasource_id`" xorm:"default ''NULL'' comment('数据源编码') index VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"
// @Description json:"item_name" xorm:"not null comment('数据项名称【英文】') VARCHAR(50)" example:"org_name"
// @Description `*`json:"`datasource_id`" xorm:"default ''NULL'' comment('数据源编码') index VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"
// @Description `*`json:"item_name" xorm:"not null comment('数据项名称【英文】') VARCHAR(50)" example:"org_name"
// @Description json:"dic_id" xorm:"default ''NULL'' comment('数据字典ID') index VARCHAR(36)" example:"F38BD0DB-0142-4356-8F2B-623813FC2578"
// @Description json:"item_type" xorm:"default ''NULL'' comment('数据项类型【1整数、2浮点、3字符、4布尔、5日期、6时间、7日期+时间】') VARCHAR(50)" example:"string"
// @Description json:"item_length" xorm:"default NULL comment('数据最大长度【UTF-8 字符长度】') INT(11)" example:"36"
// @Description json:"item_pattern" xorm:"default 'NULL' comment('数据项模式') VARCHAR(255)" example:""
// @Description json:"item_info" xorm:"not null comment('数据项说明') VARCHAR(50)" example:"我是数据项说明"
// @Description json:"check_name" xorm:"not null default -1 comment('是否检测名称【1-1否】') INT(11)" example:"1"
// @Description json:"check_dic" xorm:"not null default -1 comment('是否检测字典') INT(11)" example:"1"
// @Description json:"check_type" xorm:"not null default -1 comment('是否检测类型') INT(11)" example:"1"
// @Description json:"check_pattern" xorm:"not null default -1 comment('是否检测模式') INT(11)" example:"1"
// @Description json:"check_exist" xorm:"not null default -1 comment('是否检测必填') INT(11)" example:"1"
// @Description `*`json:"item_type" xorm:"default ''NULL'' comment('数据项类型【1整数、2浮点、3字符、4布尔、5日期、6时间、7日期+时间】') VARCHAR(50)" example:"string"
// @Description `*`json:"item_length" xorm:"default NULL comment('数据最大长度【UTF-8 字符长度】') INT(11)" example:"36"
// @Description `*`json:"item_pattern" xorm:"default 'NULL' comment('数据项模式') VARCHAR(255)" example:""
// @Description `*`json:"item_info" xorm:"not null comment('数据项说明') VARCHAR(50)" example:"我是数据项说明"
// @Description `*`json:"check_name" xorm:"not null default -1 comment('是否检测名称【1-1否】') INT(11)" example:"1"
// @Description `*`json:"check_dic" xorm:"not null default -1 comment('是否检测字典') INT(11)" example:"1"
// @Description `*`json:"check_type" xorm:"not null default -1 comment('是否检测类型') INT(11)" example:"1"
// @Description `*`json:"check_pattern" xorm:"not null default -1 comment('是否检测模式') INT(11)" example:"1"
// @Description `*`json:"check_exist" xorm:"not null default -1 comment('是否检测必填') INT(11)" example:"1"
// @Description json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-11删除-1正常】') INT(11)" example:"1"
// @Description json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认11启用-1禁用】') INT(11)" example:"1"
// @Tags metadata
@ -183,7 +183,7 @@ func UpdateMetadata(c *gin.Context) {
// 删除元数据 godoc
// @Summary 删除元数据
// @Description json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags metadata
// @ID deleteMetadata
// @Accept json
@ -220,7 +220,7 @@ func DeleteMetadata(c *gin.Context) {
// 创建ES元数据 godoc
// @Summary 创建ES元数据
// @Description json:"index_name" xorm:"not null comment('ES Index Name') VARCHAR(50)" example:"org_tree"
// @Description `*`json:"index_name" xorm:"not null comment('ES Index Name') VARCHAR(50)" example:"org_tree"
// @Tags metadata
// @ID createMetadataES
// @Accept json

@ -12,6 +12,22 @@ import (
// 获取机构列表 godoc
// @Summary 获取机构列表
// @Description 获取机构列表
// @Description `json:"id" xorm:"not null pk comment('ID【根节点默认为-1】') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"org_name" xorm:"not null comment('机构名称') VARCHAR(100)" example:"开平区教育局"`
// @Description `json:"org_type" xorm:"not null comment('机构类型【1教育局、2学校、3教辅单位、4大学区、5部门、6、主校7、学段、8年级、9班级】') INT(11)" example:"1"`
// @Description `json:"parent_id" xorm:"default ''NULL'' comment('父节点ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"cat_id" xorm:"not null comment('层级ID【4位数字一组、右侧多级累加】') VARCHAR(100)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"province_id" xorm:"default 'NULL' comment('省编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"city_id" xorm:"default 'NULL' comment('地市编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"area_id" xorm:"default 'NULL' comment('县区编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"`linksystem_id`" xorm:"default 'NULL' comment('源业务系统编码') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"link_id" xorm:"default 'NULL' comment('业务系统机构原ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-11删除-1正常】') INT(11)" example:"1"`
// @Description `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认11启用-1禁用】') INT(11)" example:"1"`
// @Description `json:"page" example:"1"`
// @Tags orgtree
// @ID readOrgtree
// @Accept json
@ -55,6 +71,22 @@ func ReadOrgtree(c *gin.Context) {
// 创建机构 godoc
// @Summary 创建机构
// @Description 创建机构
// @Description `json:"id" xorm:"not null pk comment('ID【根节点默认为-1】') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `*`json:"org_name" xorm:"not null comment('机构名称') VARCHAR(100)" example:"开平区教育局"`
// @Description `*`json:"org_type" xorm:"not null comment('机构类型【1教育局、2学校、3教辅单位、4大学区、5部门、6、主校7、学段、8年级、9班级】') INT(11)" example:"1"`
// @Description `*`json:"parent_id" xorm:"default ''NULL'' comment('父节点ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"cat_id" xorm:"not null comment('层级ID【4位数字一组、右侧多级累加】') VARCHAR(100)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `*`json:"province_id" xorm:"default 'NULL' comment('省编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `*`json:"city_id" xorm:"default 'NULL' comment('地市编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `*`json:"area_id" xorm:"default 'NULL' comment('县区编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `*`json:"`linksystem_id`" xorm:"default 'NULL' comment('源业务系统编码') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"link_id" xorm:"default 'NULL' comment('业务系统机构原ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-11删除-1正常】') INT(11)" example:"1"`
// @Description `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认11启用-1禁用】') INT(11)" example:"1"`
// @Description `json:"page" example:"1"`
// @Tags orgtree
// @ID createOrgtree
// @Accept json
@ -97,6 +129,22 @@ func CreateOrgtree(c *gin.Context) {
// 修改机构 godoc
// @Summary 修改机构
// @Description 修改机构
// @Description `json:"id" xorm:"not null pk comment('ID【根节点默认为-1】') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"org_name" xorm:"not null comment('机构名称') VARCHAR(100)" example:"开平区教育局"`
// @Description `json:"org_type" xorm:"not null comment('机构类型【1教育局、2学校、3教辅单位、4大学区、5部门、6、主校7、学段、8年级、9班级】') INT(11)" example:"1"`
// @Description `json:"parent_id" xorm:"default ''NULL'' comment('父节点ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"cat_id" xorm:"not null comment('层级ID【4位数字一组、右侧多级累加】') VARCHAR(100)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"province_id" xorm:"default 'NULL' comment('省编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"city_id" xorm:"default 'NULL' comment('地市编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"area_id" xorm:"default 'NULL' comment('县区编码') VARCHAR(6)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"`linksystem_id`" xorm:"default 'NULL' comment('源业务系统编码') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"link_id" xorm:"default 'NULL' comment('业务系统机构原ID') VARCHAR(36)" example:"0383FF67-CCBA-4256-891E-BAFD487547FA"`
// @Description `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME" example:"2020-06-11 09:19:26"`
// @Description `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-11删除-1正常】') INT(11)" example:"1"`
// @Description `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认11启用-1禁用】') INT(11)" example:"1"`
// @Description `json:"page" example:"1"`
// @Tags orgtree
// @ID updateOrgtree
// @Accept json
@ -142,6 +190,7 @@ func UpdateOrgtree(c *gin.Context) {
// 删除机构 godoc
// @Summary 删除机构
// @Description 删除机构
// @Description `*`json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"
// @Tags orgtree
// @ID deleteOrgtree
// @Accept json

@ -0,0 +1,4 @@
es本身默认限制了查找的量为10000条即 from+size<=10000
解决方法:
# 修改es中所有的index配置
curl -H "Content-Type: application/json" -XPUT http://127.0.0.1:9200/_settings -d '{ "index" : { "max_result_window" : 1000000000}}'
Loading…
Cancel
Save