Closed softboy99 closed 1 month ago
3.5.3.2
在@async方法中updateById拼接的tenantId =0,造成更新数据失败
Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@54df2b73] was not registered for synchronization because synchronization is not active JDBC Connection [ConnectionProxyImpl{connectedTime=2024-08-08 13:48:20.613, closeCount=0, lastValidateTimeMillis=2024-08-08 13:48:20.769}] will not be managed by Spring original SQL: UPDATE sample SET sample_no=?, sample_name=?, raw_data_file=?, analysis_model_id=?, analysis_chart=?, pca_plot=?, conclusion=?, sys_org_code=?, create_by=?, create_time=?, update_by=?, update_time=?, tenant_id=? WHERE id=? SQL to parse, SQL: UPDATE sample SET sample_no=?, sample_name=?, raw_data_file=?, analysis_model_id=?, analysis_chart=?, pca_plot=?, conclusion=?, sys_org_code=?, create_by=?, create_time=?, update_by=?, update_time=?, tenant_id=? WHERE id=? parse the finished SQL: UPDATE sample SET sample_no = ?, sample_name = ?, raw_data_file = ?, analysis_model_id = ?, analysis_chart = ?, pca_plot = ?, conclusion = ?, sys_org_code = ?, create_by = ?, create_time = ?, update_by = ?, update_time = ?, tenant_id = ? WHERE id = ? AND tenant_id = 0 ==> Preparing: UPDATE sample SET sample_no = ?, sample_name = ?, raw_data_file = ?, analysis_model_id = ?, analysis_chart = ?, pca_plot = ?, conclusion = ?, sys_org_code = ?, create_by = ?, create_time = ?, update_by = ?, update_time = ?, tenant_id = ? WHERE id = ? AND tenant_id = 0 ==> Parameters: RG173-2(String), RG173-2(String), temp/RG173-21722513701709.csv(String), 1724264686739726337(String), temp/1818980419708252162.png(String), temp/1818980419708252162pca.png(String), ����������(String), A05(String), doctor_su(String), 2024-08-01 20:01:42.0(Timestamp), doctor_su(String), 2024-08-08 13:49:01.949(Timestamp), 1008(Integer), 1818980419708252162(String) <== Updates: 0 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@54df2b73]
自己解决async问题,和MP无关
确认
当前程序版本
3.5.3.2
问题描述
在@async方法中updateById拼接的tenantId =0,造成更新数据失败
详细堆栈日志