Exemplo n.º 1
0
 /*根据院校层次id删除对应专业
  * (non-Javadoc)
  * @see net.cedu.biz.enrollment.AcademyMajorBiz#deleteAcademyMajorByAcademyLevelId(int)
  */
 @SuppressWarnings("unchecked")
 public int deleteAcademyMajorByAcademyLevelId(int id) {
   List list = new ArrayList();
   list.add(id);
   String sql = " and academyLevelId= " + Constants.PLACEHOLDER;
   return academyMajorDao.deleteByProperty(sql, list);
 }
Exemplo n.º 2
0
 /*根据多个院校层次ID删除每个院校层次对应的院校专业
  * (non-Javadoc)
  * @see net.cedu.biz.enrollment.AcademyMajorBiz#deleteAcademyMajorByAcademyLevelId(int)
  */
 public int deleteAcademyMajorByAcademyLevelId(List<AcademyLevel> collegelist) {
   String sql = "";
   Object[] objs = null;
   if (null != collegelist && collegelist.size() > 0) {
     objs = new Object[collegelist.size() + 1];
     sql = " and academyLevelId in ('-1'";
     StringBuffer idsSB = new StringBuffer("");
     for (int i = 0, len = collegelist.size(); i < len; i++) {
       objs[i] = collegelist.get(i).getId();
       //				sql+=","+Constants.PLACEHOLDER;
       idsSB.append("," + Constants.PLACEHOLDER);
     }
     sql += idsSB.toString();
     sql += ") order by majorId";
     return academyMajorDao.deleteByProperty(sql, objs);
   } else {
     return 0;
   }
 }