Package com.freewebsys.blog.pojo

Examples of com.freewebsys.blog.pojo.PostType


   */
  @Transactional
  public void deletePostTypeById(Long id) throws Exception {
    log.info("deletePostTypeById:" + id);
    try {
      PostType postType = (PostType) baseDao.findById(PostType.class, id);
      baseDao.delete(postType);
    } catch (Exception e) {
      log.info("PostType删除异常");
      e.printStackTrace();
    }
View Full Code Here


        .getBean("postTypeService");
   
    OptionService optionService = (OptionService) applicationContext
        .getBean("optionService");
    try {
      PostType postType = postTypeService.findHomePostType();
      if (postType == null) {
        postType = new PostType();
        postType.setName("首页");
        postType.setIsHome(1);
        // 设置排序号
        postType.setOrderId(new Date().getTime());
        // 保存
        postTypeService.savePostType(postType);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  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";
  }
View Full Code Here

TOP

Related Classes of com.freewebsys.blog.pojo.PostType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.