public String addPostType(HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "id", required = false) Long id,
ModelMap model) throws Exception {
if (id != null) {
PostType postType = postTypeService.findPostTypeById(id);
model.addAttribute("postTypeAttribute", postType);
} else {
model.addAttribute("postTypeAttribute", new PostType());
}
return "/admin/postType/postTypeForm";
}