Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

49 řádky
1.9 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. <result column="logo" jdbcType="VARCHAR" property="logo"/>
  11. <result column="summary" jdbcType="VARCHAR" property="summary"/>
  12. <result column="createdate" jdbcType="TIMESTAMP" property="createtime"/>
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`name`,`createtime`,`updatetime`,`tenant_id`,`logo`,`summary`,`createdate`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1 = 1
  19. <if test=" null != id "> and `id` = #{id} </if>
  20. <if test=" null != name "> and `name` like concat('%',#{name},'%') </if>
  21. <if test=" null != createtime "> and `createtime` = #{createtime} </if>
  22. <if test=" null != updatetime "> and `updatetime` = #{updatetime} </if>
  23. <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if>
  24. <if test=" null != ids ">
  25. and id in
  26. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  27. #{idItem}
  28. </foreach>
  29. </if>
  30. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  31. </sql>
  32. <select id="findList" parameterType="com.iformall.domain.po.WxBrand" resultMap="BaseResultMap">
  33. select <include refid="allColumns" /> from wx_brand
  34. <include refid="dynamicWhereConditions" />
  35. </select>
  36. <select id="queryBrand" resultType="hashmap">
  37. select id,`name` value from wx_brand where tenant_id=#{value}
  38. </select>
  39. </mapper>