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.
 
 
 
 
 

54 righe
2.2 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="createdate"/>
  13. <result column="is_del" property="isDel"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`name`,`createtime`,`updatetime`,`tenant_id`,`logo`,`summary`,`createdate`,is_del
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where is_del = 0
  20. <if test=" null != id "> and `id` = #{id} </if>
  21. <if test=" null != name "> and `name` like concat('%',#{name},'%') </if>
  22. <if test=" null != createtime "> and `createtime` = #{createtime} </if>
  23. <if test=" null != updatetime "> and `updatetime` = #{updatetime} </if>
  24. <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if>
  25. <if test=" null != ids ">
  26. and id in
  27. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  28. #{idItem}
  29. </foreach>
  30. </if>
  31. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  32. </sql>
  33. <select id="findList" parameterType="com.iformall.domain.po.WxBrand" resultMap="BaseResultMap">
  34. select <include refid="allColumns" /> from wx_brand
  35. <include refid="dynamicWhereConditions" />
  36. </select>
  37. <select id="queryBrand" resultType="hashmap">
  38. select id,`name` value from wx_brand where tenant_id=#{value}
  39. </select>
  40. <select id="hasBrand" parameterType="com.iformall.domain.po.WxBrand" resultType="Integer">
  41. select count(*) from wx_brand where tenant_id=#{tenantId} and `name`=#{name}
  42. <if test=" null != id">
  43. and id != #{id}
  44. </if>
  45. </select>
  46. </mapper>