| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 菜单 |
| | | * @author sws |
| | | * @date 2022-09-23 |
| | | */ |
| | | @Api(tags= "运维管理\\菜单管理") |
| | | @RestController |
| | | @SuppressWarnings("ALL") |
| | | @RequestMapping("/menu") |
| | | public class MenuController extends BaseController { |
| | | @Autowired |
| | |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.insertMenu(entity); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.insertMenus(list); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @GetMapping(value = "/deleteMenu") |
| | | public ResponseMsg<Integer> deleteMenu(int id) { |
| | | try { |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.deleteMenu(id); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("id数组不能为空", -1); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.deleteMenus(ids); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.updateMenu(entity); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = menuService.updateMenus(list); |
| | | if (count > 0) { |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |