一、该问题的重现步骤是什么?
1.
2. 要把 y_category 表里的数据复制到y_mall_category, 要改变 tenant_id 和 id 。
3.
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
四、请提供详细的错误堆栈信息,这很重要。
{
"code": 500,
"success": false,
"data": {},
"msg": "\n### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'\n### The error may exist in file [/Users/island/Desktop/ZMProject/QFXProject/platform-java/Quan-Xin-Fu-Boot/target/classes/org/springblade/qfy/operate/shop/category/mapper/MallCategoryMapper.xml]\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: INSERT INTO y_mall_category (name, parent_id, grade, sort, remark, ancestors, is_leaf, img_url, is_deleted, tenant_id, id) SELECT name, parent_id, grade, sort, remark, ancestors, is_leaf, img_url, is_deleted, ?, ? FROM y_category WHERE tenant_id = '000000' AND is_deleted = 0\n### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'\n; Duplicate entry '0' for key 'PRIMARY'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'"
}
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端