| | |
| | | import com.moon.server.entity.all.ResponseMsg; |
| | | import com.moon.server.entity.sys.LayerEntity; |
| | | import com.moon.server.entity.sys.UserEntity; |
| | | import com.moon.server.service.all.PermsService; |
| | | import com.moon.server.service.sys.LayerService; |
| | | import com.moon.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | PermsService permsService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | |
| | | } |
| | | |
| | | int count = layerService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = layerService.inserts(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = layerService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = layerService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = layerService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | |
| | | int count = layerService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearLayerCache(); |
| | | } |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |