后台服务
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

WxMerchantPowerBillConfigMapper.xml 2.3 KiB

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