| | |
| | | |
| | | @Override |
| | | public BillingDetailsVo queryUserBillingDetails(String yearMonth, Integer recordId) { |
| | | System.out.println("账单传参:yearMonth"+yearMonth+"|"+"recordId"+recordId); |
| | | // TODO: 2023/7/4 账单列表 |
| | | return null; |
| | | BillingDetailsVo vo = new BillingDetailsVo(); |
| | | if (null != yearMonth){ |
| | | Date monthStart = DateTimeHelper.getCurrentIdetMouthStart(yearMonth); |
| | | Date monthEnd = DateTimeHelper.getCurrentIdeaMouthEnd(yearMonth); |
| | | |
| | | |
| | | }else { |
| | | Date currentMouthStart = DateTimeHelper.getCurrentMouthStart(); |
| | | Date currentMouthEnd = DateTimeHelper.getCurrentMouthEnd(); |
| | | |
| | | |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .eq("payType",3 ) |
| | | .eq("auditStatus",2)); |
| | | List<Integer> comIds = list.stream().map(Competition::getId).collect(Collectors.toList()); |
| | | List<UserCompetition> userCompetitions = ucttService.queryUsersCompetetions(sourseList.getStartTime(),sourseList.getEndTime(),sourseList.getAppUserId(),comIds); |
| | | List<UserCompetition> userCompetitions = ucttService.list(new QueryWrapper<UserCompetition>() |
| | | .between("insertTime", sourseList.getStartTime(),sourseList.getEndTime() ) |
| | | .eq("userId", sourseList.getAppUserId()) |
| | | .in("competitionId",comIds )); |
| | | if (userCompetitions.size() > 0){ |
| | | userCompetitions.forEach(coms ->{ |
| | | PurchaseRecordVo recordVo = new PurchaseRecordVo(); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface UserCompetitionMapper extends BaseMapper<UserCompetition> { |
| | | |
| | | |
| | | List<UserCompetition> queryUsersCompetetions(@Param("startTime") Date startTime, |
| | | @Param("endTime") Date endTime , |
| | | @Param("appUserId") Integer appUserId, |
| | | @Param("comIds") List<Integer> comIds); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 赛事报名记录 服务类 |
| | |
| | | */ |
| | | public interface UserCompetitionService extends IService<UserCompetition> { |
| | | |
| | | |
| | | List<UserCompetition> queryUsersCompetetions(Date startTime, Date endTime ,Integer appUserId, List<Integer> comIds); |
| | | |
| | | } |
| | |
| | | @Service |
| | | public class UserCompetitionServiceImpl extends ServiceImpl<UserCompetitionMapper, UserCompetition> implements UserCompetitionService { |
| | | |
| | | |
| | | @Override |
| | | public List<UserCompetition> queryUsersCompetetions(Date startTime, Date endTime , Integer appUserId, List<Integer> comIds) { |
| | | return this.baseMapper.queryUsersCompetetions(startTime,endTime,appUserId,comIds); |
| | | } |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.competition.mapper.UserCompetitionMapper"> |
| | | |
| | | <select id="queryUsersCompetetions" resultType="com.dsh.competition.entity.UserCompetition"> |
| | | SELECT * |
| | | FROM t_user_competition |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_competition1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_competition2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_competition3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_competition4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_competition5 |
| | | WHERE 1 = 1 |
| | | <if test=" stuId != null"> |
| | | and studentId = #{stuId} |
| | | </if> |
| | | <if test="appUserId != null"> |
| | | and competitionId in |
| | | <foreach collection="comIds" item="item" separator="," open="(" index="index" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="startTime != null and endTime != null"> |
| | | and (insertTime between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @PostMapping("/base/cancelSource/cancelList") |
| | | public List<PurchaseRecordVo> getCancelCourseList(@RequestBody GetStuSessionList sessionList){ |
| | | List<PurchaseRecordVo> purchaseRecordVos = new ArrayList<>(); |
| | | |
| | | List<TCoursePackagePayment> tCoursePackagePayments = tcppService.queryAllCoursePackage(sessionList.getStartTime(),sessionList.getEndTime(),null,sessionList.getStuId(), sessionList.getAppUserId()); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = tcppService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .between("insertTime", sessionList.getStartTime(),sessionList.getEndTime()) |
| | | .eq("appUserId",sessionList.getAppUserId()) |
| | | .eq("studentId",sessionList.getStuId())); |
| | | List<Long> coursePackageIds = tCoursePackagePayments.stream().map(TCoursePackagePayment::getId).collect(Collectors.toList()); |
| | | |
| | | List<CancelledClasses> list = caceService.list(new QueryWrapper<CancelledClasses>() |
| | |
| | | @PostMapping("/base/coursePack/queryPayment") |
| | | public List<StuCourseResp> getStuCoursePackagePayment(@RequestParam("stuId") Integer stuId,@RequestParam("appUserId") Integer appUserId){ |
| | | List<StuCourseResp> resps = new ArrayList<>(); |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.queryAllCoursePackage(null,null,null,stuId,appUserId); |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId",appUserId) |
| | | .eq("studentId",stuId)); |
| | | |
| | | if (byUserId.size() > 0 ){ |
| | | for (TCoursePackagePayment tCoursePackagePayment : byUserId) { |
| | | TCoursePackage tCoursePackage = tcpService.getById(tCoursePackagePayment.getCoursePackageId()); |
| | |
| | | @PostMapping("/base/coursePack/sessionNames") |
| | | public List<StuSessionDetailsVo> getStuSessionList(@RequestBody CourseDetailRequest request){ |
| | | List<StuSessionDetailsVo> detailsVos = new ArrayList<>(); |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.queryAllCoursePackage(request.getStartTime(),request.getEndTime(),null,request.getStuId(),request.getAppUserId()); |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .between("insertTime", request.getStartTime(),request.getEndTime()) |
| | | .eq("appUserId",request.getAppUserId()) |
| | | .eq("studentId",request.getStuId())); |
| | | if (byUserId.size() > 0){ |
| | | List<Integer> collect = byUserId.stream().map(TCoursePackagePayment::getCoursePackageId).collect(Collectors.toList()); |
| | | List<TCoursePackage> list = tcpService.list(new QueryWrapper<TCoursePackage>() |
| | |
| | | @PostMapping("/base/coursePack/paymentCourse") |
| | | public List<PurchaseRecordVo> queryCourseDetails(@RequestParam("startTime") Date startTime, @RequestParam("endTime") Date endTime,@RequestParam("stuId") Integer stuId, @RequestParam("appUserId") Integer appUserId) { |
| | | List<PurchaseRecordVo> purchaseRecordVos = new ArrayList<>(); |
| | | List<TCoursePackagePayment> coursePackage = packagePaymentService.queryAllCoursePackage(startTime,endTime,null,stuId, appUserId); |
| | | |
| | | List<TCoursePackagePayment> coursePackage = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .between("insertTime", startTime,endTime) |
| | | .eq("appUserId",appUserId) |
| | | .eq("studentId",stuId)); |
| | | if (coursePackage.size() > 0 ){ |
| | | coursePackage.forEach( cspackage -> { |
| | | PurchaseRecordVo recordVo = new PurchaseRecordVo(); |
| | |
| | | Integer totalNu = 0; |
| | | Integer dedutNu = 0; |
| | | Integer remainNu = 0; |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.queryAllCoursePackage(null,null,null,getStuOfCoursesDetails.getStuId(),getStuOfCoursesDetails.getAppUserId()); |
| | | List<TCoursePackagePayment> byUserId = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId",getStuOfCoursesDetails.getAppUserId()) |
| | | .eq("studentId",getStuOfCoursesDetails.getStuId())); |
| | | if (byUserId.size() > 0 ){ |
| | | for (TCoursePackagePayment tCoursePackagePayment : byUserId) { |
| | | totalNu = totalNu + tCoursePackagePayment.getTotalClassHours(); |
| | |
| | | @PostMapping("/base/coursePack/continuingCourse") |
| | | public StudentOfCourseVo getStudentCourse(@RequestBody GetStudentCourse getStudentCourse){ |
| | | StudentOfCourseVo courseVo = new StudentOfCourseVo(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.queryAllCoursePackage(null,null,getStudentCourse.getCourseId(),getStudentCourse.getStuId(),getStudentCourse.getAppUserId()); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId", getStudentCourse.getAppUserId()) |
| | | .eq("coursePackageId", getStudentCourse.getCourseId()) |
| | | .eq("studentId", getStudentCourse.getStuId())); |
| | | if (tCoursePackagePayments.size() > 0 ){ |
| | | |
| | | List<CourseHoursType> typeList = new ArrayList<>(); |
| | |
| | | @PostMapping("/base/coursePack/afterCourseTwos") |
| | | public List<AfterVideoVo> getAfterCourseTwos(@RequestParam("appUserId") Integer appUserId){ |
| | | List<AfterVideoVo> videoVos = new ArrayList<>(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.queryAllCoursePackage(null,null,null,null,appUserId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId", appUserId)); |
| | | List<Integer> coursePackageIds = tCoursePackagePayments.stream().map(TCoursePackagePayment::getCoursePackageId).collect(Collectors.toList()); |
| | | // List<PostCourseVideo> videoList = pcvService.queryAllVideoNoneShow(coursePackageIds); |
| | | // TODO: 2023/7/6 两个课后视频 |
| | |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.queryAllCoursePackage(null,null,null,null,appUserId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId",appUserId)); |
| | | List<BaseVo> list = new ArrayList<>(); |
| | | tCoursePackagePayments.forEach(c -> { |
| | | BaseVo baseVo = new BaseVo(); |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | List<Integer> courseIds = new ArrayList<>(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.queryAllCoursePackage(null,null,search.getCourseTypeId(),null,appUserId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("coursePackageId",search.getCourseTypeId()) |
| | | .eq("appUserId",appUserId)); |
| | | if (tCoursePackagePayments.size() > 0 ){ |
| | | courseIds = tCoursePackagePayments.stream().map(TCoursePackagePayment::getCoursePackageId).collect(Collectors.toList()); |
| | | } |
| | |
| | | Integer sult = 0; |
| | | TCoursePackage coursePackage = tcpService.getById(course.getCourseId()); |
| | | if (null != coursePackage && coursePackage.getStatus() == 3){ |
| | | List<CoursePackageStudent> coursePackageStudents = cosService.queryStuDeduClassHourNums(course.getCourseId(), course.getStuId(), course.getAppUserId()); |
| | | List<CoursePackageStudent> coursePackageStudents = cosService.list(new QueryWrapper<CoursePackageStudent>() |
| | | .eq("coursePackageId",course.getCourseId() ) |
| | | .eq("studentId",course.getStuId() ) |
| | | .eq("appUserId", course.getAppUserId()) |
| | | .eq("signInOrNot",1)); |
| | | |
| | | if (coursePackageStudents.size() > 0){ |
| | | List<CancelledClasses> list = caccService.list(new QueryWrapper<CancelledClasses>() |
| | | .eq("coursePackageId",course.getCourseId() )); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface CoursePackageStudentMapper extends BaseMapper<CoursePackageStudent> { |
| | | |
| | | List<CoursePackageStudent> queryStuDeduClassHourNums(@Param("courseId") Integer courseId, |
| | | @Param("stuId") Integer stuId, |
| | | @Param("appUserId") Integer appUserId); |
| | | |
| | | List<CoursePackageStudent> queryAppUserOfStuAttendClass(@Param("appUserId")Integer appUserId, |
| | | @Param("coursePackageIds")List<Integer> coursePackageIds); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.PostCourseVideo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PostCourseVideoMapper extends BaseMapper<PostCourseVideo> { |
| | | |
| | | List<PostCourseVideo> queryPostCourseVideolist(@Param("courseIds") List<Integer> courseIds); |
| | | |
| | | } |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TCoursePackagePaymentMapper extends BaseMapper<TCoursePackagePayment> { |
| | | |
| | | List<TCoursePackagePayment> queryAllCoursePackage(@Param("startTime")Date startTime, |
| | | @Param("endTime")Date endTime , |
| | | @Param("coursePackId") Integer coursePackId, |
| | | @Param("stuId") Integer stuId, |
| | | @Param("appUserId") Integer appUserId); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.UserVideoDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface UserVideoDetailsMapper extends BaseMapper<UserVideoDetails> { |
| | | |
| | | List<UserVideoDetails> queryAppUserWatchVideo(@Param("videoIds") List<Integer> videoIds); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员上课记录 服务类 |
| | |
| | | */ |
| | | public interface CoursePackageStudentService extends IService<CoursePackageStudent> { |
| | | |
| | | List<CoursePackageStudent> queryStuDeduClassHourNums(Integer courseId, Integer stuId, Integer appUserId); |
| | | |
| | | List<CoursePackageStudent> queryAppUserOfStuAttendClass(Integer appUserId, List<Integer> coursePackageIds); |
| | | |
| | | } |
| | |
| | | import com.dsh.course.model.vo.response.CourseOfVideoResponse; |
| | | import com.dsh.course.util.ResultUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface TCoursePackagePaymentService extends IService<TCoursePackagePayment> { |
| | | |
| | | List<TCoursePackagePayment> queryAllCoursePackage(Date startTime, Date endTime , Integer lessionId, Integer stuId, Integer appUserId); |
| | | |
| | | |
| | | /** |
| | |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员上课记录 服务实现类 |
| | |
| | | @Service |
| | | public class CoursePackageStudentServiceImpl extends ServiceImpl<CoursePackageStudentMapper, CoursePackageStudent> implements CoursePackageStudentService { |
| | | |
| | | @Override |
| | | public List<CoursePackageStudent> queryStuDeduClassHourNums(Integer courseId, Integer stuId, Integer appUserId) { |
| | | return this.baseMapper.queryStuDeduClassHourNums(courseId,stuId,appUserId); |
| | | } |
| | | |
| | | @Override |
| | | public List<CoursePackageStudent> queryAppUserOfStuAttendClass(Integer appUserId, List<Integer> coursePackageIds) { |
| | | return this.baseMapper.queryAppUserOfStuAttendClass(appUserId,coursePackageIds); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<TCoursePackagePayment> queryAllCoursePackage(Date startTime, Date endTime , Integer coursePackId, Integer stuId, Integer appUserId) { |
| | | return this.baseMapper.queryAllCoursePackage(startTime,endTime,coursePackId,stuId,appUserId); |
| | | } |
| | | |
| | | /** |
| | | * 获取课包购买人数 |
| | | * @param coursePackageId |
| | |
| | | @Override |
| | | public List<AppUserVideoResponse> queryAfterVideo(CourseOfAfterRequest search,List<Integer> courseIds) { |
| | | List<AppUserVideoResponse> responses = new ArrayList<>(); |
| | | List<PostCourseVideo> videoList = pcvMapper.queryPostCourseVideolist(courseIds); |
| | | List<PostCourseVideo> videoList = pcvMapper.selectList(new QueryWrapper<PostCourseVideo>() |
| | | .eq("coursePackageId", courseIds)); |
| | | |
| | | if (videoList.size() > 0){ |
| | | List<Integer> videoIds = videoList.stream().map(PostCourseVideo::getCourseId).collect(Collectors.toList()); |
| | | List<UserVideoDetails> userVideoDetails = uvdmapper.queryAppUserWatchVideo(videoIds); |
| | | List<UserVideoDetails> userVideoDetails = uvdmapper.selectList(new QueryWrapper<UserVideoDetails>() |
| | | .in("courseId", videoIds)); |
| | | if (userVideoDetails.size() > 0){ |
| | | for (UserVideoDetails userVideoDetail : userVideoDetails) { |
| | | AppUserVideoResponse response = new AppUserVideoResponse(); |
| | |
| | | @Override |
| | | public List<RegisterCourseVo> queryRegisteredCourseList(CourseOfAfterRequest courseTypeId, Integer appUserId) { |
| | | List<RegisterCourseVo> courseVos = new ArrayList<>(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = this.queryAllCoursePackage(null,null,null,null,appUserId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = this.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("appUserId",appUserId )); |
| | | if (tCoursePackagePayments.size() > 0){ |
| | | for (TCoursePackagePayment tCoursePackagePayment : tCoursePackagePayments) { |
| | | TCoursePackage coursePackage = tcpmapper.selectById(tCoursePackagePayment.getCoursePackageId()); |
| | |
| | | registerCourseVo.setCourseTime(coursePackage.getClassStartTime()+"-"+coursePackage.getClassEndTime()); |
| | | Coach coach = coachClient.queryCoachById(coursePackage.getCoachId()); |
| | | registerCourseVo.setCourseTeacher(coach.getName()); |
| | | List<CoursePackageStudent> coursePackageStudents = |
| | | cpsMapper.queryStuDeduClassHourNums(coursePackage.getId(),null,appUserId); |
| | | List<CoursePackageStudent> coursePackageStudents = cpsMapper.selectList(new QueryWrapper<CoursePackageStudent>() |
| | | .eq("coursePackageId",coursePackage.getId()) |
| | | .eq("studentId",appUserId )); |
| | | registerCourseVo.setCourseNums(coursePackageStudents.size() * 2); |
| | | registerCourseVo.setPayStatus(tCoursePackagePayment.getPayStatus()); |
| | | courseVos.add(registerCourseVo); |
| | |
| | | @Override |
| | | public CourseDetailsResponse queryRegisteredCourseDetails(Integer coursePackageId, Integer appUserId) { |
| | | CourseDetailsResponse response = new CourseDetailsResponse(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = this.queryAllCoursePackage(null,null,coursePackageId,null,appUserId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = this.list(new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("coursePackageId",coursePackageId ) |
| | | .eq("appUserId",appUserId)); |
| | | |
| | | if (tCoursePackagePayments.size() > 0){ |
| | | TCoursePackagePayment tCoursePackagePayment = tCoursePackagePayments.get(0); |
| | | TCoursePackage coursePackage = tcpmapper.selectById(tCoursePackagePayment.getCoursePackageId()); |
| | |
| | | <mapper namespace="com.dsh.course.mapper.CoursePackageStudentMapper"> |
| | | |
| | | |
| | | <select id="queryStuDeduClassHourNums" resultType="com.dsh.course.entity.CoursePackageStudent"> |
| | | SELECT * |
| | | FROM t_course_package_student |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student5 |
| | | WHERE signInOrNot = 1 |
| | | <if test="courseId != null"> |
| | | and coursePackageId = #{courseId} |
| | | </if> |
| | | <if test="stuId != null "> |
| | | and studentId = #{stuId} |
| | | </if> |
| | | <if test="appUserId != null"> |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | </select> |
| | | <select id="queryAppUserOfStuAttendClass" resultType="com.dsh.course.entity.CoursePackageStudent"> |
| | | SELECT * |
| | | FROM t_course_package_student |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_student5 |
| | | WHERE signInOrNot = 1 and reservationStatus = 1 |
| | | <if test=" appUserId != null"> |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | <if test="coursePackageIds.size >0"> |
| | | and coursePackageId in |
| | | <foreach collection="coursePackageIds" close=")" index="index" open="(" separator="," item="item"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.PostCourseVideoMapper"> |
| | | |
| | | <select id="queryPostCourseVideolist" resultType="com.dsh.course.entity.PostCourseVideo"> |
| | | SELECT * |
| | | FROM t_post_course_video |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_post_course_video1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_post_course_video2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_post_course_video3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_post_course_video4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_post_course_video5 |
| | | WHERE 1 = 1 |
| | | <if test="courseIds.size > 0 "> |
| | | and coursePackageId in |
| | | <foreach collection="courseIds" item="item" separator="," open="(" index="index" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="state" property="state" /> |
| | | <result column="insertTime" property="insertTime" /> |
| | | </resultMap> |
| | | <select id="queryAllCoursePackage" resultType="com.dsh.course.entity.TCoursePackagePayment"> |
| | | SELECT * |
| | | FROM t_course_package_payment |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_payment1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_payment2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_payment3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_payment4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_course_package_payment5 |
| | | WHERE 1=1 |
| | | <if test=" stuId != null"> |
| | | and studentId = #{stuId} |
| | | </if> |
| | | <if test="appUserId != null"> |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | <if test="startTime != null and endTime != null"> |
| | | and (insertTime between #{startTime} and #{endTime}) |
| | | </if> |
| | | <if test="coursePackId != null "> |
| | | and coursePackageId = #{coursePackId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="queryCountNumber" resultType="int"> |
| | |
| | | <mapper namespace="com.dsh.course.mapper.UserVideoDetailsMapper"> |
| | | |
| | | |
| | | <select id="queryAppUserWatchVideo" resultType="com.dsh.course.entity.UserVideoDetails"> |
| | | SELECT * |
| | | FROM t_user_video_details |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_video_details1 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_video_details2 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_video_details3 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_video_details4 |
| | | UNION ALL |
| | | SELECT * |
| | | FROM t_user_video_details5 |
| | | WHERE 1=1 |
| | | <if test="videoIds.size > 0 "> |
| | | and courseId in |
| | | <foreach collection="videoIds" item="item" separator="," open="(" index="index" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |