| package com.qxueyou.scc.admin.studentFiles.Impl; | 
|   | 
| import com.qxueyou.scc.admin.studentFiles.StudentFilesService; | 
| import com.qxueyou.scc.base.model.Pager; | 
| import com.qxueyou.scc.base.service.impl.CommonAppService; | 
| import com.qxueyou.scc.base.util.CollectionUtils; | 
| import com.qxueyou.scc.teach.student.model.StuStudent; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import java.util.List; | 
|   | 
| @Service | 
| public class StudentFilesServiceImpl extends CommonAppService implements StudentFilesService { | 
|     @Override | 
|     public List<StuStudent> findStudentFiles(Integer limit, Integer pageNum, String keyword, String classId) { | 
|         StringBuffer hql=new StringBuffer("from StuStudent where name like ? and classId = ? and deleteFlag is false"); | 
|   | 
|         List<Object> args = CollectionUtils.newList(keyword + "%",classId); | 
|   | 
|         hql.append(" order by createTime desc"); | 
|   | 
|         List<StuStudent> list = findList(hql.toString(), new Pager(limit, pageNum), args, StuStudent.class); | 
|   | 
|         return list; | 
|     } | 
|     @Override | 
|     public int findfindStudentFilesListCount(String keyword, String classId) { | 
|         StringBuffer hql=new StringBuffer("from StuStudent where name like ? and subjectId = ? and deleteFlag is false"); | 
|   | 
|         List<Object> args = CollectionUtils.newList(keyword + "%",classId); | 
|   | 
|         return findCount(hql.toString(),args); | 
|     } | 
| } |