DeviceAlgorithmChargingMapper.xml 729 B

12345678910111213141516
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.xy.mapper.DeviceAlgorithmChargingMapper">
  4. <!-- 扣费查询 -->
  5. <select id="chargingQuery" resultType="com.xy.entity.DeviceAlgorithmCharging">
  6. <foreach collection="list" item="item" separator="UNION">
  7. select *
  8. from device_algorithm_charging
  9. where device_id = #{item.deviceId}
  10. and algorithm_id = #{item.algorithmId}
  11. and unused_size > 0
  12. and ((begin_time &lt;= #{item.beginTime} and timeout >= #{item.beginTime}) or timeout = -1)
  13. </foreach>
  14. </select>
  15. </mapper>