美文网首页
ibatis报错:无法在结果集中找到相应的列

ibatis报错:无法在结果集中找到相应的列

作者: 小兔哈尼 | 来源:发表于2018-11-14 18:16 被阅读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)的字段,不对应的话会报这样的错

相关文章

网友评论

      本文标题:ibatis报错:无法在结果集中找到相应的列

      本文链接:https://www.haomeiwen.com/subject/dnajfqtx.html