后台服务
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.

TtUpSettleinMapper.xml 3.5 KiB

2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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.TtUpSettleinMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.tt.TtUpSettlein">
  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="cuser_id" jdbcType="BIGINT" property="cuserId"/>
  9. <result column="invitation_code" jdbcType="VARCHAR" property="invitationCode"/>
  10. <result column="liaison_man" jdbcType="VARCHAR" property="liaisonMan"/>
  11. <result column="liaison_phone" jdbcType="VARCHAR" property="liaisonPhone"/>
  12. <result column="tt_user_name" jdbcType="VARCHAR" property="ttUserName"/>
  13. <result column="tt_count_fans" jdbcType="VARCHAR" property="ttCountFans"/>
  14. <result column="bussiness_types" jdbcType="VARCHAR" property="bussinessTypes"/>
  15. <result column="explains" jdbcType="VARCHAR" property="explains"/>
  16. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  17. <result column="handle_status" jdbcType="INTEGER" property="handleStatus"/>
  18. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  19. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`tenant_id`,`parent_tenant_id`,`cuser_id`,`invitation_code`,`liaison_man`,`liaison_phone`,
  23. `tt_user_name`,`tt_count_fans`,`bussiness_types`,`explains`,
  24. `remark`,`handle_status`,`create_date`,`update_date`
  25. </sql>
  26. <sql id="dynamicWhereConditions">
  27. where `is_del` = 0
  28. <if test=" null != id ">
  29. and `id` = #{id}
  30. </if>
  31. <if test=" null != tenantId and '' != tenantId">
  32. and `tenant_id` = #{tenantId}
  33. </if>
  34. <if test=" null != parentTenantId and '' != parentTenantId">
  35. and `parent_tenant_id` = #{parentTenantId}
  36. </if>
  37. <if test=" null != cuserId ">
  38. and `cuser_id` = #{cuserId}
  39. </if>
  40. <if test=" null != invitationCode and '' != invitationCode">
  41. and `invitation_code` = #{invitationCode}
  42. </if>
  43. <if test=" null != liaisonMan ">
  44. and `liaison_man` like concat('%', #{liaisonMan},'%')
  45. </if>
  46. <if test=" null != liaisonPhone ">
  47. and `liaison_phone` like concat('%', #{liaisonPhone},'%')
  48. </if>
  49. <if test=" null != ttUserName ">
  50. and `tt_user_name` like concat('%', #{ttUserName},'%')
  51. </if>
  52. <if test=" null != handleStatus ">
  53. and `handle_status` = #{handleStatus}
  54. </if>
  55. <if test="startdate != null">
  56. and `create_date` &gt;= #{startdate}
  57. </if>
  58. <if test="enddate != null">
  59. and `create_date` &lt;= #{enddate}
  60. </if>
  61. <if test=" null != ids ">
  62. and `id` in
  63. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  64. #{idItem}
  65. </foreach>
  66. </if>
  67. <if test=" null != sortColumns">order by ${sortColumns}</if>
  68. </sql>
  69. <select id="findList" parameterType="com.iformall.domain.po.tt.TtUpSettlein" resultMap="BaseResultMap">
  70. select
  71. <include refid="allColumns"/>
  72. from tt_up_settlein
  73. <include refid="dynamicWhereConditions"/>
  74. </select>
  75. </mapper>