| | |
| | | import com.moon.server.entity.sys.RoleLayerEntity; |
| | | import com.moon.server.entity.sys.RoleResEntity; |
| | | import com.moon.server.entity.sys.UserEntity; |
| | | import com.moon.server.service.all.PermsService; |
| | | import com.moon.server.service.sys.RoleLayerService; |
| | | import com.moon.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | * 角色-图层 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "运维管理\\角色-图层") |
| | | @Api(tags = "运维管理\\角色图层") |
| | | @RestController |
| | | @RequestMapping("/roleLayer") |
| | | public class RoleLayerController extends BaseController { |
| | |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | PermsService permsService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据角色ID查询资源") |
| | |
| | | } |
| | | |
| | | int count = roleLayerService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = roleLayerService.inserts(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = roleLayerService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = roleLayerService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = roleLayerService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = roleLayerService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |