刚学java不久,代码写的很简单,主要是记下自己的一个学习过程
<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ page import="com.ibatis.sqlmap.client.SqlMapClient" %>
<%
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
SqlMapClient cs = (SqlMapClient) ctx.getBean("sqlMapClient");
Audit audit =new Audit();
AuditDetail auditDetail =new AuditDetail();
audit.setAuditTargetId(new Integer(project.getProjectID()));
audit.setAuditType(new Integer("1"));
audit =(Audit)cs.queryForObject("selectAudit",audit);
List auditDetailList=null;
if(audit!=null){
auditDetail.setAuditId(audit.getAuditId());
auditDetail.setAuditResult(new Integer(2));
auditDetailList =cs.queryForList("selectAuditDetail",auditDetail);
}
%>