两个明细表的主表保存数据报错 系统开小差,无法填写数据

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

### Error updating database.  Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: insert into projectfee(tenant_id,explain,is_deleted,create_time,create_dept,feename,fee,main_id,create_user,id,feecategory) VALUE(?,?,?,?,?,?,?,?,?,?,?)

### The error may exist in com/jeelowcode/core/framework/mapper/JeeLowCodeSqlMapper.java (best guess)

### The error may involve com.jeelowcode.core.framework.mapper.JeeLowCodeSqlMapper.insertData

### The error occurred while executing an update

### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: insert into projectfee(tenant_id,explain,is_deleted,create_time,create_dept,feename,fee,main_id,create_user,id,feecategory) VALUE(?,?,?,?,?,?,?,?,?,?,?)

  at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)

  at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)

  at com.sun.proxy.$Proxy139.insert(Unknown Source)

  at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)

  at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)

  at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152)

  at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)

  at com.sun.proxy.$Proxy192.insertData(Unknown Source)

  at sun.reflect.GeneratedMethodAccessor1196.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)

  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

  at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)

  at com.jeelowcode.framework.utils.component.defaultval.DefaultValAspect.all(DefaultValAspect.java:90)

  at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

第二个明细表是 后面加上去的,但是之前的测试数据已经删除

评论区

超级管理员 2024-12-24 13:45

你好,可以到我们的演示环境复现一下 https://demo.jeelowcode.com/

qyun111 2024-12-24 14:37

你好,已在演示环境复现,详细见失败日志中请求时间是2024-12-24 14:32:49 到 2024-12-24 14:34:31的记录

qyun111 2024-12-24 14:45

只能新增跟删除,查看会报错

qyun111 2024-12-24 17:41

删除偶尔也会报错,不稳定

JeeLowCode 2024-12-25 10:10

@qyun111 收到

qyun111 2024-12-25 10:43

还有个问题,新增的时候会保存不了,失败原因提示:org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1871740506214445057' for key 'PRIMARY'
### The error may exist in com/jeelowcode/core/framework/mapper/JeeLowCodeSqlMapper.java (best guess)
### The error may involve com.jeelowcode.core.framework.mapper.JeeLowCodeSqlMapper.insertData-Inline
### The error occurred while setting parameters
但是主键在表单是不放出来的,应该是系统自动生成

超级管理员 2024-12-25 15:04

@qyun111 收到
回复