【修复】教程修改分类不生效问题
This commit is contained in:
@@ -56,7 +56,7 @@ public class BizTutorialController {
|
||||
@PostMapping("/update")
|
||||
@ResponseBody
|
||||
public Result<String> update(@RequestBody Tutorial tutorial) {
|
||||
return Result.isBool(tutorialService.updateById(tutorial));
|
||||
return Result.isBool(tutorialService.update(tutorial));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ public class TutorialServiceImpl extends ServiceImpl<TutorialMapper, Tutorial> i
|
||||
@Override
|
||||
public boolean update(Tutorial tutorial) {
|
||||
super.updateById(tutorial);
|
||||
tutorialCategoryRelationService.remove(new LambdaQueryWrapper<TutorialCategoryRelation>().eq(TutorialCategoryRelation::getCategoryId, tutorial.getCategoryId()));
|
||||
tutorialCategoryRelationService.remove(new LambdaQueryWrapper<TutorialCategoryRelation>().eq(TutorialCategoryRelation::getTutorialId, tutorial.getId()));
|
||||
TutorialCategoryRelation tutorialCategoryRelation = new TutorialCategoryRelation();
|
||||
tutorialCategoryRelation.setTutorialId(tutorial.getId());
|
||||
tutorialCategoryRelation.setCategoryId(tutorial.getCategoryId());
|
||||
|
||||
Reference in New Issue
Block a user