| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 角色-图层 |
| | | * @author WWW |
| | | */ |
| | | @SuppressWarnings("ALL") |
| | | @Api(tags = "运维管理\\角色图层") |
| | | @RestController |
| | | @RequestMapping("/roleLayer") |
| | |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.inserts(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("id数组不能为空", -1); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = roleLayerService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |