王佳豪
2021-05-31 bc666cce4e7905e99174195df033bcff1ed799d6
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
<?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.zy.asrs.mapper.LocAreaMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocArea">
        <id column="id" property="id"/>
        <result column="uuid" property="uuid"/>
        <result column="name" property="name"/>
        <result column="status" property="status"/>
        <result column="create_by" property="createBy"/>
        <result column="create_time" property="createTime"/>
        <result column="update_by" property="updateBy"/>
        <result column="update_time" property="updateTime"/>
        <result column="memo" property="memo"/>
 
    </resultMap>
 
 
    <select id="queryAllLocArea" resultMap="BaseResultMap">
        <choose>
            <when test="areaType == 1">
                select * from asr_loc_area where area_type = '1'
            </when>
            <otherwise>
                select * from asr_loc_area where area_type != '1' or area_type is null
            </otherwise>
        </choose>
    </select>
</mapper>