Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

59 строки
2.3 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.WxWiwideInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxWiWideInfo">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="wiwide_id" jdbcType="VARCHAR" property="wiwideId"/>
  9. <result column="wiwide_key" jdbcType="VARCHAR" property="wiwideKey"/>
  10. <result column="wiwide_url" jdbcType="VARCHAR" property="wiwideUrl"/>
  11. <result column="token" jdbcType="VARCHAR" property="token"/>
  12. <result column="expired_time" jdbcType="TIMESTAMP" property="expiredTime"/>
  13. <result column="capability" jdbcType="VARCHAR" property="capability"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`parent_tenant_id`,`wiwide_id`,`wiwide_key`,`wiwide_url`, `token`,`expired_time`,`capability`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != tenantId and '' != tenantId">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != parentTenantId and '' != parentTenantId">
  27. and `parent_tenant_id` = #{parentTenantId}
  28. </if>
  29. <if test=" null != wiwideId ">
  30. and `wiwide_id` like concat('%', #{wiwideId},'%')
  31. </if>
  32. <if test=" null != ids ">
  33. and id in
  34. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  35. #{idItem}
  36. </foreach>
  37. </if>
  38. <if test=" null != sortColumns">order by ${sortColumns}</if>
  39. </sql>
  40. <select id="findList" parameterType="com.iformall.domain.po.WxWiWideInfo" resultMap="BaseResultMap">
  41. select
  42. <include refid="allColumns"/>
  43. from wx_wiwide_info
  44. <include refid="dynamicWhereConditions"/>
  45. </select>
  46. <update id="updateToken" parameterType="com.iformall.domain.po.WxWiWideInfo">
  47. update wx_wiwide_info set token=#{token},expired_time=#{expiredTime} where id=#{id}
  48. </update>
  49. </mapper>