智慧保安后台管理-验收版本
tangzy
2021-12-06 30df94c05573a426d030510d4dd58ae1d93bfb7a
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
<?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.talk.mapper.TalkMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="talkResultMap" type="org.springblade.modules.talk.entity.Talk">
        <id column="id" property="id"/>
        <result column="title" property="title"/>
        <result column="real_name" property="realName"/>
        <result column="talkcontent" property="talkcontent"/>
        <result column="talktime" property="talktime"/>
        <result column="conclusion" property="conclusion"/>
        <result column="evaluate" property="evaluate"/>
        <result column="deptid" property="deptid"/>
        <result column="imgurl" property="imgurl"/>
    </resultMap>
 
 
    <select id="selectTalkPage" resultMap="talkResultMap">
        select * from sys_talk where 1=1
        <if test="talk.deptid!=null and talk.deptid!='' and talk.deptid!='1123598813738675201'">
            and deptid = #{talk.deptid}
        </if>
        <if test="talk.realName!=null and talk.realName!=''">
            and real_name like concat('%',#{talk.realName},'%')
        </if>
        <if test="talk.title!=null and talk.title!=''">
            and title like concat('%',#{talk.title},'%')
        </if>
    </select>
 
</mapper>