智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
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
35
36
37
38
39
40
41
42
43
44
45
46
<?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="org.springblade.modules.licet.mapper.LicetMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="licetResultMap" type="org.springblade.modules.licet.entity.Licet">
        <id column="id" property="id"/>
        <result column="originalName" property="originalname"/>
        <result column="template" property="template"/>
        <result column="ptype" property="ptype"/>
    </resultMap>
 
 
    <select id="selectLicetPage" resultMap="licetResultMap">
        select * from sys_licet where 1=1
        <if test="licet.ptype!=null and licet.ptype!=''">
            and ptype = #{licet.ptype}
        </if>
        order by id asc
    </select>
 
    <select id="selectLicets" resultType="java.util.HashMap">
        select
        <trim suffixOverrides="," >
            <if test="id != null and id !=''" >
                id,
            </if>
            <if test="ptype != null and ptype !=''" >
                ptype,
            </if>
            <if test="originalname != null and originalname !=''" >
                originalname,
            </if>
            <if test="template != null and template !=''" >
                ifnull(template,"") template,
            </if>
        </trim>
        from sys_licet
        where 1=1
        <if test="licet.ptype!=null and licet.ptype!=''">
            and ptype = #{licet.ptype}
        </if>
        order by id asc
    </select>
 
</mapper>