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

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