bug
This commit is contained in:
@@ -91,6 +91,11 @@ public class CourseCatalogueServiceImpl extends ServiceImpl<CourseCatalogueDao,
|
||||
if(byId.getFee().compareTo(BigDecimal.ZERO)==0||byId.getHalfFee().compareTo(BigDecimal.ZERO)==0){
|
||||
return R.error("价格异常");
|
||||
}
|
||||
Integer integer = shopProductCourseDao.selectCount(new LambdaQueryWrapper<ShopProductCourseEntity>()
|
||||
.eq(ShopProductCourseEntity::getCatalogueId, byId.getId()));
|
||||
if(integer>1){
|
||||
return R.error("生成失败!已存在商品数量大于等于2,快捷生成商品不可用");
|
||||
}
|
||||
createProduct(byId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user