Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc
This commit is contained in:
@@ -24,6 +24,8 @@ public class CourseSociologyEntity {
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private String icon;
|
||||
|
||||
private String content;
|
||||
|
||||
private String media;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
//添加一年期的商品课程对应关系
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user