ibatis报错:无法在结果集中找到相应的列
2018-11-14 本文已影响0人
小兔哈尼
<resultMap id="ThirdPartyAccountDetailResultMap" class="Bizcent.Model.MDM.ThirdPartyAccountDetailInfo">
<result property="ThirdPartyCode" column="ThirdPartyCode" />
<result property="ChargeType" column="ChargeType" />
<result property="PaymentModeCode" column="PaymentModeCode" />
<result property="PaymentModeName" column="PaymentName" />
<result property="IsRecordCust" column="IsRecordCust"/>
<result property="CustomerCode" column="CustomerCode" />
<result property="CustomerName" column="CustomerName" />
<result property="GoodsCode" column="GoodsCode" />
<result property="IsInERP" column="IsInERP"/>
</resultMap>
<select id="LoadDetail" parameterClass="hashtable" resultMap="ThirdPartyAccountDetailResultMap">
select p.ThirdPartyCode,p.ChargeType,p.PaymentModeCode,s.PaymentName,p.IsRecordCust,p.CustomerCode,sc.CustomerName,p.GoodsCode,p.IsInERP from "$tablehead$".tbPlatformAccountDetail p
left join "$tablehead$".tbSellPayment s on p.PaymentModeCode=s.PaymentCode
left join "$tablehead$".tbStoreCustomers sc on p.CustomerCode=sc.CustomerCode
where ThirdPartyCode='$ThirdPartyCode$'
order by ChargeType
</select>
sql语句需要对应column即数据库中表的列名,property对应的则是实体类(model)的字段,不对应的话会报这样的错