后台服务
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

72 рядки
3.0 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="sign_key" jdbcType="VARCHAR" property="signKey"/>
  11. <result column="wiwide_url" jdbcType="VARCHAR" property="wiwideUrl"/>
  12. <result column="token" jdbcType="VARCHAR" property="token"/>
  13. <result column="expired_time" jdbcType="TIMESTAMP" property="expiredTime"/>
  14. <result column="capability" jdbcType="VARCHAR" property="capability"/>
  15. <result column="user_name" jdbcType="VARCHAR" property="userName"/>
  16. <result column="password" jdbcType="VARCHAR" property="password"/>
  17. <result column="old_plat" jdbcType="VARCHAR" property="oldPlat"/>
  18. </resultMap>
  19. <sql id="allColumns">
  20. `id`,`tenant_id`,`parent_tenant_id`,`wiwide_id`,`wiwide_key`,`sign_key`,`wiwide_url`, `token`,`expired_time`,`capability`,`user_name`,`password`,`old_plat`
  21. </sql>
  22. <sql id="dynamicWhereConditions">
  23. where 1 = 1
  24. <if test=" null != id ">
  25. and `id` = #{id}
  26. </if>
  27. <if test=" null != tenantId and '' != tenantId">
  28. and `tenant_id` = #{tenantId}
  29. </if>
  30. <if test=" null != parentTenantId and '' != parentTenantId">
  31. and `parent_tenant_id` = #{parentTenantId}
  32. </if>
  33. <if test=" null != wiwideId ">
  34. and `wiwide_id` like concat('%', #{wiwideId},'%')
  35. </if>
  36. <if test=" null != oldPlat ">
  37. and `old_plat` = #{oldPlat}
  38. </if>
  39. <if test=" null != ids ">
  40. and id in
  41. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  42. #{idItem}
  43. </foreach>
  44. </if>
  45. <if test=" null != sortColumns">order by ${sortColumns}</if>
  46. </sql>
  47. <select id="findList" parameterType="com.iformall.domain.po.WxWiWideInfo" resultMap="BaseResultMap">
  48. select
  49. <include refid="allColumns"/>
  50. from wx_wiwide_info
  51. <include refid="dynamicWhereConditions"/>
  52. </select>
  53. <update id="updateToken" parameterType="com.iformall.domain.po.WxWiWideInfo">
  54. update wx_wiwide_info set token=#{token},expired_time=#{expiredTime} where id=#{id}
  55. </update>
  56. <update id="updateSercret" parameterType="com.iformall.domain.po.WxWiWideInfo">
  57. update wx_wiwide_info set wiwide_id=#{wiwideId},wiwide_key=#{wiwideKey} where id=#{id}
  58. </update>
  59. </mapper>