| | |
| | | import com.ruoyi.approve.pojo.NotificationManagement; |
| | | import com.ruoyi.approve.pojo.OnlineMeeting; |
| | | import com.ruoyi.approve.service.NotificationManagementService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @RequestMapping("/notificationManagement") |
| | | @AllArgsConstructor |
| | | public class NotificationManagementController { |
| | | @Autowired |
| | | public class NotificationManagementController extends BaseController { |
| | | private NotificationManagementService notificationManagementService ; |
| | | @Autowired |
| | | private OnlineMeetingMapper onlineMeetingMapper; |
| | | @Autowired |
| | | private FileSharingMapper fileSharingMapper; |
| | | /**、 |
| | | * 获取列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | public AjaxResult getList(@RequestParam(defaultValue = "1") long current, |
| | | public R<?> getList(@RequestParam(defaultValue = "1") long current, |
| | | @RequestParam(defaultValue = "50") long size, NotificationManagement notificationManagement) { |
| | | Page page = new Page(current, size); |
| | | return AjaxResult.success(notificationManagementService.listpage(page,notificationManagement)); |
| | | return R.ok(notificationManagementService.listpage(page,notificationManagement)); |
| | | } |
| | | /**、 |
| | | * 增添 |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.save(notificationManagement)); |
| | | public R<?> add(@RequestBody NotificationManagement notificationManagement){ |
| | | return R.ok(notificationManagementService.save(notificationManagement)); |
| | | } |
| | | /** |
| | | * 更新 |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.updateById(notificationManagement)); |
| | | public R<?> update(@RequestBody NotificationManagement notificationManagement){ |
| | | return R.ok(notificationManagementService.updateById(notificationManagement)); |
| | | } |
| | | /** |
| | | * 删除 |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(notificationManagementService.removeByIds(ids)); |
| | | public R<?> delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return R.fail("请传入要删除的ID"); |
| | | return R.ok(notificationManagementService.removeByIds(ids)); |
| | | } |
| | | /** |
| | | *新增会议 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOnlineMeeting") |
| | | public AjaxResult addOnlineMeeting(@RequestBody OnlineMeeting onlineMeeting){ |
| | | return AjaxResult.success(onlineMeetingMapper.insert(onlineMeeting)); |
| | | public R<?> addOnlineMeeting(@RequestBody OnlineMeeting onlineMeeting){ |
| | | return R.ok(onlineMeetingMapper.insert(onlineMeeting)); |
| | | } |
| | | /** |
| | | *新增文件共享 |
| | | * |
| | | */ |
| | | @PostMapping("/addFileSharing") |
| | | public AjaxResult addFileSharing(@RequestBody FileSharing fileSharing){ |
| | | return AjaxResult.success(fileSharingMapper.insert(fileSharing)); |
| | | public R<?> addFileSharing(@RequestBody FileSharing fileSharing){ |
| | | return R.ok(fileSharingMapper.insert(fileSharing)); |
| | | } |
| | | } |
| | | |