@Override public String getAllCollegeBySchoolId(Integer id) { // 通过ID得到所有所属学院 List<XtwCollege> collegeList = collegeDaoImpl.loadAllCollegeBySchoolId(id); // 创建json对象 JSONArray jsonArray = JSONArray.fromObject(collegeList); // 将json对象转换成字符串 String jsonString = jsonArray.toString(); return jsonString; }
@Override public XtwCollege findByCollegeNameAndSchoolId(String collegeName, Integer schoolId) { return collegeDaoImpl.findByCollegeNameAndSchoolId(collegeName, schoolId); }