fix[litemall-admin-api]: 一级类目添加失败

This commit is contained in:
Junling Bu
2018-11-10 21:08:53 +08:00
parent f5556232aa
commit dfddf82c29

View File

@@ -65,7 +65,7 @@ public class AdminCategoryController {
}
Integer pid = category.getPid();
if(pid == null){
if(level.equals("L2") && (pid == null)){
return ResponseUtil.badArgument();
}
@@ -82,7 +82,7 @@ public class AdminCategoryController {
return error;
}
categoryService.add(category);
return ResponseUtil.ok();
return ResponseUtil.ok(category);
}
@GetMapping("/read")