赞
踩
(估计很多是错的,后面更了解了更正)
dao层调用’selectNodeByApplyNo’方法,返回格式为’AppNodeMap’(此格式为根据实体类自定义的)
其中的result标签为实体类的属性,column为数据库中字段,
collection标签为实体类下的list集合属性,ofTyype为list集合的类型,select为调用的dao层方法,column为调用dao层方法时传入的字段
<resultMap id="AppNodeMap" type="com.bootdo.apply.domain.AppNode"> <result column="node_code" property="nodeCode" jdbcType="VARCHAR" /> <result column="apply_no" property="applyNo" jdbcType="VARCHAR" /> <result column="flow_code" property="flowCode" jdbcType="VARCHAR" /> <result column="node_name" property="nodeName" jdbcType="VARCHAR" /> <result column="status" property="status" jdbcType="INTEGER" /> <collection property="infoList" javaType="java.util.ArrayList" ofType="com.bootdo.apply.domain.AppChildrenNode" select="com.bootdo.apply.dao.FlowStepDao.getNodeList" column="{nodeCode = node_code , applyNo = apply_no}" /> </resultMap> <select id="getNodeList" resultType="com.bootdo.apply.domain.AppChildrenNode"> select s.appr_user_id,s.appr_user_name, s.update_time, s.appr_content, s.is_appr from hxl_ticket_flow_step s INNER JOIN hxl_ticket_flow_node n on s.flow_code = n.flow_code and s.node_code = n.node_code where s.node_code = #{nodeCode} AND apply_no = #{applyNo} group by s.appr_user_id </select> <select id="selectNodeByApplyNo" resultMap="AppNodeMap"> select s.flow_code,s.node_code,s.status,n.node_name,s.apply_no from hxl_ticket_flow_step s INNER JOIN hxl_ticket_flow_node n on s.flow_code = n.flow_code and s.node_code = n.node_code left JOIN sys_user u on s.appr_user_id = u.user_id where s.flow_code = #{flowCode} AND apply_no = #{applyNo} <if test="num == 1"> and s.node_code != 'kaishi' and s.node_code != 'shenqing' and s.node_code != 'jieshu' </if> and n.company_id = #{companyId} group by node_code order by n.id </select>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。