| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询所有") |
| | | @GetMapping(value = "/selectAll") |
| | | public ResponseMsg<List<LayerEntity>> selectAll() { |
| | | public ResponseMsg<List<LayerEntity>> selectAll(Integer flag) { |
| | | try { |
| | | List<LayerEntity> list = layerService.selectAll(); |
| | | List<LayerEntity> list = layerService.selectAll(flag); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = layerService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = layerService.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 = layerService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("id数组不能为空", -1); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = layerService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = layerService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = layerService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |