xiebin
2022-09-16 d5f297854fb9e1e81a8296cd5f6d3e739b1478ad
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
<?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.taskinfo.mapper.TaskInfoMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="taskinfoResultMap" type="org.springblade.modules.taskinfo.entity.TaskInfoEntity">
        <result column="id" property="id"/>
        <result column="title" property="title"/>
        <result column="start_time" property="startTime"/>
        <result column="end_time" property="endTime"/>
        <result column="content" property="content"/>
        <result column="to_user_id" property="toUserId"/>
        <result column="route_range" property="routeRange"/>
        <result column="state" property="state"/>
        <result column="source" property="source"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
 
 
    <select id="selectTaskInfoPage" resultMap="taskinfoResultMap">
        select * from ins_taskinfo where is_deleted = 0
        <if test="taskinfo.title != null and taskinfo.title != '' ">
            and title like concat('%',#{taskinfo.title},'%')
        </if>
        <if test="taskinfo.startTime != null ">
            and start_time >= #{taskinfo.startTime}
        </if>
        <if test="taskinfo.endTime != null ">
            and end_time &lt;= #{taskinfo.endTime}
        </if>
    </select>
 
 
</mapper>