提交 a4a47867 编写于 作者: L Linxb

新建栏目时,增加栏目名称不为空的判断

上级 285383c6
......@@ -36,7 +36,13 @@ public class CategoryController {
@RequestMapping(value = "/", method = RequestMethod.POST)
public RespBean addNewCate(Category category) {
if ("".equals(category.getCateName()) || category.getCateName() == null) {
return new RespBean("error", "请输入栏目名称!");
}
int result = categoryService.addCategory(category);
if (result == 1) {
return new RespBean("success", "添加成功!");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册