<?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.assess.system.mapper.AssInvestigationMapper">
|
<resultMap type="com.gkhy.assess.system.domain.AssInvestigation" id="investigationResult">
|
<id property="id" column="id" />
|
<result property="investigationDate" column="investigation_date" />
|
<result property="isFirst" column="is_first" />
|
<result property="isSafetyCheck" column="is_safety_check" />
|
<result property="projectId" column="project_id" />
|
<result property="recordData" column="record_data" />
|
<result property="location" column="location" />
|
<result property="delFlag" column="del_flag" />
|
<result property="version" column="version" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectInvestigationVo">
|
select i.id,i.investigation_date, i.is_first,i.is_safety_check,i.project_id,i.record_data,i.location,
|
i.del_flag,i.create_by,i.create_time,i.update_by,i.update_time,i.remark
|
from ass_investigation i
|
</sql>
|
|
|
<select id="getCountByProjectId" resultType="java.lang.Integer" parameterType="java.lang.Long">
|
select count(1) from ass_investigation where project_id=#{projectId} and del_flag=0
|
</select>
|
|
<select id="getInvestigationByProjectId" resultMap="investigationResult">
|
<include refid="selectInvestigationVo"/>
|
where project_id=#{projectId} and del_flag=0 order by create_time desc
|
</select>
|
|
<select id="getInvestigationById" resultMap="investigationResult">
|
<include refid="selectInvestigationVo"/>
|
where id=#{investigationId}
|
</select>
|
</mapper>
|