提交 | 用户 | 时间
|
71e81e
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
懒 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="cn.stylefeng.guns.sys.modular.rest.mapper.RestNoticeMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.sys.modular.rest.entity.RestNotice"> |
|
7 |
<id column="notice_id" property="noticeId"/> |
|
8 |
<result column="title" property="title"/> |
|
9 |
<result column="content" property="content"/> |
|
10 |
<result column="create_time" property="createTime"/> |
|
11 |
<result column="create_user" property="createUser"/> |
|
12 |
<result column="update_time" property="updateTime"/> |
|
13 |
<result column="update_user" property="updateUser"/> |
|
14 |
</resultMap> |
|
15 |
|
|
16 |
<!-- 通用查询结果列 --> |
|
17 |
<sql id="Base_Column_List"> |
|
18 |
notice_id AS "noticeId", title AS "title", content AS "content", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser" |
|
19 |
</sql> |
|
20 |
|
|
21 |
<select id="list" resultType="map"> |
|
22 |
select |
|
23 |
<include refid="Base_Column_List"></include> |
|
24 |
from sys_notice |
|
25 |
<if test="condition != null and condition != ''"> |
|
26 |
where title like CONCAT('%',#{condition},'%') or content like CONCAT('%',#{condition},'%') |
|
27 |
</if> |
|
28 |
order by create_time DESC |
|
29 |
</select> |
|
30 |
|
|
31 |
<select id="list" resultType="map" databaseId="oracle"> |
|
32 |
select |
|
33 |
<include refid="Base_Column_List"></include> |
|
34 |
from sys_notice |
|
35 |
<if test="condition != null and condition != ''"> |
|
36 |
where title like '%' || #{condition} || '%' or content like '%' || #{condition} || '%' |
|
37 |
</if> |
|
38 |
order by create_time DESC |
|
39 |
</select> |
|
40 |
</mapper> |