| | |
| | | @PutMapping("/authUserToArchive") |
| | | public AjaxResult selectRecordToUser(String recordId, Long[] userIds) |
| | | { |
| | | return toAjax(archiverecordstouserService.insertRecordToUsers(recordId, userIds)); |
| | | for(Long userId:userIds) |
| | | { |
| | | if(archiverecordstouserService.queryArchiverecordstouserByRecordId(recordId, userId)==1) |
| | | { |
| | | return toAjax(0); |
| | | } |
| | | } |
| | | archiverecordstouserService.insertRecordToUsers(recordId, userIds); |
| | | return toAjax(200); |
| | | } |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | |
| | | { |
| | | return toAjax(archiverecordstouserService.deleteArchiverecordstouserByIds(ids)); |
| | | } |
| | | /** |
| | | * 根据用户id和recordId进行删除 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:remove')") |
| | | @DeleteMapping("/deleteByRidUid") |
| | | public AjaxResult removeByRecordIdAndUserId(String recordId, Long userId) |
| | | { |
| | | return toAjax(archiverecordstouserService.deleteArchiverecordstouserByRecordId(recordId, userId)); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:query')") |
| | | @GetMapping("/getByRidUid") |
| | | public AjaxResult getByRecordIdAndUserId(String recordId, Long userId) |
| | | { |
| | | return toAjax(archiverecordstouserService.queryArchiverecordstouserByRecordId(recordId, userId)); |
| | | } |
| | | } |