派生自 projectDept/qhighschool

EricsHu
2023-11-24 0e62c15e4b010ffa2d5cff9474f3fd389e369338
src/main/java/com/qxueyou/scc/exam/service/impl/ExamService.java
@@ -62,9 +62,13 @@
   @Override
   public List<ExamInfo> list(String keyword,String classId,String subjectId,Short status, Integer pageSize,Integer pageNum) {
      StringBuffer hql = new StringBuffer(500);
      hql.append("from ExamInfo e where e.examName like ? and e.createId=? ");
      List<Object> params = CollectionUtils.newList('%' + keyword.trim() + '%',ClientUtils.getUserId());
      String teacherId = ClientUtils.isAdmin() ? null : ClientUtils.getUserId();
      hql.append("from ExamInfo e where e.examName like ?  ");
      List<Object> params = CollectionUtils.newList('%' + keyword.trim() + '%');
      if (StringUtils.isNotBlank(teacherId)) {
         hql.append(" and e.createId=?");
         params.add(teacherId);
      }
      if(status!=null){
         hql.append(" and e.examStatus = ? ");
         params.add(status);
@@ -87,9 +91,13 @@
   @Override
   public int listCount(String keyword,String classId,String subjectId,Short status) {
      StringBuffer hql = new StringBuffer(500);
      hql.append("from ExamInfo e where e.examName like ? and e.createId=? ");
      List<Object> params = CollectionUtils.newList('%' + keyword.trim() + '%',ClientUtils.getUserId());
      String teacherId = ClientUtils.isAdmin() ? null : ClientUtils.getUserId();
      hql.append("from ExamInfo e where e.examName like ?  ");
      List<Object> params = CollectionUtils.newList('%' + keyword.trim() + '%');
      if (StringUtils.isNotBlank(teacherId)) {
         hql.append(" and e.createId=?");
         params.add(teacherId);
      }
      if(status!=null){
         hql.append(" and e.examStatus = ? ");
         params.add(status);