| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.feignclient.model.CourseOfStoreVo; |
| | | import com.dsh.course.feignclient.model.PurchaseRecordVo; |
| | | import com.dsh.course.feignclient.model.StuCourseResp; |
| | | import com.dsh.course.feignclient.model.StuSessionDetailsVo; |
| | | import com.dsh.course.feignclient.model.*; |
| | | import com.dsh.course.service.TCoursePackagePaymentService; |
| | | import com.dsh.course.service.TCoursePackageService; |
| | | import com.dsh.course.util.DateUtil; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/coursePack/stuOfCourses") |
| | | public StuWithCoursesListVo getStuOfCoursesDetails(@RequestBody Integer stuId, @RequestBody Integer appUserId){ |
| | | StuWithCoursesListVo lisco = new StuWithCoursesListVo(); |
| | | Integer totalNu = 0; |
| | | Integer dedutNu = 0; |
| | | Integer remainNu = 0; |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.queryAllCoursePackage(null,null,stuId,appUserId); |
| | | if (byUserId.size() > 0 ){ |
| | | for (TCoursePackagePayment tCoursePackagePayment : byUserId) { |
| | | StuWithCoursesListVo resp = new StuWithCoursesListVo(); |
| | | totalNu = totalNu + tCoursePackagePayment.getTotalClassHours(); |
| | | dedutNu = dedutNu + tCoursePackagePayment.getLaveClassHours(); |
| | | remainNu = remainNu + (tCoursePackagePayment.getTotalClassHours()-tCoursePackagePayment.getLaveClassHours()); |
| | | } |
| | | lisco.setTotalNums(totalNu); |
| | | lisco.setDeductedNums(remainNu); |
| | | lisco.setRemainingNums(dedutNu); |
| | | } |
| | | return lisco; |
| | | } |
| | | |
| | | } |