| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.qxueyou.scc.base.model.UserInfoWrapper; |
| | | import com.qxueyou.scc.user.model.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | |
| | | @ApiImplicitParam(name = "startTime", value = "开班时间", required = false, paramType="query", dataType = "String") |
| | | }) |
| | | @GetMapping(value = "getSubjectLst") |
| | | public Result getList(String classId, String startTime, Integer limit, @RequestParam(defaultValue="1")Integer pageNum, HttpServletRequest request) { |
| | | // System.out.println("用户id"+request.getSession().getAttribute("userId")); |
| | | Object userId = request.getSession().getAttribute("userId"); |
| | | public Result getList(String userId,String classId, String startTime, Integer limit, @RequestParam(defaultValue="1")Integer pageNum, HttpServletRequest request) { |
| | | userId = StringUtils.isEmpty(userId)?ClientUtils.getUserId():userId; |
| | | classId = StringUtils.isEmpty(classId)?ClientUtils.getClassId():classId; |
| | | List<MySubjectV> result = subjectService.listMySubjectV(classId,String.valueOf(userId)); |
| | | List<MySubjectV> result = subjectService.listMySubjectV(classId,userId); |
| | | return new Result(true, "success", |
| | | QBeanUtils.listBean2ListMap(result, |
| | | CollectionUtils.newStringMap("id.subjectId", "subjectId", "id.classId", "classId", |
| | | "subjectName", "subjectName,coursewareName", "percent", "percent", "progressValue", |
| | | "studyTime", "coverPageUrl", "coverPageUrl"))); |
| | | |
| | | } |
| | | |
| | | /** |