예제 #1
0
 /**
  * @author ljiun
  * @date 2015年5月12日上午10:22:47
  * @param tagIds
  * @throws Exception
  * @return Integer
  * @description 删除标签
  */
 public Integer deleteTag(String tagIds) throws Exception {
   String[] idArr = tagIds.split(",");
   int setTotal = 0;
   for (int i = 0; i < idArr.length; i++) {
     if (StringTools.isEmpty(idArr[i])) {
       continue;
     }
     int tagId = Integer.parseInt(idArr[i]);
     int code = tagDao.delTag(tagId);
     if (code > 0) {
       articleTagDao.delByTagId(tagId);
       setTotal = setTotal + 1;
     }
   }
   return setTotal;
 }