Commit a5ec334e53945deb51220b332afe4bee390c9fac
1 parent
9e3ed757
fix: 逻辑删除唯一索引冲突的问题
Showing
1 changed file
with
2 additions
and
1 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictTypeMapper.java
| ... | ... | @@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; |
| 10 | 10 | import org.apache.ibatis.annotations.Delete; |
| 11 | 11 | import org.apache.ibatis.annotations.Mapper; |
| 12 | 12 | import org.apache.ibatis.annotations.Param; |
| 13 | +import org.apache.ibatis.annotations.Update; | |
| 13 | 14 | |
| 14 | 15 | import java.time.LocalDateTime; |
| 15 | 16 | import java.util.List; |
| ... | ... | @@ -42,7 +43,7 @@ public interface DictTypeMapper extends BaseMapperX<DictTypeDO> { |
| 42 | 43 | return selectOne(DictTypeDO::getName, name); |
| 43 | 44 | } |
| 44 | 45 | |
| 45 | - @Delete("UPDATE system_dict_type SET DELETED = 1,DELETED_TIME=#{deletedTime} WHERE id = #{id}") | |
| 46 | + @Update("UPDATE system_dict_type SET DELETED = 1,DELETED_TIME=#{deletedTime} WHERE id = #{id}") | |
| 46 | 47 | int deleteById(@Param("id") Long id, @Param("deletedTime") LocalDateTime deletedTime); |
| 47 | 48 | |
| 48 | 49 | default int deleteById(Long id) { | ... | ... |