| | |
| | | package com.moral.api.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.moral.api.entity.ManageMenu; |
| | | import com.moral.api.mapper.ManageMenuMapper; |
| | | import com.moral.api.mapper.ManageRoleMenuMapper; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | } |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | public List<ManageMenu> getAllWithPagingQuery(Map map) { |
| | | Map limitMap = new HashMap(); |
| | | limitMap.put("start",(Integer.parseInt(map.get("current").toString())-1)*Integer.parseInt(map.get("size").toString())); |
| | | limitMap.put("number",Integer.parseInt(map.get("size").toString())); |
| | | List<ManageMenu> manageMenus = manageMenuMapper.getDataWithPage(limitMap); |
| | | System.out.println(manageMenus); |
| | | return manageMenus; |
| | | } |
| | | |
| | | @Override |
| | | public List<ManageMenu> getManageMenuByNameFuzzy(Map map) { |
| | | Map limitMap = new HashMap(); |
| | | limitMap.put("name",map.get("name")); |
| | | limitMap.put("start",(Integer.parseInt(map.get("current").toString())-1)*Integer.parseInt(map.get("size").toString())); |
| | | limitMap.put("number",Integer.parseInt(map.get("size").toString())); |
| | | List<ManageMenu> manageMenus = manageMenuMapper.getManageRoleByNameFuzzy(limitMap); |
| | | return manageMenus; |
| | | } |
| | | } |