songhuangfeng123
2022-07-04 ebf072008e6d544a940f70e65b7c59be8211f8cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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.emergency.repository.EmergencyPlanInfoRepository">
 
    <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyPlanInfoPageDO" id="pageResult">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="name" property="name" />
        <result column="status" property="status" />
        <result column="type" property="type" />
        <result column="level" property="level" />
        <result column="release_date" property="releaseDate" />
    </resultMap>
 
    <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyPlanInfoDetailDO" id="detailResult">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="name" property="name" />
        <result column="status" property="status" />
        <result column="type" property="type" />
        <result column="level" property="level" />
        <result column="release_date" property="releaseDate" />
        <result column="author_uid" property="authorUid" />
        <result column="author_dept_id" property="authorDeptId" />
        <result column="associated_danger" property="associatedDanger" />
    </resultMap>
 
    <select id="selectEmergencyPlanList" resultMap="pageResult">
        select id,`name`,`type`,`level`,release_date from emergency_plan where del_flag = 0
        <if test="query.name != null  and query.name != ''"> and `name` like concat('%', #{query.name}, '%')</if>
        <if test="query.type != null  and query.type != ''"> and `type` = #{query.type}</if>
    </select>
 
</mapper>