课程目录列表-配置购买人数
This commit is contained in:
@@ -55,4 +55,9 @@ public class CourseCatalogueEntity{
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ShopProduct> productList;
|
private List<ShopProduct> productList;
|
||||||
|
/**
|
||||||
|
* 购买人数
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private int buyPeoples;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ public class CourseCatalogueServiceImpl extends ServiceImpl<CourseCatalogueDao,
|
|||||||
shopProductCourseEntityMPJLambdaWrapper.eq(ShopProductCourseEntity::getCatalogueId,c.getId());
|
shopProductCourseEntityMPJLambdaWrapper.eq(ShopProductCourseEntity::getCatalogueId,c.getId());
|
||||||
List<ShopProduct> shopProducts = shopProductCourseDao.selectJoinList(ShopProduct.class, shopProductCourseEntityMPJLambdaWrapper);
|
List<ShopProduct> shopProducts = shopProductCourseDao.selectJoinList(ShopProduct.class, shopProductCourseEntityMPJLambdaWrapper);
|
||||||
c.setProductList(shopProducts);
|
c.setProductList(shopProducts);
|
||||||
|
//配置购买人数
|
||||||
|
MPJLambdaWrapper<UserCourseBuyEntity> wrapper = new MPJLambdaWrapper<>();
|
||||||
|
wrapper.eq(UserCourseBuyEntity::getCatalogueId,c.getId());
|
||||||
|
c.setBuyPeoples(userCourseBuyDao.selectList(wrapper).size());
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user