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.
 
 
 
 
 

72 lines
2.6 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.TtOrderPushErrorMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.TtOrderPushError">
  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="main_id" jdbcType="BIGINT" property="mainId"/>
  9. <result column="msg_type" jdbcType="INTEGER" property="msgType"/>
  10. <result column="third_type" jdbcType="INTEGER" property="thirdType"/>
  11. <result column="err_msg" jdbcType="VARCHAR" property="errMsg"/>
  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`,`parent_tenant_id`,`main_id`,`msg_type`,`third_type`,`err_msg`,
  17. `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 != mainId ">
  31. and `main_id` = #{mainId}
  32. </if>
  33. <if test=" null != msgType ">
  34. and `msg_type` = #{msgType}
  35. </if>
  36. <if test=" null != thirdType ">
  37. and `third_type` = #{thirdType}
  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.TtOrderPushError" resultMap="BaseResultMap">
  48. select
  49. <include refid="allColumns"/>
  50. from tt_order_push_error
  51. <include refid="dynamicWhereConditions"/>
  52. </select>
  53. <select id="findIdList" parameterType="com.iformall.domain.po.TtOrderPushError" resultType="Long">
  54. select id
  55. from tt_order_push_error
  56. <include refid="dynamicWhereConditions"/>
  57. </select>
  58. </mapper>