| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.WaveItem; |
| | | import com.vincent.rsf.server.manager.enums.WaveItemExceStatus; |
| | | import com.vincent.rsf.server.manager.service.WaveItemService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | ExcelUtil.build(ExcelUtil.create(waveItemService.list(), WaveItem.class), response); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waveItem:update')") |
| | | @ApiOperation("暂停下发任务") |
| | | @PostMapping("/waveItem/pause/pub") |
| | | public R pausePublicTask(@PathVariable Long id) { |
| | | waveItemService.update(new LambdaUpdateWrapper<WaveItem>() |
| | | .eq(WaveItem::getId, id) |
| | | .set(WaveItem::getExceStatus, WaveItemExceStatus.WAVE_ITEM_EXCE_PAUSE.val)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waveItem:update')") |
| | | @ApiOperation("继续下发任务") |
| | | @PostMapping("/waveItem/continue/pub") |
| | | public R continuePublicTask(@PathVariable Long id) { |
| | | waveItemService.update(new LambdaUpdateWrapper<WaveItem>() |
| | | .eq(WaveItem::getId, id) |
| | | .set(WaveItem::getExceStatus, WaveItemExceStatus.WAVE_ITEM_EXCE_STATUS_UN.val)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |