郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.gkhy.safePlatform.riskCtrl.repository.IncidentMonthReportItemRepository">
    <resultMap id="BaseMapper" type="com.gkhy.safePlatform.riskCtrl.entity.IncidentMonthReportItem">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result column="report_id" property="reportId" jdbcType="BIGINT"/>
        <result column="level" property="level" jdbcType="TINYINT"/>
        <result column="count" property="count" jdbcType="INTEGER"/>
        <result column="cause_death_count" property="causeDeathCount" jdbcType="INTEGER"/>
        <result column="cause_heavy_injure_count" property="causeHeavyInjureCount" jdbcType="INTEGER"/>
        <result column="cause_light_injure_count" property="causeLightInjureCount" jdbcType="INTEGER"/>
        <result column="loss" property="loss" jdbcType="DECIMAL"/>
    </resultMap>
 
    <sql id="all_columns">
        id,report_id,level,count,cause_death_count,cause_death_count,cause_heavy_injure_count,cause_light_injure_count,loss
    </sql>
 
    <select id="listByReportId" resultMap="BaseMapper">
        select <include refid="all_columns"></include> from incident_month_report_item
        where report_id = #{reportId}
    </select>
</mapper>