|
@@ -79,13 +79,14 @@ public class InformClassifyServiceImpl extends ServiceImpl<InformClassifyMapper,
|
|
|
InformClassify update = BeanUtil.toBean(bo, InformClassify.class);
|
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
-
|
|
|
- LambdaQueryWrapper<InformClassify> lqw = Wrappers.lambdaQuery();
|
|
|
- lqw.eq( InformClassify::getParentId, bo.getClassifyId());
|
|
|
- InformClassify informClassify = new InformClassify();
|
|
|
- informClassify.setStatus(-1);
|
|
|
- informClassify.setUpdateTime(DateUtils.getNowTime());
|
|
|
- baseMapper.update(informClassify,lqw);
|
|
|
+ if (bo.getStatus() == -1) {
|
|
|
+ LambdaQueryWrapper<InformClassify> lqw = Wrappers.lambdaQuery();
|
|
|
+ lqw.eq(InformClassify::getParentId, bo.getClassifyId());
|
|
|
+ InformClassify informClassify = new InformClassify();
|
|
|
+ informClassify.setStatus(-1);
|
|
|
+ informClassify.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ baseMapper.update(informClassify, lqw);
|
|
|
+ }
|
|
|
return this.updateById(update);
|
|
|
}
|
|
|
|