This commit is contained in:
wuchunlei
2024-06-12 13:48:10 +08:00
4 changed files with 7 additions and 2 deletions

View File

@@ -24,6 +24,8 @@ public class CourseSociologyEntity {
private Integer sort;
private String icon;
private String content;
private String media;

View File

@@ -186,7 +186,7 @@ public class CourseCatalogueChapterVideoServiceImpl extends ServiceImpl<CourseCa
LambdaQueryWrapper<UserCourseBuyEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(UserCourseBuyEntity::getUserId,u.getId());
wrapper.eq(UserCourseBuyEntity::getCatalogueId,courseCatalogueEntity.getId());
wrapper.and(r->r.eq(UserCourseBuyEntity::getEndTime,null).or().gt(UserCourseBuyEntity::getEndTime,new Date()));
wrapper.and(r->r.isNull(UserCourseBuyEntity::getEndTime).or().gt(UserCourseBuyEntity::getEndTime,new Date()));
Integer integer = userCourseBuyDao.selectCount(wrapper);
return integer>0;
}

View File

@@ -127,6 +127,7 @@ public class CourseCatalogueServiceImpl extends ServiceImpl<CourseCatalogueDao,
shopProduct.setProductName(courseEntity.getTitle()+"."+courseCatalogue.getTitle()+"(半年)");
shopProduct.setPrice(courseCatalogue.getHalfFee());
shopProduct.setGoodsType("05");
shopProduct.setProductStock(500);
shopProduct.setProductImages(courseEntity.getImage());
shopProductDao.insert(shopProduct);
//添加半年期的商品课程对应关系
@@ -142,6 +143,7 @@ public class CourseCatalogueServiceImpl extends ServiceImpl<CourseCatalogueDao,
shopProduct1.setProductName(courseEntity.getTitle()+"."+courseCatalogue.getTitle()+"(一年)");
shopProduct1.setPrice(courseCatalogue.getFee());
shopProduct1.setGoodsType("05");
shopProduct1.setProductStock(500);
shopProduct1.setProductImages(courseEntity.getImage());
shopProductDao.insert(shopProduct1);
//添加一年期的商品课程对应关系

View File

@@ -64,7 +64,8 @@ public class CourseSociologyServiceImpl extends ServiceImpl<CourseSociologyDao,
}
private List<CourseSociologyEntity> sociologys(int id){
List<CourseSociologyEntity> list = this.list(new LambdaQueryWrapper<CourseSociologyEntity>().eq(CourseSociologyEntity::getPid, id));
List<CourseSociologyEntity> list = this.list(new LambdaQueryWrapper<CourseSociologyEntity>()
.eq(CourseSociologyEntity::getPid, id).orderByAsc(CourseSociologyEntity::getSort));
for (CourseSociologyEntity c : list){
if(c.getIsLast()!=1){
List<CourseSociologyEntity> so = this.sociologys(c.getId());