| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.entity.CoursePackageOrder; |
| | | import com.dsh.course.entity.CoursePackageOrderStudent; |
| | | import com.dsh.course.model.DeductionClassHourList; |
| | | import com.dsh.course.service.ICoursePackageOrderService; |
| | | import com.dsh.course.service.ICoursePackageOrderStudentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Autowired |
| | | private ICoursePackageOrderStudentService coursePackageOrderStudentService; |
| | | |
| | | @Autowired |
| | | private ICoursePackageOrderService coursePackageOrderService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据学院id获取剩余有效课时数据 |
| | | * 根据学员id获取剩余有效课时数据 |
| | | * @param studentId |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据用户id获取剩余有效课时数据 |
| | | * @param appUserId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getCoursePackageOrderUser") |
| | | public List<CoursePackageOrderStudent> getCoursePackageOrderUser(@RequestBody Integer appUserId){ |
| | | return coursePackageOrderStudentService.list(new QueryWrapper<CoursePackageOrderStudent>() |
| | | .eq("appUserId", appUserId).eq("status", 1).eq("state", 1) |
| | | .gt("laveClassHours", 0).last(" and useTime > now() order by insertTime")); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 扣减学员课时 |
| | | * @param deductionClassHourList |