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

WxOpinionMapper.xml 3.6 KiB

2 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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.WxOpinionMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxOpinion">
  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="user_id" jdbcType="BIGINT" property="userId"/>
  9. <result column="liaison_man" jdbcType="VARCHAR" property="liaisonMan"/>
  10. <result column="liaison_sex" jdbcType="TINYINT" property="liaisonSex"/>
  11. <result column="liaison_phone" jdbcType="VARCHAR" property="liaisonPhone"/>
  12. <result column="liaison_email" jdbcType="VARCHAR" property="liaisonEmail"/>
  13. <result column="title" jdbcType="VARCHAR" property="title"/>
  14. <result column="pictures" jdbcType="VARCHAR" property="pictures"/>
  15. <result column="explains" jdbcType="VARCHAR" property="explains"/>
  16. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  17. <result column="handle_status" jdbcType="TINYINT" property="handleStatus"/>
  18. <result column="handle_id" jdbcType="BIGINT" property="handleId"/>
  19. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  20. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  21. </resultMap>
  22. <sql id="allColumns">
  23. `id`,`tenant_id`,`parent_tenant_id`, `user_id`, `liaison_man`, `liaison_sex`, `liaison_phone`, `liaison_email`,
  24. `pictures`,`title`, `explains`, `remark`, `handle_status`, `handle_id`, `create_date`,`update_date`
  25. </sql>
  26. <sql id="dynamicWhereConditions">
  27. where `del_status` = 1
  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 != userId ">
  38. and `user_id` = #{userId}
  39. </if>
  40. <if test=" null != liaisonMan ">
  41. and `liaison_man` like concat('%', #{liaisonMan},'%')
  42. </if>
  43. <if test=" null != liaisonPhone ">
  44. and `liaison_phone` like concat('%', #{liaisonPhone},'%')
  45. </if>
  46. <if test=" null != liaisonEmail ">
  47. and `liaison_email` like concat('%', #{liaisonEmail},'%')
  48. </if>
  49. <if test=" null != liaisonSex ">
  50. and `liaison_sex` = #{liaisonSex}
  51. </if>
  52. <if test=" null != title ">
  53. and `title` like concat('%', #{title},'%')
  54. </if>
  55. <if test=" null != handleStatus ">
  56. and `handle_status` = #{handleStatus}
  57. </if>
  58. <if test=" null != startDate ">
  59. and `create_date` &gt;= #{startDate}
  60. </if>
  61. <if test=" null != endDate ">
  62. and `create_date` &lt;= #{endDate}
  63. </if>
  64. <if test=" null != ids ">
  65. and id in
  66. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  67. #{idItem}
  68. </foreach>
  69. </if>
  70. <if test=" null != sortColumns">order by ${sortColumns}</if>
  71. </sql>
  72. <select id="findList" parameterType="com.iformall.domain.po.WxOpinion" resultMap="BaseResultMap">
  73. select
  74. <include refid="allColumns"/>
  75. from wx_opinion
  76. <include refid="dynamicWhereConditions"/>
  77. </select>
  78. </mapper>