zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【异常】因为忘加了租户查询条件,导致重复ID导入失败Duplicate entry ‘XXX‘ for key ‘PRIMARY‘

导入异常 查询 for 失败 重复 ID Key
2023-09-14 09:14:14 时间

一、异常说明

 Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '670' for key 'PRIMARY'
 The error may exist in /mall/admin/mapper/GoodsCategoryMapper.java (best guess)
 The error may involve .admin.mapper.GoodsCategoryMapper.insert-Inline
 The error occurred while setting parameters
 SQL: INSERT INTO goods_category (id, tenant_id, enable, parent_id, name, sort, create_time, update_time, del_flag) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
 Cause: java.sql.SQLIntegrityCons