• Mybatis 多条件批量查询


    一、Mysql 多条件查询语法

    SELECT * FROM merchant_settlement_summary WHERE (F_merchant_id,F_settle_amount) IN (('9012514015',7467230000),('8012514015',8467230000),(7012514015,9467230000));
    

     

    二、Mybatis 语法

    <select id="queryAlreadyExistSettleSummaryRecordByBatch"
            resultType="com.model.MerchantSettlementSummary">
        select * from merchant_settlement_summary
        where (F_merchant_id,F_date) in
        <foreach collection="batchList" item="item" index="item" open="(" separator="," close=")">
            (#{item.fMerchantId},#{item.fDate})
        </foreach>
    </select>
    

      

  • 相关阅读:
    课后listview作业
    安卓sql
    activity带数据跳转
    安卓第四周作业
    15周作业
    十三周作业-集合
    十三周上机练习
    12周作业
    linux
    Questions.
  • 原文地址:https://www.cnblogs.com/xiaomaomao/p/15629857.html
Copyright © 2020-2023  润新知