|
|
|
@ -19,6 +19,8 @@ import com.huoran.iasf.common.utils.R; |
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.cache.annotation.CacheEvict; |
|
|
|
|
import org.springframework.cache.annotation.Cacheable; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
@ -108,7 +110,7 @@ public class SysColumnController { |
|
|
|
|
return R.success(sysColumn); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@NoRepeatSubmit |
|
|
|
|
// @NoRepeatSubmit
|
|
|
|
|
@PostMapping("/save") |
|
|
|
|
@ApiOperation(value = "新增", response = SysColumn.class) |
|
|
|
|
@RequiresPermissions("sys:column:save") |
|
|
|
@ -126,6 +128,7 @@ public class SysColumnController { |
|
|
|
|
@RequiresPermissions("sys:column:update") |
|
|
|
|
public R update(@RequestBody SysColumn sysColumn) { |
|
|
|
|
boolean updateState = service.updateById(sysColumn); |
|
|
|
|
service.removeArticles(sysColumn.getId()); |
|
|
|
|
return updateState ? R.success() : R.fail("编辑失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -184,13 +187,15 @@ public class SysColumnController { |
|
|
|
|
//删除栏目后删除栏目下的文章
|
|
|
|
|
sysColumnLongPageService.remove(queryWrapper1); |
|
|
|
|
ret = service.removeByIds(idList); |
|
|
|
|
for (Integer columnId : idList) { |
|
|
|
|
service.removeArticles(columnId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.success(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sameLevelJudgment") |
|
|
|
|
@Decrypt |
|
|
|
|
@ApiOperation(value = "同级判重", response = ColumnWeightReqVO.class) |
|
|
|
@ -249,7 +254,7 @@ public class SysColumnController { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Cacheable(value = "articles", key = "#id") |
|
|
|
|
public String getIds(Integer id) { |
|
|
|
|
//1 创建list集合,用于封装所有删除菜单id值
|
|
|
|
|
List<Integer> idList = new ArrayList<>(); |
|
|
|
|