PtlCrawlerApiMapper.xml 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ydtech.modules.protocol.dao.PtlCrawlerApiMapper">
  6. <resultMap id="BaseResultMap" type="com.ydtech.modules.protocol.entity.po.PtlCrawlerApi">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="templateId" column="template_id" jdbcType="BIGINT"/>
  9. <result property="apiType" column="api_type" jdbcType="TINYINT"/>
  10. <result property="apiName" column="api_name" jdbcType="VARCHAR"/>
  11. <result property="url" column="url" jdbcType="VARCHAR"/>
  12. </resultMap>
  13. <sql id="Base_Column_List">
  14. id,template_id,api_type,
  15. api_name,url
  16. </sql>
  17. <select id="getApiUrl" resultType="java.lang.String">
  18. select url
  19. from ptl_crawler_api
  20. where template_id = (select template_id from ptl_agreement_attribution where id = #{agreementId})
  21. and api_type = #{crawlerApiType}
  22. limit 1
  23. </select>
  24. </mapper>