StoreRewardMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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="io.platform.store.biz.mapper.StoreRewardMapper">
  4. <select id="selectStoreRewords" resultType="io.platform.base.vo.StoreScanRewordVO"
  5. parameterType="io.platform.base.dto.StoreScanRewordDTO">
  6. SELECT
  7. BONUS money,
  8. TIRE_MODEL tireModel,
  9. REWARD_TYPE getWay,
  10. TIRENUMBER tyreNum,
  11. CREATE_TIME createTime
  12. FROM
  13. "APP_STORE_REWARD"
  14. <where>
  15. STORE_ID = #{storeScanRewordDTO.storeId}
  16. <if test=" ''!= storeScanRewordDTO.brandCode and null != storeScanRewordDTO.brandCode">
  17. and TIRE_BRAND = #{storeScanRewordDTO.brandCode}
  18. </if>
  19. <if test=" null != storeScanRewordDTO.searchKey and '' != storeScanRewordDTO.searchKey">
  20. and KEYWORD LIKE #{storeScanRewordDTO.searchKey}
  21. </if>
  22. <if test="null != storeScanRewordDTO.startTime">
  23. and CREATE_TIME &gt; #{storeScanRewordDTO.startTime}
  24. </if>
  25. <if test="null != storeScanRewordDTO.endTime">
  26. and CREATE_TIME &lt; #{storeScanRewordDTO.endTime}
  27. </if>
  28. </where>
  29. ORDER BY CREATE_TIME DESC
  30. </select>
  31. </mapper>