huminmin
3 天以前 bbff5bb89738ea3fabb480d3ca3ba13f78e18ced
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
<?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.ruoyi.safe.mapper.SafeCertificationMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.safe.pojo.SafeCertification">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="code" property="code" />
        <result column="type" property="type" />
        <result column="version" property="version" />
        <result column="remark" property="remark" />
        <result column="effective_time" property="effectiveTime" />
        <result column="create_time" property="createTime" />
        <result column="create_user" property="createUser" />
        <result column="update_time" property="updateTime" />
        <result column="update_user" property="updateUser" />
        <result column="tenant_id" property="tenantId" />
    </resultMap>
    <select id="pageSafeCertification" resultType="com.ruoyi.safe.pojo.SafeCertification">
        select sc.*
        from safe_certification sc
        where 1=1
        <if test="c.name != null and c.name != ''">
            and sc.name like concat('%', #{c.name}, '%')
        </if>
        <if test="c.code != null and c.code != ''">
            and sc.code like concat('%', #{c.code}, '%')
        </if>
        <if test="c.type != null and c.type != ''">
            and sc.type like concat('%', #{c.type}, '%')
        </if>
    </select>
 
</mapper>