派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
src/main/java/com/qxueyou/scc/exam/action/ExamPaperController.java
@@ -33,11 +33,11 @@
 * @history 2018-03-11 create kevin
 * 
 */
@Api(tags="试卷管理接口")
@Api(tags="试卷管理接口")
@Controller
@RequestMapping(value = "/exam/paper")
public class ExamPaperController {
   //分页查询中,默认记录条数和页数
   //分页查询中,默认记录条数和页数
   private static final int DEFAULT_PAGE_SIZE=Integer.MAX_VALUE;
   private static final int DEFAULT_PAGE_NUM=1;
   
@@ -56,14 +56,14 @@
   
   
   /**
    * 试卷列表
    * 试卷列表
    * */
   @RequestMapping(value = "/list", method = RequestMethod.GET)
   public @ResponseBody Result pageList(String keyword,Short status, Integer pageSize,Integer pageNum){
      Result result = new Result(Boolean.TRUE);
      Pager pager = new Pager();
      List<Object> queryParamLst = null;
      // 查询记录数
      // 查询记录数
      String hqlCount="from ExamPaperInfo where createId=? and examPaperName like ?  and deleteFlag is false";
      if(status!=null){
         hqlCount = hqlCount.concat(" and paperStatus = ?");
@@ -73,7 +73,7 @@
      }
      int totalCount = commonDAO.findCount(hqlCount,queryParamLst);
        
        // page赋值
        // page赋值
        pager.setTotalCount(totalCount);
        pager.setPageSize(pageSize!=null&&pageSize>0?pageSize:DEFAULT_PAGE_SIZE);
        pager.setPageNum (pageNum!=null&&pageNum>0?pageNum:DEFAULT_PAGE_NUM);
@@ -99,7 +99,7 @@
   }
   
   /**
    * 详情页面数据
    * 详情页面数据
    * @param examPaperId
    * @return
    */
@@ -111,7 +111,7 @@
   }
   
   /**
    * 保存
    * 保存
    * 
    * @param examInfo
    * @return
@@ -129,7 +129,7 @@
   }
   
   /**
    * 删除
    * 删除
    * @param examPaperIds
    * @return
    */
@@ -178,7 +178,7 @@
   
   
   /**
    * 发布试卷
    * 发布试卷
    * 
    * @param exerciseIds
    * @return
@@ -186,13 +186,13 @@
   @RequestMapping(value = "/publish", method = RequestMethod.GET)
   public @ResponseBody Result publishExamPaper(String examPaperIds) {
      if (StringUtils.isEmpty(examPaperIds)) {
         return new Result(false, "参数错误");
         return new Result(false, "参数错误");
      }
      return this.examPaperService.doPublishExamPaper(examPaperIds.split(","));
   }
   /**
    * 撤回试卷
    * 撤回试卷
    * 
    * @param exerciseIds
    * @return
@@ -200,7 +200,7 @@
   @RequestMapping(value = "/revoke", method = RequestMethod.GET)
   public @ResponseBody Result revokeExamPaper(String examPaperIds) {
      if (StringUtils.isEmpty(examPaperIds)) {
         return new Result(false, "参数错误");
         return new Result(false, "参数错误");
      }
      return this.examPaperService.doRevokeExamPaper(examPaperIds.split(","));
   }