fix: 逻辑删除唯一索引冲突的问题

This commit is contained in:
gaibu 2022-12-10 12:02:49 +08:00
parent 9e3ed75772
commit a5ec334e53
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.time.LocalDateTime;
import java.util.List;
@ -42,7 +43,7 @@ public interface DictTypeMapper extends BaseMapperX<DictTypeDO> {
return selectOne(DictTypeDO::getName, name);
}
@Delete("UPDATE system_dict_type SET DELETED = 1,DELETED_TIME=#{deletedTime} WHERE id = #{id}")
@Update("UPDATE system_dict_type SET DELETED = 1,DELETED_TIME=#{deletedTime} WHERE id = #{id}")
int deleteById(@Param("id") Long id, @Param("deletedTime") LocalDateTime deletedTime);
default int deleteById(Long id) {