|
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
+import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
|
|
|
import vip.xiaonuo.common.exception.CommonException;
|
|
import vip.xiaonuo.common.exception.CommonException;
|
|
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
|
|
import vip.xiaonuo.dev.api.DevJobApi;
|
|
import vip.xiaonuo.dev.api.DevJobApi;
|
|
@@ -84,10 +85,24 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Page<TExamVo> page(TExamPageParam tExamPageParam) {
|
|
public Page<TExamVo> page(TExamPageParam tExamPageParam) {
|
|
|
|
|
+ if(!StpLoginUserUtil.getLoginUser().getAccount().equals("superAdmin")){
|
|
|
|
|
+ tExamPageParam.setCreateUser(StpLoginUserUtil.getLoginUser().getId());
|
|
|
|
|
+ }
|
|
|
Page<TExamVo> page = tExamMapper.queryList(CommonPageRequest.defaultPage(), tExamPageParam);
|
|
Page<TExamVo> page = tExamMapper.queryList(CommonPageRequest.defaultPage(), tExamPageParam);
|
|
|
return page;
|
|
return page;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Page<TExamVo> studentPage(TExamPageParam tExamPageParam) {
|
|
|
|
|
+ if(!StpLoginUserUtil.getLoginUser().getAccount().equals("superAdmin")){
|
|
|
|
|
+ tExamPageParam.setCreateUser(StpLoginUserUtil.getLoginUser().getAccount());
|
|
|
|
|
+ }
|
|
|
|
|
+ Page<TExamVo> page = tExamMapper.queryStudentList(CommonPageRequest.defaultPage(), tExamPageParam);
|
|
|
|
|
+ return page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
@Override
|
|
|
public void add(TExamAddParam tExamAddParam) {
|
|
public void add(TExamAddParam tExamAddParam) {
|
|
@@ -279,6 +294,7 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
public TExam addJob(TExam tExam, String startOnEnd){
|
|
public TExam addJob(TExam tExam, String startOnEnd){
|
|
|
JSONObject jobParam = new JSONObject();
|
|
JSONObject jobParam = new JSONObject();
|
|
|
jobParam.put("name", tExam.getId()+"-"+tExam.getExamName()+"-"+tExam.getPaperId());
|
|
jobParam.put("name", tExam.getId()+"-"+tExam.getExamName()+"-"+tExam.getPaperId());
|