后台服务
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.

WxThirdPartyConfigMapper.xml 3.0 KiB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.WxThirdPartyConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxThirdPartyConfig">
  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="type" jdbcType="INTEGER" property="type"/>
  9. <result column="app_id" jdbcType="VARCHAR" property="appId"/>
  10. <result column="app_key" jdbcType="VARCHAR" property="appKey"/>
  11. <result column="sign_key" jdbcType="VARCHAR" property="signKey"/>
  12. <result column="api_url" jdbcType="VARCHAR" property="apiUrl"/>
  13. <result column="token" jdbcType="VARCHAR" property="token"/>
  14. <result column="token_expired_time" jdbcType="TIMESTAMP" property="tokenExpiredTime"/>
  15. <result column="user_name" jdbcType="VARCHAR" property="userName"/>
  16. <result column="password" jdbcType="VARCHAR" property="password"/>
  17. <result column="version" jdbcType="VARCHAR" property="version"/>
  18. <result column="tp_id" jdbcType="VARCHAR" property="tpId"/>
  19. </resultMap>
  20. <sql id="allColumns">
  21. `id`,`tenant_id`,`parent_tenant_id`,`type`,`app_id`,`app_key`,`sign_key`,`api_url`, `token`,`token_expired_time`,`user_name`,`password`,`version`,`tp_id`
  22. </sql>
  23. <sql id="dynamicWhereConditions">
  24. where 1 = 1
  25. <if test=" null != id ">
  26. and `id` = #{id}
  27. </if>
  28. <if test=" null != tenantId and '' != tenantId">
  29. and `tenant_id` = #{tenantId}
  30. </if>
  31. <if test=" null != parentTenantId and '' != parentTenantId">
  32. and `parent_tenant_id` = #{parentTenantId}
  33. </if>
  34. <if test=" null != type ">
  35. and `type` = #{type}
  36. </if>
  37. <if test=" null != version and '' != version">
  38. and `version` = #{version}
  39. </if>
  40. <if test=" null != ids ">
  41. and id in
  42. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  43. #{idItem}
  44. </foreach>
  45. </if>
  46. <if test=" null != sortColumns">order by ${sortColumns}</if>
  47. </sql>
  48. <select id="findList" parameterType="com.iformall.domain.po.WxThirdPartyConfig" resultMap="BaseResultMap">
  49. select
  50. <include refid="allColumns"/>
  51. from wx_third_party_config
  52. <include refid="dynamicWhereConditions"/>
  53. </select>
  54. <update id="updateToken" parameterType="com.iformall.domain.po.WxThirdPartyConfig">
  55. update wx_third_party_config set token=#{token},token_expired_time=#{tokenExpiredTime} where id=#{id}
  56. </update>
  57. <update id="updateSercret" parameterType="com.iformall.domain.po.WxThirdPartyConfig">
  58. update wx_third_party_config set app_id=#{appId},app_key=#{appKey} where id=#{id}
  59. </update>
  60. </mapper>