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 java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -62,11 +63,11 @@ public class MenuIconServiceImpl extends ServiceImpl<MenuIconMapper, MenuIcon> i
|
|||
@Override
|
||||
public List<MenuIconVo> getIconNameList(String iconName) {
|
||||
return list(Wrappers.<MenuIcon>lambdaQuery().like(MenuIcon::getIconName, iconName))
|
||||
.stream().map(menuIcon -> {
|
||||
.stream().collect(Collectors.toMap(MenuIcon::getIconName, menuIcon -> {
|
||||
MenuIconVo menuIconVo = new MenuIconVo();
|
||||
BeanUtils.copyProperties(menuIcon, menuIconVo);
|
||||
return menuIconVo;
|
||||
}).toList();
|
||||
}, (existing, replacement) -> existing)).values().stream().toList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
and icon.icon_name like CONCAT('%',#{dto.iconName},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
<!-- 物理删除系统菜单图标 -->
|
||||
|
|
Loading…
Reference in New Issue