|
@@ -1,59 +0,0 @@
|
|
|
-package com.yonge.cooleshow.teacher.controller;
|
|
|
-
|
|
|
-import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
-import com.yonge.cooleshow.biz.dal.dto.SubjectHomeSearch;
|
|
|
-import com.yonge.cooleshow.biz.dal.dto.req.TotalReq;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.HomeService;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
|
|
|
-import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.CourseHomeVo;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.HomeMusicSheetVo;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.SubjectHomeVo;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.res.HomeTotalStudent;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.res.HomeTotalTeacher;
|
|
|
-import com.yonge.cooleshow.biz.dal.vo.res.HomeUserToDoNum;
|
|
|
-import com.yonge.cooleshow.biz.dal.wrapper.teacher.TeacherHomeWrapper;
|
|
|
-import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
-import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
-import com.yonge.toolset.base.page.PageInfo;
|
|
|
-import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-import javax.validation.Valid;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-@RestController
|
|
|
-@RequestMapping("${app-config.url.teacher:}/home")
|
|
|
-@Api(value = "首页", tags = "首页")
|
|
|
-public class HomeController extends BaseController {
|
|
|
-
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private HomeService homeService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private SysUserService sysUserService;
|
|
|
-
|
|
|
- @ApiOperation(value = "课程统计")
|
|
|
- @PostMapping("/totalCourse")
|
|
|
- public HttpResponseResult<List<TeacherHomeWrapper.TeacherTotalCourse>> totalCourse(@RequestBody TeacherHomeWrapper.TeacherTotalCourseQuery query) {
|
|
|
- SysUser sysUser = sysUserService.getUser();
|
|
|
- if (sysUser == null || sysUser.getId() == null) {
|
|
|
-
|
|
|
- return failed("用户信息获取失败");
|
|
|
- }
|
|
|
- query.setTeacherId(sysUser.getId());
|
|
|
-
|
|
|
- return succeed(homeService.teacherTotalCourse(query));
|
|
|
- }
|
|
|
-}
|