<?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.gk.hotwork.Mapper.EmergencyPlanMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.EmergencyPlan" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="valid_flag" property="validFlag" jdbcType="TINYINT" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
<result column="name" property="name" jdbcType="BIGINT" />
|
<result column="file_type" property="fileType" jdbcType="VARCHAR" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
<association property="fileList" javaType="com.gk.hotwork.Domain.EmergencyPlanFile">
|
<id column="file_id" property="id" />
|
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
|
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
<result column="emergency_plan_id" jdbcType="BIGINT" property="emergencyPlanId" />
|
</association>
|
</resultMap>
|
<select id="selectPages" resultMap="BaseResultMap">
|
select *
|
from emergency_plan
|
where valid_flag = 1
|
<if test="params.name != null and params.name != ''">
|
and name like concat("%",#{params.name},"%")
|
</if>
|
order by create_time desc
|
</select>
|
|
</mapper>
|