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.
 
 
 
 
 

59 lines
2.3 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.WxBillPayWayMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillPayWay">
  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="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  10. <result column="is_del" jdbcType="INTEGER" property="isDel"/>
  11. <result column="is_system" jdbcType="INTEGER" property="isSystem"/>
  12. <result column="name" jdbcType="VARCHAR" property="name"/>
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`is_system`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1=1
  19. <if test=" null != id ">and `id` = #{id}</if>
  20. <if test=" null != tenantId and '' != tenantId">
  21. and `tenant_id` = #{tenantId}
  22. </if>
  23. <if test=" null != parentTenantId and '' != parentTenantId">
  24. and `parent_tenant_id` = #{parentTenantId}
  25. </if>
  26. <if test=" null != isDel ">and `is_del` = #{isDel}</if>
  27. <if test=" null != isSystem ">and `is_system` = #{isSystem}</if>
  28. <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if>
  29. <if test=" null != ids ">
  30. and id in
  31. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  32. #{idItem}
  33. </foreach>
  34. </if>
  35. <if test=" null != sortColumns">order by ${sortColumns}</if>
  36. </sql>
  37. <select id="findList" parameterType="com.iformall.domain.po.WxBillPayWay" resultMap="BaseResultMap">
  38. select
  39. <include refid="allColumns"/>
  40. from wx_bill_pay_way
  41. <include refid="dynamicWhereConditions"/>
  42. </select>
  43. <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap">
  44. select
  45. <include refid="allColumns"/>
  46. from wx_bill_pay_way where id = #{id} and `tenant_id` = #{tenantId}
  47. </select>
  48. <update id = "setIsDel" parameterType="HashMap">
  49. update wx_bill_pay_way set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId}
  50. </update>
  51. </mapper>