fix: 菜单图标查询重复
This commit is contained in:
parent
151a2027ae
commit
f16e46ff33
|
@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -62,11 +63,11 @@ public class MenuIconServiceImpl extends ServiceImpl<MenuIconMapper, MenuIcon> i
|
||||||
@Override
|
@Override
|
||||||
public List<MenuIconVo> getIconNameList(String iconName) {
|
public List<MenuIconVo> getIconNameList(String iconName) {
|
||||||
return list(Wrappers.<MenuIcon>lambdaQuery().like(MenuIcon::getIconName, iconName))
|
return list(Wrappers.<MenuIcon>lambdaQuery().like(MenuIcon::getIconName, iconName))
|
||||||
.stream().map(menuIcon -> {
|
.stream().collect(Collectors.toMap(MenuIcon::getIconName, menuIcon -> {
|
||||||
MenuIconVo menuIconVo = new MenuIconVo();
|
MenuIconVo menuIconVo = new MenuIconVo();
|
||||||
BeanUtils.copyProperties(menuIcon, menuIconVo);
|
BeanUtils.copyProperties(menuIcon, menuIconVo);
|
||||||
return menuIconVo;
|
return menuIconVo;
|
||||||
}).toList();
|
}, (existing, replacement) -> existing)).values().stream().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
and icon.icon_name like CONCAT('%',#{dto.iconName},'%')
|
and icon.icon_name like CONCAT('%',#{dto.iconName},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 物理删除系统菜单图标 -->
|
<!-- 物理删除系统菜单图标 -->
|
||||||
|
|
Loading…
Reference in New Issue