TaxSourceMapper.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.TaxSourceMapper">
  6. <resultMap id="CompanyResultMap" type="com.ydtech.modules.esm.model.EsmInsCompany">
  7. <id property="id" column="id" jdbcType="VARCHAR"/>
  8. <result property="code" column="code" jdbcType="VARCHAR"/>
  9. <result property="name" column="name" jdbcType="VARCHAR"/>
  10. <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
  11. <result property="namesimple" column="namesimple" jdbcType="VARCHAR"/>
  12. <result property="remark" column="remark" jdbcType="VARCHAR"/>
  13. <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
  14. <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
  15. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  16. <result property="lastUpdateBy" column="last_update_by" jdbcType="VARCHAR"/>
  17. <result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
  18. <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
  19. <result property="type" column="type" jdbcType="TINYINT"/>
  20. </resultMap>
  21. <resultMap id="AgreementResultMap" type="com.ydtech.modules.protocol.entity.po.PtlAgreement">
  22. <id property="id" column="id" jdbcType="VARCHAR"/>
  23. <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
  24. <result property="insuranceCompanyId" column="agreement_name" jdbcType="VARCHAR"/>
  25. <result property="insuranceCompany" column="insurance_company" jdbcType="VARCHAR"/>
  26. </resultMap>
  27. <select id="getInsureCompany" resultMap="CompanyResultMap">
  28. SELECT
  29. eic.*
  30. FROM
  31. esm_ins_company eic,
  32. ptl_agreement pa
  33. WHERE
  34. eic.id = pa.insurance_company_id
  35. GROUP BY
  36. eic.id
  37. </select>
  38. <select id="getAgreementByCompanyId" resultMap="AgreementResultMap">
  39. SELECT
  40. *
  41. FROM
  42. ptl_agreement
  43. WHERE
  44. insurance_company_id = #{companyId}
  45. </select>
  46. </mapper>