|
|
@@ -125,14 +125,14 @@ public class CourseFileServiceImpl extends ServiceImpl<CourseFileMapper, CourseF
|
|
|
|
|
|
@Override
|
|
|
public boolean editHandouts(CourseHandoutsEditBo bo) {
|
|
|
- if (ObjectUtils.isNotNull(bo.getStatus()) && bo.getStatus() == -1){
|
|
|
+ if (ObjectUtils.isNotNull(bo.getStatus()) && bo.getStatus() == -1 && bo.getStatus() == 0){
|
|
|
//删除校验
|
|
|
int count = iGoodsService
|
|
|
.count(new LambdaQueryWrapper<Goods>()
|
|
|
.eq(Goods::getHandoutsId, bo.getHandoutsId())
|
|
|
.eq(Goods::getStatus, 1));
|
|
|
if (count > 0){
|
|
|
- throw new CustomException("已有商品关联此讲义,不能删除!");
|
|
|
+ throw new CustomException("已有商品关联此讲义,不能改动!");
|
|
|
}
|
|
|
}
|
|
|
iCourseHandoutsService.update(new LambdaUpdateWrapper<CourseHandouts>().set(CourseHandouts::getUpdateStatus,0).eq(CourseHandouts::getHandoutsId,bo.getHandoutsId()));
|