You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

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