zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
package com.changhong.epc.admin.service.menu.impl;
 
import com.changhong.epc.admin.mapper.centen.menu.MenuMapper;
import com.changhong.epc.admin.service.menu.MenuService;
import com.changhong.epc.bean.admin.menu.Menu;
import com.changhong.epc.constter.base.BaseConst;
import com.iemsoft.framework.cloud.core.thread.ThreadData;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
 
@Service
public class MenuServiceImpl implements MenuService, BaseConst {
 
    @Resource
    private MenuMapper menuMapper;
 
    @Override
    public List<Menu> getMenu() {
        if(Objects.equals("admin", ThreadData.get(PERM_TYPE))){
            return menuMapper.getAdminMenu();
        }
        return menuMapper.getMenu();
    }
 
}