You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

62 lines
2.0 KiB

  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.iformall.mapper.WxMerchantPowerBillConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchantPowerBillConfig">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/>
  8. <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
  9. <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/>
  10. <result column="build_way" jdbcType="INTEGER" property="buildWay"/>
  11. <result column="price" jdbcType="VARCHAR" property="price"/>
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  13. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`merchant_id`,`merchant_name`,`merchant_type`,`build_way`,`price`,`create_date`,`update_date`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != tenantId ">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != merchantName and ''!=merchantName">
  27. and `merchant_name` like concat('%', #{merchantName},'%')
  28. </if>
  29. <if test=" null != merchantType ">
  30. and `merchant_type` = #{merchantType}
  31. </if>
  32. <if test=" null != buildway ">
  33. and `build_way` = #{build_way}
  34. </if>
  35. <if test=" null != ids ">
  36. and id in
  37. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  38. #{idItem}
  39. </foreach>
  40. </if>
  41. <if test=" null != sortColumns">order by ${sortColumns}</if>
  42. </sql>
  43. <select id="findList" parameterType="com.iformall.domain.po.KwBox" resultMap="BaseResultMap">
  44. select
  45. <include refid="allColumns"/>
  46. from wx_merchant_power_bill_config
  47. <include refid="dynamicWhereConditions"/>
  48. </select>
  49. </mapper>