|
@@ -1,11 +1,5 @@
|
|
|
package com.qmth.exam.reserve.service.impl;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -23,6 +17,11 @@ import com.qmth.exam.reserve.dao.ApplyTaskDao;
|
|
|
import com.qmth.exam.reserve.entity.ApplyTaskEntity;
|
|
|
import com.qmth.exam.reserve.service.ApplyTaskService;
|
|
|
import com.qmth.exam.reserve.util.PageUtil;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class ApplyTaskServiceImpl extends ServiceImpl<ApplyTaskDao, ApplyTaskEntity> implements ApplyTaskService {
|
|
@@ -99,9 +98,19 @@ public class ApplyTaskServiceImpl extends ServiceImpl<ApplyTaskDao, ApplyTaskEnt
|
|
|
*/
|
|
|
@Override
|
|
|
public CurrentApplyTaskVO currentApplyTask(Long orgId) {
|
|
|
+ // 默认取一个最新的启用的预约任务
|
|
|
return baseMapper.currentApplyTask(orgId);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ApplyTaskEntity getLessInfoApplyTaskById(Long applyTaskId) {
|
|
|
+ // 只查询id、name、enable等少量字段
|
|
|
+ LambdaQueryWrapper<ApplyTaskEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.select(ApplyTaskEntity::getId, ApplyTaskEntity::getName, ApplyTaskEntity::getEnable);
|
|
|
+ wrapper.eq(ApplyTaskEntity::getId, applyTaskId);
|
|
|
+ return this.getOne(wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public ApplyTaskEntity findApplyTask() {
|
|
|
LambdaQueryWrapper<ApplyTaskEntity> wrapper = new LambdaQueryWrapper<>();
|