Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

45 righe
1.7 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.WxBrandMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBrand">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="name" jdbcType="VARCHAR" property="name" />
  7. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  8. <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
  9. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  10. </resultMap>
  11. <sql id="allColumns">
  12. `id`,`name`,`createtime`,`updatetime`,`tenant_id`
  13. </sql>
  14. <sql id="dynamicWhereConditions">
  15. where 1 = 1
  16. <if test=" null != id "> and `id` = #{id} </if>
  17. <if test=" null != name "> and `name` like concat('%',#{name},'%') </if>
  18. <if test=" null != createtime "> and `createtime` = #{createtime} </if>
  19. <if test=" null != updatetime "> and `updatetime` = #{updatetime} </if>
  20. <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </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.WxBrand" resultMap="BaseResultMap">
  30. select <include refid="allColumns" /> from wx_brand
  31. <include refid="dynamicWhereConditions" />
  32. </select>
  33. <select id="queryBrand" resultType="hashmap">
  34. select id,`name` value from wx_brand where tenant_id=#{value}
  35. </select>
  36. </mapper>