| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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.order.dao.InsBusinessInsuranceMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.order.entity.InsBusinessInsurance">
- <id property="id" column="id" jdbcType="VARCHAR"/>
- <result property="kindName" column="kind_name" jdbcType="VARCHAR"/>
- <result property="kindCode" column="kind_code" jdbcType="VARCHAR"/>
- <result property="max" column="max" jdbcType="VARCHAR"/>
- <result property="grouping" column="grouping" jdbcType="VARCHAR"/>
- <collection property="amtList" ofType="com.ydtech.modules.order.entity.InsBusinessInsuranceOption">
- <id property="optionId" column="option_id" jdbcType="VARCHAR"/>
- <result property="label" column="label" jdbcType="VARCHAR"/>
- <result property="value" column="value" jdbcType="VARCHAR"/>
- </collection>
- </resultMap>
- <select id="getBusinessInsurance" resultMap="BaseResultMap">
- SELECT
- ibi.id,
- ibi.kind_name,
- ibi.kind_code,
- ibi.grouping,
- ibio.id as option_id,
- ibio.label,
- ibio.value
- FROM
- ins_business_insurance ibi
- LEFT JOIN
- ins_business_insurance_option ibio ON ibi.id = ibio.business_id
- order by id,sort
- </select>
- </mapper>
|