| | |
| | | @Autowired |
| | | private IArchiverecordstouserService archiverecordstouserService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')") |
| | | |
| | | @PutMapping("/authArchivesToSigleUser") |
| | | public AjaxResult insertArchivesToSingleUser(Long[] recordIds, Long[] userIds) |
| | | { |
| | | for(Long recordId: recordIds) |
| | | { |
| | | //判断是否授权给别人了 |
| | | if(archiverecordstouserService.selectArchiveRecordUsers(recordId)) |
| | | continue; |
| | | archiverecordstouserService.insertRecordToUsers(recordId, userIds); |
| | | } |
| | | return toAjax(200); |
| | | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')") |
| | | |
| | | @PutMapping("/authUserToArchive") |
| | | public AjaxResult selectRecordToUser(String recordId, Long[] userIds) |
| | | public AjaxResult selectRecordToUser(Long recordId, Long[] userIds) |
| | | { |
| | | for(Long userId:userIds) |
| | | { |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:remove')") |
| | | @DeleteMapping("/deleteByRidUid") |
| | | public AjaxResult removeByRecordIdAndUserId(String recordId, Long userId) |
| | | public AjaxResult removeByRecordIdAndUserId(Long recordId, Long userId) |
| | | { |
| | | return toAjax(archiverecordstouserService.deleteArchiverecordstouserByRecordId(recordId, userId)); |
| | | } |
| | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:query')") |
| | | @GetMapping("/getByRidUid") |
| | | public AjaxResult getByRecordIdAndUserId(String recordId, Long userId) |
| | | public AjaxResult getByRecordIdAndUserId(Long recordId, Long userId) |
| | | { |
| | | return toAjax(archiverecordstouserService.queryArchiverecordstouserByRecordId(recordId, userId)); |
| | | } |