From 49bce436a5c173510943a8e7c6fbfcdf80a04e30 Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 22 Sep 2020 14:04:29 +0800 Subject: [PATCH] 'commit' --- Logs/dsSupport.log | 4 +++ .../DataEX/DataexService/DataexService.go | 7 +++-- .../Utils/ValidationUtil/ValidationUtil.go | 28 ++++++++++--------- .../AccessSystemDao/AccessSystemDao.go | 23 +++++++++++++++ .../DataaccessOpenAPI/DataaccessOpenAPI.go | 12 ++++---- .../DataaccessService/DataaccessService.go | 4 +-- .../DataerrorOpenAPI/DataerrorOpenAPI.go | 4 +-- .../DatasourceOpenAPI/DatasourceOpenAPI.go | 12 ++++---- .../DatasourceService/DatasourceService.go | 4 +-- .../JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go | 12 ++++---- .../MetadataOpenAPI/MetadataOpenAPI.go | 16 +++++------ .../OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go | 12 ++++---- .../OrgTree/OrgtreeService/OrgtreeService.go | 4 +-- 13 files changed, 86 insertions(+), 56 deletions(-) diff --git a/Logs/dsSupport.log b/Logs/dsSupport.log index ab846bb5..9f865fa8 100644 --- a/Logs/dsSupport.log +++ b/Logs/dsSupport.log @@ -159,3 +159,7 @@ [Error]2020/09/03 08:47:17 SqlQueryError Error 1054: Unknown column 'da.delete_flag' in 'where clause' [Error]2020/09/07 09:08:08 SqlUpdateError 接入系统authToken Update,数据库操作发生严重错误:Error 1452: Cannot add or update a child row: a foreign key constraint fails (`base_db_dev`.`t_dataex_datasource`, CONSTRAINT `fk_dic_id2` FOREIGN KEY (`dic_id`) REFERENCES `t_dataex_jyt2012` (`id`)) [Error]2020/09/21 17:26:25 SqlQueryError 数据库操作发生严重错误:Error 1054: Unknown column 'code' in 'where clause' +[Error]2020/09/21 17:29:13 SqlQueryError 数据库操作发生严重错误:Error 1054: Unknown column 'code' in 'where clause' +[Error]2020/09/21 17:29:21 SqlQueryError 数据库操作发生严重错误:Error 1054: Unknown column 'code' in 'where clause' +[Error]2020/09/22 11:26:20 SqlQueryError 数据库操作发生严重错误:Error 1054: Unknown column 'code' in 'where clause' +[Error]2020/09/22 11:29:40 SqlQueryError 数据库操作发生严重错误:Error 1054: Unknown column 'code' in 'where clause' diff --git a/dsDataex/MyService/DataEX/DataexService/DataexService.go b/dsDataex/MyService/DataEX/DataexService/DataexService.go index b90afe44..1826bcc9 100644 --- a/dsDataex/MyService/DataEX/DataexService/DataexService.go +++ b/dsDataex/MyService/DataEX/DataexService/DataexService.go @@ -9,6 +9,7 @@ import ( "dsDataex/Utils/CommonUtil" "dsDataex/Utils/ES7Util" "dsDataex/Utils/KafkaUtil" + "dsDataex/Utils/ValidationUtil" "encoding/json" "fmt" "strconv" @@ -386,11 +387,11 @@ func DataexSetBatch(systemID string, datas []MySwagger.Data,datasource *models.T //校验ESDataContent //add by wangshuai 2020-09-16 - //_, _, successDatas, failureIDs := ValidationUtil.ValidESDataContent(esData.DatasourceId, datas) + _, _, successDatas, failureIDs := ValidationUtil.ValidESDataContent(esData.DatasourceId, datas) //将校验通过数据赋值给datas - //datas = successDatas + datas = successDatas //将校验失败数据赋值给failIDs - //failIDs = failureIDs + dataContentFailIDs = failureIDs //四、循环添加索引文档 for no:=0;no< len(datas) && no<1000 ;no++{ diff --git a/dsDataex/Utils/ValidationUtil/ValidationUtil.go b/dsDataex/Utils/ValidationUtil/ValidationUtil.go index e9853350..3497af51 100644 --- a/dsDataex/Utils/ValidationUtil/ValidationUtil.go +++ b/dsDataex/Utils/ValidationUtil/ValidationUtil.go @@ -9,10 +9,6 @@ import ( "strings" ) -// -//type dictionary struct { -// dics map[string]map[string]interface{} // 机构名称 -//} var dics []map[string]interface{} /** @@ -27,10 +23,10 @@ var dics []map[string]interface{} * @Return []MySwagger.Data 校验通过数据集合 * @Return []string 校验失败ID集合 */ -func ValidESDataContent(datasourceCode string, datas []MySwagger.Data) (bool, string, []MySwagger.Data, []string) { +func ValidESDataContent(datasourceCode string, datas []MySwagger.Data) (bool, string, []MySwagger.Data, []map[string]string) { var dataContent map[string]interface{} - var fails string - var failIDs []string + var failMessages string + var dataContentFailIDs []map[string]string var successDatas []MySwagger.Data var conditions string var esData DataEX.ESData @@ -65,10 +61,15 @@ func ValidESDataContent(datasourceCode string, datas []MySwagger.Data) (bool, st // 校验数据 res, mes, _ := ValidESDataContentItem(v, v["item_name"].(string), dataContent[v["item_name"].(string)]) if res == false { - fails += v["item_name"].(string) + mes + " " + failMessages = v["item_name"].(string) + mes + " " r = false // 将校验失败的ID集合写入到failIDs - failIDs = append(failIDs, datas[no].DataID) + //failIDs = append(failIDs, datas[no].DataID) + // 将校验失败的ID和提示信息写入到fails集合 + fails := make(map[string]string) + fails["fail_id"] = datas[no].DataID + fails["fail_msg"] = failMessages + dataContentFailIDs = append(dataContentFailIDs,fails) continue } } @@ -80,9 +81,9 @@ func ValidESDataContent(datasourceCode string, datas []MySwagger.Data) (bool, st } } // 首尾去空格 - fails = strings.TrimRight(fails, " ") + //fails = strings.TrimRight(fails, " ") - return r, fails, successDatas, failIDs + return r, failMessages, successDatas, dataContentFailIDs } /** @@ -144,9 +145,10 @@ func ValidESDataContentItem(dataContentItem map[string]interface{}, itemName str * @Description 字典校验 * @Author wangshuai * @Date 2020-09-16 - * @Param dicId string 字典ID * @Param itemValue interface{} 字典项值 - * @Return bool 校验是否通过 + * @Param dicId string 字典ID + * @Param dics []map[string]interface{} 字典项值 + * @Return bool 校验是否通过 */ func CheckDic(itemValue interface{}, dicId string, dics []map[string]interface{}) bool { flag := false diff --git a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go index 6a155685..43a85ff0 100644 --- a/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go +++ b/dsSupport/MyModel/AccessSystem/AccessSystemDao/AccessSystemDao.go @@ -192,6 +192,7 @@ func ClearIntegration(appId string) error { 功能:获取单个App的信息 */ func GetApp(appId string) (map[string]interface{}, error) { + fmt.Println(appId) sql := `select * from t_app_base where app_id=?` list, err := db.SQL(sql, appId).Query().List() if err != nil { @@ -203,6 +204,28 @@ func GetApp(appId string) (map[string]interface{}, error) { return list[0], nil } +/** + * @title GetAppByCode + * @Description 根据系统编码获取系统信息 + * @Author wangshuai + * @Date 2020-09-22 + * @Param appCode string 数据源CODE + * @Return map[string]interface{} 系统信息 + * @Return string 错误信息 + */ +func GetAppByCode(appCode string) (map[string]interface{}, error) { + fmt.Println(appCode) + sql := `select * from t_app_base where app_code=?` + list, err := db.SQL(sql, appCode).Query().List() + if err != nil { + return nil, err + } + if len(list) == 0 { + return nil, errors.New("没有找到指定的系统编码!") + } + return list[0], nil +} + /** 功能:列表查询AppList */ diff --git a/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go b/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go index a46095d8..265d3566 100644 --- a/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go +++ b/dsSupport/MyModel/DataAccess/DataaccessOpenAPI/DataaccessOpenAPI.go @@ -104,7 +104,7 @@ func CreateDataaccess(c *gin.Context) { success, message, _ := DataaccessService.CreateDataaccess(raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -112,7 +112,7 @@ func CreateDataaccess(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -161,7 +161,7 @@ func UpdateDataaccess(c *gin.Context) { success, message, _ := DataaccessService.UpdateDataaccess(ID, raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -169,7 +169,7 @@ func UpdateDataaccess(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -198,7 +198,7 @@ func DeleteDataaccess(c *gin.Context) { success, message, _ := DataaccessService.RemoveDataaccess(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -206,7 +206,7 @@ func DeleteDataaccess(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/DataAccess/DataaccessService/DataaccessService.go b/dsSupport/MyModel/DataAccess/DataaccessService/DataaccessService.go index 67ef60a1..9b550050 100644 --- a/dsSupport/MyModel/DataAccess/DataaccessService/DataaccessService.go +++ b/dsSupport/MyModel/DataAccess/DataaccessService/DataaccessService.go @@ -108,7 +108,7 @@ func CreateDataaccess(model models.TDataexDataaccess) (bool, string, error) { return false, "数据源编码不存在", nil } // 校验数据使用系统是否存在 - _, e := AccessSystemDao.GetApp(model.ConsumeSystemid) + _, e := AccessSystemDao.GetAppByCode(model.ConsumeSystemid) if e != nil { return false, "数据使用系统不存在", nil } @@ -155,7 +155,7 @@ func UpdateDataaccess(id string, model models.TDataexDataaccess) (bool, string, if !DatasourceDAO.IsDatasourceExistsByCode(html.EscapeString(model.DatasourceCode)) { return false, "数据源编码不存在", nil } - _, e := AccessSystemDao.GetApp(model.ConsumeSystemid) + _, e := AccessSystemDao.GetAppByCode(model.ConsumeSystemid) if e != nil { return false, "SystemId不存在", nil } diff --git a/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go b/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go index 7515c09a..9e425961 100644 --- a/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go +++ b/dsSupport/MyModel/DataError/DataerrorOpenAPI/DataerrorOpenAPI.go @@ -94,7 +94,7 @@ func DeleteDataerror(c *gin.Context) { success, message, _ := DataerrorService.RemoveDataerror(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -102,7 +102,7 @@ func DeleteDataerror(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go b/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go index ed7ac25d..76f0186c 100644 --- a/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go +++ b/dsSupport/MyModel/DataSource/DatasourceOpenAPI/DatasourceOpenAPI.go @@ -107,7 +107,7 @@ func CreateDatasource(c *gin.Context) { success, message, _ := DatasourceService.CreateDatasource(raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -115,7 +115,7 @@ func CreateDatasource(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -164,7 +164,7 @@ func UpdateDatasource(c *gin.Context) { success, message, _ := DatasourceService.UpdateDatasource(ID, raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -172,7 +172,7 @@ func UpdateDatasource(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -201,7 +201,7 @@ func DeleteDatasource(c *gin.Context) { success, message, _ := DatasourceService.RemoveDatasource(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -209,7 +209,7 @@ func DeleteDatasource(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go b/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go index 9bd9e913..bae2db41 100644 --- a/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go +++ b/dsSupport/MyModel/DataSource/DatasourceService/DatasourceService.go @@ -112,7 +112,7 @@ func GetDatasourceResults(swag MySwagger.DatasourceSwag) (bool, string, int, []m */ func CreateDatasource(model models.TDataexDatasource) (bool, string, error) { // 校验数据提供系统是否存在 - _, e := AccessSystemDao.GetApp(model.SystemId) + _, e := AccessSystemDao.GetAppByCode(model.SystemId) if e != nil { return false, "数据提供系统不存在", nil } @@ -147,7 +147,7 @@ func CreateDatasource(model models.TDataexDatasource) (bool, string, error) { func UpdateDatasource(id string, model models.TDataexDatasource) (bool, string, error) { // 校验数据提供系统是否存在 - _, e := AccessSystemDao.GetApp(model.SystemId) + _, e := AccessSystemDao.GetAppByCode(model.SystemId) if e != nil { return false, "数据提供系统不存在", nil } diff --git a/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go b/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go index 254e4cc0..68ca5ecd 100644 --- a/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go +++ b/dsSupport/MyModel/JYT2012/Jyt2012OpenAPI/Jyt2012OpenAPI.go @@ -111,7 +111,7 @@ func CreateJyt2012(c *gin.Context) { success, message, _ := Jyt2012Service.CreateJyt2012(raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -119,7 +119,7 @@ func CreateJyt2012(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -167,7 +167,7 @@ func UpdateJyt2012(c *gin.Context) { success, message, _ := Jyt2012Service.UpdateJyt2012(ID, raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -175,7 +175,7 @@ func UpdateJyt2012(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -204,7 +204,7 @@ func DeleteJyt2012(c *gin.Context) { success, message, _ := Jyt2012Service.RemoveJyt2012(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -212,7 +212,7 @@ func DeleteJyt2012(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go b/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go index 1f73c0ad..eef74670 100644 --- a/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go +++ b/dsSupport/MyModel/MetaData/MetadataOpenAPI/MetadataOpenAPI.go @@ -103,7 +103,7 @@ func CreateMetadata(c *gin.Context) { success, message, _ := MetadataService.CreateMetadata(raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -111,7 +111,7 @@ func CreateMetadata(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -161,7 +161,7 @@ func UpdateMetadata(c *gin.Context) { success, message, _ := MetadataService.UpdateMetadata(ID, raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -169,7 +169,7 @@ func UpdateMetadata(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -198,7 +198,7 @@ func DeleteMetadata(c *gin.Context) { success, message, _ := MetadataService.RemoveMetadata(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -206,7 +206,7 @@ func DeleteMetadata(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -242,7 +242,7 @@ func CreateMetadataES(c *gin.Context) { success, message, _ := MetadataService.CreateMetadataES(indexName) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -250,7 +250,7 @@ func CreateMetadataES(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go b/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go index ae0daaaa..0415ba1e 100644 --- a/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go +++ b/dsSupport/MyModel/OrgTree/OrgtreeOpenAPI/OrgtreeOpenAPI.go @@ -106,7 +106,7 @@ func CreateOrgtree(c *gin.Context) { success, message, _ := OrgtreeService.CreateOrgtree(raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -114,7 +114,7 @@ func CreateOrgtree(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -167,7 +167,7 @@ func UpdateOrgtree(c *gin.Context) { success, message, _ := OrgtreeService.UpdateOrgtree(ID, raw) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -175,7 +175,7 @@ func UpdateOrgtree(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, @@ -205,7 +205,7 @@ func DeleteOrgtree(c *gin.Context) { success, message, _ := OrgtreeService.RemoveOrgtree(ID) if success { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: true, Fail: false, Message: message, @@ -213,7 +213,7 @@ func DeleteOrgtree(c *gin.Context) { return } else { - c.JSON(http.StatusOK, MySwagger.Result{ + c.JSON(http.StatusOK, MySwagger.ResultOne{ Success: false, Fail: true, Message: message, diff --git a/dsSupport/MyModel/OrgTree/OrgtreeService/OrgtreeService.go b/dsSupport/MyModel/OrgTree/OrgtreeService/OrgtreeService.go index 0bb8160f..180fec84 100644 --- a/dsSupport/MyModel/OrgTree/OrgtreeService/OrgtreeService.go +++ b/dsSupport/MyModel/OrgTree/OrgtreeService/OrgtreeService.go @@ -76,7 +76,7 @@ func GetOrgtreeResults(swag MySwagger.OrgtreeSwag) (bool, string, int, []map[str func CreateOrgtree(model models.TDataexOrgtree) (bool, string, error) { // 校验源业务系统是否存在 - _, e := AccessSystemDao.GetApp(model.LinksystemId) + _, e := AccessSystemDao.GetAppByCode(model.LinksystemId) if e != nil { return false, "源业务系统不存在", nil } @@ -102,7 +102,7 @@ func CreateOrgtree(model models.TDataexOrgtree) (bool, string, error) { func UpdateOrgtree(id string, model models.TDataexOrgtree) (bool, string, error) { // 校验源业务系统是否存在 - _, e := AccessSystemDao.GetApp(model.LinksystemId) + _, e := AccessSystemDao.GetAppByCode(model.LinksystemId) if e != nil { return false, "源业务系统不存在", nil }