|
|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.dcs.common.enums.GeneralStatus;
|
|
|
import com.dcs.hnyz.domain.Equipment;
|
|
|
import com.dcs.hnyz.domain.PageControl;
|
|
|
+import com.dcs.hnyz.domain.vo.PageNavVO;
|
|
|
import com.dcs.hnyz.mapper.PageControlMapper;
|
|
|
import com.dcs.hnyz.service.IEquipmentService;
|
|
|
import com.dcs.hnyz.service.IPageControlService;
|
|
|
@@ -136,4 +137,22 @@ public class PageControlServiceImpl implements IPageControlService
|
|
|
public PageControl getPageByCode(String pageCode) {
|
|
|
return pageControlMapper.selectOne(new LambdaQueryWrapper<PageControl>().eq(PageControl::getPageCode,pageCode));
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<PageNavVO> getNavLabel() {
|
|
|
+ LambdaQueryWrapper<PageControl> wrapper=new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(PageControl::getStatus, GeneralStatus.ENABLE.getCode());
|
|
|
+ List<PageControl> pageControlList = pageControlMapper.selectList(wrapper);
|
|
|
+ List<PageNavVO> pageNavList = pageControlList.stream()
|
|
|
+ .map(pageControl -> {
|
|
|
+ PageNavVO vo = new PageNavVO();
|
|
|
+ vo.setLabel(pageControl.getPageName());
|
|
|
+ vo.setCode(pageControl.getPageCode());
|
|
|
+ vo.setPath(pageControl.getPageUrl());
|
|
|
+ return vo;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ return pageNavList;
|
|
|
+ }
|
|
|
}
|