后台服务
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.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.WxMallApplyMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMallApply">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="mall_name" jdbcType="VARCHAR" property="mallName" />
  7. <result column="applicant" jdbcType="VARCHAR" property="applicant" />
  8. <result column="phone" jdbcType="VARCHAR" property="phone" />
  9. <result column="apply_date" jdbcType="TIMESTAMP" property="applyDate" />
  10. </resultMap>
  11. <sql id="allColumns">
  12. `id`,`mall_name`,`applicant`,`phone`,`apply_date`
  13. </sql>
  14. <sql id="dynamicWhereConditions">
  15. where 1 = 1
  16. <if test=" null != id "> and `id` = #{id} </if>
  17. <if test=" null != mallName "> and `mall_name` = #{mallName} </if>
  18. <if test=" null != applicant "> and `applicant` = #{applicant} </if>
  19. <if test=" null != phone "> and `phone` = #{phone} </if>
  20. <if test=" null != applyDate "> and `apply_date` = #{applyDate} </if>
  21. <if test=" null != ids ">
  22. and id in
  23. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  24. #{idItem}
  25. </foreach>
  26. </if>
  27. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  28. </sql>
  29. <select id="findList" parameterType="com.iformall.domain.po.WxMallApply" resultMap="BaseResultMap">
  30. select <include refid="allColumns" /> from wx_mall_apply
  31. <include refid="dynamicWhereConditions" />
  32. </select>
  33. </mapper>