| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.account.entity.TStudent; |
| | | import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.AppointmentRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.ClasspaymentRequest; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.*; |
| | | import com.dsh.account.model.vo.commentDetail.StuCommentsVo; |
| | | import com.dsh.account.model.vo.exploreDetail.LonLatRequest; |
| | | import com.dsh.account.model.vo.medalDetail.GongVo; |
| | | import com.dsh.account.model.vo.medalDetail.StuMedalVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo; |
| | |
| | | @PostMapping("/api/startCource/queryStudentData") |
| | | @ApiOperation(value = "上课首页", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "经度值", name = "longitude", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "纬度值", name = "latitude", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<ClassInfoVo> queryCouponRecord(@RequestBody String longitude, @RequestBody String latitude){ |
| | | public ResultUtil<ClassInfoVo> queryCouponRecord(LonLatRequest lonLatRequest){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(tappuService.queryUserOfStus(userIdFormRedis,longitude,latitude)); |
| | | return ResultUtil.success(tappuService.queryUserOfStus(userIdFormRedis,lonLatRequest.getLongitude(),lonLatRequest.getLatitude())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @PostMapping("/api/startCource/queryPhysical") |
| | | @ApiOperation(value = "获取学员测试报告", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "学员id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "学员id", name = "stuID", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<StuPhysicalVo> getStuPhysicalInfo(@RequestBody Integer stuID){ |
| | | public ResultUtil<StuPhysicalVo> getStuPhysicalInfo(Integer stuID){ |
| | | StuPhysicalVo vo = new StuPhysicalVo(); |
| | | TStudent tStudent = istuService.getById(stuID); |
| | | if (ToolUtil.isNotEmpty(tStudent)){ |
| | |
| | | @PostMapping("/api/startCource/addData") |
| | | @ApiOperation(value = "添加学员信息", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "学员信息", name = "stu", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | @Transactional |
| | | public ResultUtil addStu(@RequestBody StuDetailsReq stu){ |
| | | public ResultUtil addStu(StuDetailsReq stu){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | istuService.addStuOfAppUser(stu,userIdFormRedis); |
| | | return ResultUtil.success(); |
| | | return istuService.addStuOfAppUser(stu,userIdFormRedis); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(ResultUtil.ERROR); |
| | | } |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<StuListVo>> dealSwitchStudents(@RequestBody Integer stuId){ |
| | | public ResultUtil<List<StuListVo>> dealSwitchStudents(Integer stuId){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | |
| | | @ApiImplicitParam(value = "课包id", name = "lessonId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<ClassDetailsInsVo> coursePackageDetails(@RequestBody Integer lessonId, @RequestBody Integer stuId){ |
| | | public ResultUtil<ClassDetailsInsVo> coursePackageDetails(Integer lessonId, Integer stuId){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<List<PurchaseRecordVo>> recordList(@RequestBody RecordTimeRequest timeRequest){ |
| | | public ResultUtil<List<PurchaseRecordVo>> recordList(RecordTimeRequest timeRequest){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | |
| | | @PostMapping("/api/startCource/renewal") |
| | | @ApiOperation(value = "课时详情-续课课包详情", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "课包id", name = "lessonId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<CourseDetailsOfContinuationResp> renewalOfCourses(@RequestBody Integer lessonId, @RequestBody Integer stuId){ |
| | | public ResultUtil<CourseDetailsOfContinuationResp> renewalOfCourses(Integer lessonId, Integer stuId){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil continuationOperation(@RequestBody ClasspaymentRequest request){ |
| | | public ResultUtil continuationOperation(ClasspaymentRequest request){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<StuCommentsVo>> queryStuComment(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil<List<StuCommentsVo>> queryStuComment( Integer stuId){ |
| | | try { |
| | | return ResultUtil.success(evalstuService.queryStuCommentsList(stuId)); |
| | | }catch (Exception e){ |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<StuMedalVo>> queryStuMedal(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil<List<StuMedalVo>> queryStuMedal( Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<GongVo>> queryStuGoog(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil<List<GongVo>> queryStuGoog(Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 课后视频课表 |
| | | * 上课预约记录 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/afterSourceDetails") |
| | | @ApiOperation(value = "课后视频课表", tags = {"APP-开始上课"}) |
| | | @PostMapping("/api/startCource/stuAppointList") |
| | | @ApiOperation(value = "上课预约记录", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil queryAfterSourceDetails(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil<AppointmentRecordVo> cgeClassAppointmentRecordList(Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | // TODO: 2023/7/4 |
| | | return ResultUtil.success(); |
| | | return ResultUtil.success(istuService.getAppointmentRecords(stuId,appUserId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 已报名课程列表 |
| | | * 取消预约 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/registeredCourses") |
| | | @ApiOperation(value = "已报名课程列表", tags = {"APP-开始上课"}) |
| | | @PostMapping("/api/startCource/cancelCourse") |
| | | @ApiOperation(value = "上课预约-取消预约", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "上课记录id", name = "courseStuRecordId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<RegisterCourseVo>> queryRegisteredCoursesDetails(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil cancelReservation(Integer courseStuRecordId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | return istuService.cancelReservationOfCourse(courseStuRecordId); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |