|
|
@@ -164,7 +164,7 @@ public class CmsInformationController {
|
|
|
*/
|
|
|
@DeleteMapping("/del/category/{id}")
|
|
|
public Result<String> delCategoryById(@PathVariable Long id) {
|
|
|
- int count = informationService.count(Wrappers.lambdaQuery(Information.class).apply("JSON_CONTAINS(category_id,'\"" + id + "\"')").eq(Information::getDeleted, true));
|
|
|
+ int count = informationService.count(Wrappers.lambdaQuery(Information.class).apply("JSON_CONTAINS(category_ids,'\"" + id + "\"')").eq(Information::getDeleted, true));
|
|
|
if (count > 0){
|
|
|
throw BusinessRuntimeException.getInstance("该类型下存在文章,无法删除");
|
|
|
}
|