diff --git a/Logs/dsSupport.log b/Logs/dsSupport.log index a7278dd7..ab846bb5 100644 --- a/Logs/dsSupport.log +++ b/Logs/dsSupport.log @@ -158,3 +158,4 @@ [Error]2020/09/03 08:46:37 SqlQueryError Error 1054: Unknown column 'da.delete_flag' in 'where clause' [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' diff --git a/dsSupport/MyModel/DataSource/DatasourceDAO/DatasourceDAO.go b/dsSupport/MyModel/DataSource/DatasourceDAO/DatasourceDAO.go index b97567b5..8e595489 100644 --- a/dsSupport/MyModel/DataSource/DatasourceDAO/DatasourceDAO.go +++ b/dsSupport/MyModel/DataSource/DatasourceDAO/DatasourceDAO.go @@ -81,7 +81,7 @@ func RemoveDatasource(id string, model *models.TDataexDatasource) (bool, string, func GetDatasourceCountByCode(code string) int64 { business := new(models.TDataexDatasource) - total, err := db.Where("code =?", code).Count(business) + total, err := db.Where("datasource_code =?", code).Count(business) if err != nil { LogUtil.Error(ErrorConst.SqlQueryError, "数据库操作发生严重错误:"+err.Error()) }