<?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>
|