Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

69 righe
2.7 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.WxEnergyFeesSetoffMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyFeesSetoff">
  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="advance_fees_id" jdbcType="BIGINT" property="advanceFeesId"/>
  11. <result column="fees_id" jdbcType="BIGINT" property="feesId"/>
  12. </resultMap>
  13. <sql id="allColumns">
  14. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`advance_fees_id`,`fees_id`
  15. </sql>
  16. <sql id="dynamicWhereConditions">
  17. where 1=1
  18. <if test=" null != id ">and `id` = #{id}</if>
  19. <if test=" null != tenantId and '' != tenantId">
  20. and `tenant_id` = #{tenantId}
  21. </if>
  22. <if test=" null != parentTenantId and '' != parentTenantId">
  23. and `parent_tenant_id` = #{parentTenantId}
  24. </if>
  25. <if test=" null != advanceFeesId ">and `advance_fees_id` = #{advanceFeesId}</if>
  26. <if test=" null != feesId ">and `fees_id` = #{feesId}</if>
  27. <if test=" null != ids ">
  28. and id in
  29. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  30. #{idItem}
  31. </foreach>
  32. </if>
  33. <if test=" null != sortColumns">order by ${sortColumns}</if>
  34. </sql>
  35. <select id="findList" parameterType="com.iformall.domain.po.WxEnergyFeesSetoff" resultMap="BaseResultMap">
  36. select
  37. <include refid="allColumns"/>
  38. from wx_energy_fees_setoff
  39. <include refid="dynamicWhereConditions"/>
  40. </select>
  41. <select id="findFeesIdList" parameterType="com.iformall.domain.po.WxEnergyFeesSetoff" resultType="Long">
  42. select distinct fees_id
  43. from wx_energy_fees_setoff
  44. <include refid="dynamicWhereConditions"/>
  45. </select>
  46. <select id="findadvanceFeesIdList" parameterType="com.iformall.domain.po.WxEnergyFeesSetoff" resultType="Long">
  47. select distinct advance_fees_id
  48. from wx_energy_fees_setoff
  49. <include refid="dynamicWhereConditions"/>
  50. </select>
  51. <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap">
  52. select
  53. <include refid="allColumns"/>
  54. from wx_energy_fees_setoff where id = #{id} and `tenant_id` = #{tenantId}
  55. </select>
  56. <delete id="deleteByAdvanceId" parameterType="com.iformall.domain.po.WxEnergyFeesSetoff" >
  57. delete from wx_energy_fees_setoff where `tenant_id` = #{tenantId} and advance_fees_id = #{advanceFeesId}
  58. </delete>
  59. </mapper>