liujie
2026-02-14 db4ff051b715e2a2dfb2659eb7a94de96555ca8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.xiaopeng.operation.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.model.operation.SysMenu;
import com.xiaopeng.operation.mapper.SysMenuMapper;
import com.xiaopeng.operation.service.ISysMenuService;
import org.springframework.stereotype.Service;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 * <p>
 * 菜单权限表 服务实现类
 * </p>
 *
 * @author mitao
 * @since 2026-02-03
 */
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements ISysMenuService {
 
    /**
     * 根据菜单ID列表查询菜单列表
     *
     * @param menuIds 菜单ID列表
     * @return 菜单列表
     */
    @Override
    public List<SysMenu> selectMenusByMenuIds(List<Long> menuIds) {
        if (menuIds == null || menuIds.isEmpty()) {
            return new ArrayList<>();
        }
 
        // 使用 MyBatis-Plus 的 listByIds 方法批量查询
        return this.listByIds(menuIds);
    }
}