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

WxBillActionMapper.xml 2.6 KiB

2 年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.WxBillActionMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillAction">
  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="bill_id" jdbcType="BIGINT" property="billId"/>
  9. <result column="user_id" jdbcType="BIGINT" property="userId"/>
  10. <result column="user_name" jdbcType="VARCHAR" property="userName"/>
  11. <result column="phone" jdbcType="VARCHAR" property="phone"/>
  12. <result column="action" jdbcType="INTEGER" property="action"/>
  13. <result column="details" jdbcType="VARCHAR" property="details"/>
  14. <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
  15. <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/>
  16. <result column="pay_date" jdbcType="TIMESTAMP" property="payDate"/>
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`tenant_id`,`parent_tenant_id`,`bill_id`,`user_id`,`user_name`,`phone`,`action`,`details`,`createtime`,`updatetime`,`pay_date`
  20. </sql>
  21. <sql id="dynamicWhereConditions">
  22. where 1=1
  23. <if test=" null != id ">
  24. and `id` = #{id}
  25. </if>
  26. <if test=" null != tenantId and '' != tenantId">
  27. and `tenant_id` = #{tenantId}
  28. </if>
  29. <if test=" null != parentTenantId and '' != parentTenantId">
  30. and `parent_tenant_id` = #{parentTenantId}
  31. </if>
  32. <if test=" null != action ">
  33. and `action` = #{action}
  34. </if>
  35. <if test="null == action ">
  36. and `action` != 7
  37. </if>
  38. <if test=" null != billId ">
  39. and `bill_id` = #{billId}
  40. </if>
  41. <if test=" null != startDate and null != endDate">
  42. and `createtime` BETWEEN startDate and endDate
  43. </if>
  44. <if test=" null != ids ">
  45. and id in
  46. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  47. #{idItem}
  48. </foreach>
  49. </if>
  50. <if test=" null != sortColumns">order by ${sortColumns}</if>
  51. <if test=" null == sortColumns">order by createtime desc</if>
  52. </sql>
  53. <select id="findList" parameterType="com.iformall.domain.po.WxBillAction" resultMap="BaseResultMap">
  54. select
  55. <include refid="allColumns"/>
  56. from wx_bill_action
  57. <include refid="dynamicWhereConditions"/>
  58. </select>
  59. <select id="findBillActionList" parameterType="com.iformall.domain.po.WxBillAction" resultMap="BaseResultMap">
  60. select
  61. <include refid="allColumns"/>
  62. from wx_bill_action
  63. <include refid="dynamicWhereConditions"/>
  64. </select>
  65. </mapper>