mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	fix: 逻辑删除唯一索引冲突的问题
This commit is contained in:
		@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import lombok.*;
 | 
			
		||||
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典类型表
 | 
			
		||||
 *
 | 
			
		||||
@@ -47,4 +49,9 @@ public class DictTypeDO extends BaseDO {
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除时间
 | 
			
		||||
     */
 | 
			
		||||
    private LocalDateTime deletedTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@ import com.google.common.annotations.VisibleForTesting;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.Resource;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
 | 
			
		||||
@@ -80,7 +81,9 @@ public class DictTypeServiceImpl implements DictTypeService {
 | 
			
		||||
            throw exception(DICT_TYPE_HAS_CHILDREN);
 | 
			
		||||
        }
 | 
			
		||||
        // 删除字典类型
 | 
			
		||||
        dictTypeMapper.deleteById(id);
 | 
			
		||||
        dictType.setDeletedTime(LocalDateTime.now());
 | 
			
		||||
        dictType.setDeleted(true);
 | 
			
		||||
        dictTypeMapper.updateById(dictType);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user