| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ydtech.modules.protocol.dao.TaxSourceMapper">
- <resultMap id="CompanyResultMap" type="com.ydtech.modules.esm.model.EsmInsCompany">
- <id property="id" column="id" jdbcType="VARCHAR"/>
- <result property="code" column="code" jdbcType="VARCHAR"/>
- <result property="name" column="name" jdbcType="VARCHAR"/>
- <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
- <result property="namesimple" column="namesimple" jdbcType="VARCHAR"/>
- <result property="remark" column="remark" jdbcType="VARCHAR"/>
- <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
- <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="lastUpdateBy" column="last_update_by" jdbcType="VARCHAR"/>
- <result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
- <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
- <result property="type" column="type" jdbcType="TINYINT"/>
- </resultMap>
- <resultMap id="AgreementResultMap" type="com.ydtech.modules.protocol.entity.po.PtlAgreement">
- <id property="id" column="id" jdbcType="VARCHAR"/>
- <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
- <result property="insuranceCompanyId" column="agreement_name" jdbcType="VARCHAR"/>
- <result property="insuranceCompany" column="insurance_company" jdbcType="VARCHAR"/>
- </resultMap>
- <select id="getInsureCompany" resultMap="CompanyResultMap">
- SELECT
- eic.*
- FROM
- esm_ins_company eic,
- ptl_agreement pa
- WHERE
- eic.id = pa.insurance_company_id
- GROUP BY
- eic.id
- </select>
- <select id="getAgreementByCompanyId" resultMap="AgreementResultMap">
- SELECT
- *
- FROM
- ptl_agreement
- WHERE
- insurance_company_id = #{companyId}
- </select>
- </mapper>
|