|
|
|
@ -21,6 +21,7 @@ import me.zhengjie.common.ResponseCode;
|
|
|
|
|
import me.zhengjie.modules.abmessage.rest.vo.AbMessageVO;
|
|
|
|
|
import me.zhengjie.modules.taskrecord.domain.TaskRecord;
|
|
|
|
|
import me.zhengjie.modules.taskrecord.service.TaskRecordService;
|
|
|
|
|
import me.zhengjie.modules.taskrecord.service.dto.TaskRecordDto;
|
|
|
|
|
import me.zhengjie.modules.taskrecord.service.dto.TaskRecordQueryCriteria;
|
|
|
|
|
import me.zhengjie.task.SendRecordTask;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -115,6 +116,37 @@ public class TaskRecordController {
|
|
|
|
|
return new ResponseEntity<>(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 校验发送条数是否合规
|
|
|
|
|
*
|
|
|
|
|
* @param sendTotal 本次发送总条数
|
|
|
|
|
* @param id 要进行校验的发送任务包的Id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Log("发送课包数目校验")
|
|
|
|
|
@ApiOperation("发送课包数目校验")
|
|
|
|
|
@PreAuthorize("@el.check('taskRecord:list')")
|
|
|
|
|
@PostMapping(value = "/checkSendTotal")
|
|
|
|
|
public ResponseEntity<Object> checkSendTotal(@RequestParam(value = "sendTotal", defaultValue = "0") Integer sendTotal,
|
|
|
|
|
@RequestParam(value = "id")Integer id){
|
|
|
|
|
if (sendTotal == null || id == null){
|
|
|
|
|
return new ResponseEntity<>(CommonResponse.createByError(ResponseCode.EMPTY_ARGUMENT), HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TaskRecordDto dto = taskRecordService.findById(id);
|
|
|
|
|
if (dto == null){
|
|
|
|
|
return new ResponseEntity<>(CommonResponse.createByError(ResponseCode.NO_RELEVANT_CONTENT_WAS_FOUND), HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
// (本次发送数目 + 最后一次发送数目) < 该任务课包总条数
|
|
|
|
|
// TODO: 2020/9/9 0009 编写相关逻辑代码
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResponseEntity<>(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log("任务课包任务合并")
|
|
|
|
|
@ApiOperation("任务课包任务合并")
|
|
|
|
|
@PreAuthorize("@el.check('taskRecord:list')")
|
|
|
|
|