后台服务
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

WxSubBusinessMapper.xml 2.0 KiB

2 lat temu
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.WxSubBusinessMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxSubBusiness">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="title" jdbcType="VARCHAR" property="title" />
  7. <result column="business_id" jdbcType="INTEGER" property="businessId" />
  8. <result column="business_title" jdbcType="VARCHAR" property="businessTitle" />
  9. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  10. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  11. </resultMap>
  12. <sql id="allColumns">
  13. `id`,`title`,`business_id`,`business_title`,`create_date`,`update_date`
  14. </sql>
  15. <sql id="dynamicWhereConditions">
  16. where 1 = 1
  17. <if test=" null != id ">
  18. and `id` = #{id}
  19. </if>
  20. <if test=" null != title ">
  21. and `title` like concat('%', #{title},'%')
  22. </if>
  23. <if test=" null != businessId ">
  24. and `business_id` = #{businessId}
  25. </if>
  26. <if test=" null != businessTitle ">
  27. and `business_title` like concat('%', #{businessTitle},'%')
  28. </if>
  29. <if test=" null != createDate ">
  30. and `create_date` = #{createDate}
  31. </if>
  32. <if test=" null != updateDate ">
  33. and `update_date` = #{updateDate}
  34. </if>
  35. <if test=" null != ids ">
  36. and id in
  37. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  38. #{idItem}
  39. </foreach>
  40. </if>
  41. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  42. </sql>
  43. <select id="findList" parameterType="com.iformall.domain.po.WxSubBusiness" resultMap="BaseResultMap">
  44. select <include refid="allColumns" /> from wx_sub_business
  45. <include refid="dynamicWhereConditions" />
  46. </select>
  47. <select id="findListAll" resultMap="BaseResultMap">
  48. select <include refid="allColumns" /> from wx_sub_business
  49. order by create_date asc
  50. </select>
  51. </mapper>