package cn.internship.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate4.support.HibernateDaoSupport;

import cn.internship.dao.InternshipDetailDao;
import cn.internship.entity.InternshipDetail;
public class InternshipDetailDaoImpl extends HibernateDaoSupport implements InternshipDetailDao{

	//根据学生学号获取实习信息
	@Override
	public InternshipDetail get(String sno) {
		String hql="from InternshipDetail it where it.sno=?";
		Object[] values={sno};
		List<InternshipDetail> it=(List<InternshipDetail>) getHibernateTemplate().find(hql, values);
		System.out.println(it.get(0));
		return it.get(0);
	}

}

@@ -560,16 +560,290 @@
 ues);%0A%09%09
+%0A%09%09if(it.get(0)==null)%7B%0A%09%09%09InternshipDetail intd=new InternshipDetail();%0A%09%09%09intd.setSno(sno);%0A%09%09%09intd.setCompany_address(%22%E5%B0%9A%E6%9C%AA%E5%AE%9E%E4%B9%A0%22);%0A%09%09%09intd.setCompany_name(%22%E5%B0%9A%E6%9C%AA%E5%AE%9E%E4%B9%A0%22);%0A%09%09%09intd.setCompany_teacher(%22%E5%B0%9A%E6%9C%AA%E5%AE%9E%E4%B9%A0%22);%0A%09%09%09intd.setDate(null);%0A%09%09%09intd.setScore(null);%0A%09%09%09return intd;%0A%09%09%7Delse%7B%0A%09%09%09
 System.o
@@ -867,16 +867,17 @@
 (0));%0A%09%09
+%09
 return i
@@ -886,14 +886,24 @@
 get(0);%0A
+%09%09%7D%0A%09%09%0A%09%09%0A
 %09%7D%0A%0A%7D%0A

修改了InternshipDetailDaoImpl.java