/**
  * 删除公共连接分类
  *
  * @param id 分类id
  * @return 0:失败 1:成功
  */
 @DELETE
 @Path("/delete/commonlinktype/{id}")
 @Produces({MediaType.APPLICATION_JSON})
 public JSONObject deleteCommonlinkType(@PathParam("id") String id) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("loginUser");
   JSONObject result = new JSONObject();
   result.put("result", 0);
   if (null != user) {
     String userId = String.valueOf(user.getId());
     CommonlinkType commonlinkType = new CommonlinkType(id, userId);
     boolean success = commonlinkService.deleteCommonlinkType(commonlinkType);
     if (success) {
       result.put("result", 1);
       return result;
     }
   }
   return result;
 }