status 500 reading AdminService#getDeptListByIdString; content timestamp2023-09-22T031019069+0000status500errorInternal Server Errormessagen### Error querying database Cause javasqlSQLException ORA-01
状态500读取AdminService#getDeptListById(String)的内容:{"timestamp":"2023-09-22T03:10:19.069+0000","status":500,"error":"内部服务器错误","message":"\n### 查询数据库时出错。原因:java.sql.SQLException: ORA-01427: 单行子查询返回多行\n\n### 错误可能存在于类路径资源[mapper/system/UserMapper.xml]\n### 错误可能涉及defaultParameterMap\n### 在设置参数时发生错误\n### SQL: select ud.DEPT_ID AS "deptId", dt.DEPT_CODE as "deptCode", dt.DEPT_NAME AS "deptName" from SYS_USER_DEPT ud,SYS_DEPT_DICT dt WHERE ud.DEPT_ID = dt.DEPT_ID and ( dt.CLINIC_LABEL_ID is null or dt.DEPT_CODE = (select DATA_VALUE from SYSMN.MAV_EMR_CORE_DICT where BASICDATAVALUE_ID = dt.CLINIC_LABEL_ID) ) and ud.USER_ID =? ORDER BY (select a.sort_id from sysmn.SYS_USER_DEPT_SORT a where a.USER_ID =? and a.CATALOG_LOCATION = '1' and a.DEPT_ID = dt.DEPT_ID) asc\n### 原因:java.sql.SQLException: ORA-01427: 单行子查询返回多行\n\n; 错误的SQL语法[]; 嵌套异常是java.sql.SQLException: ORA-01427: 单行子查询返回多行\n","path":"/system/user/getDeptListById"}
此错误表示在执行数据库查询时出现了问题,具体原因是ORA-01427错误,即单行子查询返回多行。该错误可能存在于UserMapper.xml文件中的defaultParameterMap,具体SQL查询语句如上所示。此错误的嵌套异常是java.sql.SQLException: ORA-01427: 单行子查询返回多行。
原文地址: https://www.cveoy.top/t/topic/jgSr 著作权归作者所有。请勿转载和采集!