无关风月
2 天以前 165e73d176191ae75b57c70e049c0cfd552bbdfa
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
<?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.system.mapper.TKnowledgeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TKnowledge">
        <id column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="create_by" property="createBy" />
        <result column="update_by" property="updateBy" />
        <result column="disabled" property="disabled" />
        <result column="cover" property="cover" />
        <result column="title" property="title" />
        <result column="views" property="views" />
        <result column="status" property="status" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, create_time, update_time, create_by, update_by, disabled, cover, title, views, status
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.system.KnowledgeListVO">
        select  * from t_knowledge
        where 1=1
        <if test="query.title != null and query.title != ''">
            and title like concat('%',#{query.title},'%')
        </if>
        <if test="query.status != null">
            and status = #{query.status}
        </if>
        and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by create_time desc
    </select>
    <select id="pageListUser" resultType="com.ruoyi.system.applet.vo.KnowledgeVO">
        select  * from t_knowledge
        where 1=1
            and status = 1
        and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by create_time desc
    </select>
 
</mapper>