|
@@ -1,15 +1,22 @@
|
|
|
package com.ym.mec.student.controller;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import com.timevale.tgtext.text.pdf.PdfStructTreeController.returnType;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
|
|
|
+import com.ym.mec.biz.dal.dto.StudentCourseInfoDto;
|
|
|
import com.ym.mec.biz.dal.dto.UserMusicGroupQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.GroupNoticeQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
|
|
|
import com.ym.mec.biz.service.ClassGroupService;
|
|
|
import com.ym.mec.biz.service.ImGroupNoticeService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -27,6 +34,9 @@ public class CourseController extends BaseController {
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
@Autowired
|
|
|
private ImGroupNoticeService imGroupNoticeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CourseScheduleDao courseScheduleDao;
|
|
|
|
|
|
@ApiOperation("获取学生所购买课程列表")
|
|
|
@GetMapping(value = "/queryUserMusicGroups")
|
|
@@ -38,6 +48,20 @@ public class CourseController extends BaseController {
|
|
|
return succeed(classGroupService.queryCoursePage(queryInfo,sysUser.getId()));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("获取学生所购买课程列表")
|
|
|
+ @GetMapping(value = "/queryRemainCourseNum")
|
|
|
+ public Object queryRemainCourseNum(){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if(sysUser == null){
|
|
|
+ return failed("获取用户信息失败");
|
|
|
+ }
|
|
|
+ List<StudentCourseInfoDto> list = courseScheduleDao.findUserSurplusCourseInfoByGroup(null, null, sysUser.getId());
|
|
|
+ if(list == null){
|
|
|
+ return succeed(0);
|
|
|
+ }
|
|
|
+ return succeed(list.size());
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("获取学员所有聊天群组")
|
|
|
@GetMapping(value = "/queryUserGroups")
|
|
|
public Object queryUserGroups(String search){
|