<!-- 职务列表 -->
<select id="getDutyList" resultClass="com.mycrm.domain.Duty">
<![CDATA[
select dutyID, dutyName from tbDuty
]]>
</select>
resultClass="com.mycrm.domain.Duty"中的com.mycrm.domain.Duty类,能不能当成变量传过来
<select id="getDutyList" resultClass="com.mycrm.domain.Duty">
<![CDATA[
select dutyID, dutyName from tbDuty
]]>
</select>
resultClass="com.mycrm.domain.Duty"中的com.mycrm.domain.Duty类,能不能当成变量传过来
<![CDATA[
update tbDuty
set dutyName = #dutyName :VARCHAR#
WHERE dutyID= #dutyName :DECIMAL#
]]>
<update id="update" parameterClass="com.mycrm.domain.Duty">
<![CDATA[
update tbDuty
set dutyName = #dutyName :VARCHAR#
WHERE dutyID= #dutyName :DECIMAL#
]]>
把parameterClass里面的com.mycrm.domain.Duty实体类,当成变量传过来,
说白了,就是把com.mycrm.domain.Duty当成变量传过来
你是指想动态的指定查询的类吗? 感觉不太可以,
可以这么想, 这些 xml 文件与 dao 是相互对应的,你的 dao 定了, 相应的 xml 的结构也差不多定了吧,
一些通用的东西,不想每个XML里面都写一遍。所以,想动态的把类传过去,把一些通用的东西封装一下