| | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setCreateUser(ue.getId()); |
| | | entity.setDepid(ue.getDepcode()); |
| | | } |
| | | |
| | | int count = resService.insert(entity); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | |
| | | if (ue != null) { |
| | | for (ResEntity entity : list) { |
| | | entity.setCreateUser(ue.getId()); |
| | | entity.setDepid(ue.getDepcode()); |
| | | } |
| | | } |
| | | |
| | | int count = resService.inserts(list); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | |
| | | try { |
| | | int count = resService.delete(id); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | |
| | | |
| | | int count = resService.deletes(ids); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | entity.setDepid(ue.getDepcode()); |
| | | } |
| | | |
| | | int count = resService.update(entity); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |
| | |
| | | if (ue != null) { |
| | | for (ResEntity entity : list) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | entity.setDepid(ue.getDepcode()); |
| | | } |
| | | } |
| | | |
| | | int count = resService.updates(list); |
| | | if (count > 0) { |
| | | permsService.clearResCache(); |
| | | permsService.clearPermsCache(); |
| | | } |
| | | |
| | | return success(count); |