1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

use pinia to modify notice update function and add pagination to noticeManage page

This commit is contained in:
cccccyb
2023-05-14 22:00:59 +08:00
parent 4a00d46983
commit f309bd7bb9
11 changed files with 331 additions and 162 deletions

View File

@@ -21,21 +21,48 @@
<!-- 查询所有公告 -->
<select id="selectAllNotice" resultMap="NoticeAllResultMap">
select u.id uid,
username,
u.username,
n.id nid,
title,
content,
type_id,
sender_id,
create_time,
send_time,
end_time,
priority,
top,
modify_time,
origin_id,
n.title,
n.content,
n.type_id,
n.sender_id,
n.create_time,
n.send_time,
n.end_time,
n.priority,
n.top,
n.modify_time,
n.origin_id,
type.id typeId,
name,
type.name,
type.enable
from t_notice n
left join t_notice_type type on n.type_id = type.id
left join t_user u on n.sender_id = u.id
where n.deleted = 0
and n.old = 0
order by create_time desc
</select>
<!-- 分页查询所有公告 -->
<select id="selectPageAllNotice" resultMap="NoticeAllResultMap" resultType="notice">
select u.id uid,
u.username,
n.id nid,
n.title,
n.content,
n.type_id,
n.sender_id,
n.create_time,
n.send_time,
n.end_time,
n.priority,
n.top,
n.modify_time,
n.origin_id,
type.id typeId,
type.name,
type.enable
from t_notice n
left join t_notice_type type on n.type_id = type.id
@@ -53,22 +80,62 @@
<id property="id" column="typeId"/>
</association>
</resultMap>
<!-- 模糊查询-->
<!-- 模糊查询公告-->
<select id="selectByCond" resultMap="NoticeAllResultMap">
select u.id uid,
username,
u.username,
n.id nid,
title,
content,
type_id,
sender_id,
create_time,
send_time,
end_time,
priority,
top,
modify_time,
origin_id,
n.title,
n.content,
n.type_id,
n.sender_id,
n.create_time,
n.send_time,
n.end_time,
n.priority,
n.top,
n.modify_time,
n.origin_id,
type.id typeId,
type.name,
type.enable
from t_notice n
left join t_notice_type type on n.type_id = type.id
left join t_user u on n.sender_id = u.id
<where>
<if test="null!=title and title!=''">
and instr(title,#{title})&gt;0
</if>
<if test="null!=type and type!=''">
and instr(type.name,#{type})&gt;0
</if>
<if test="null!=startTime">
and send_time &gt;= #{startTime}
</if>
<if test="null !=endTime">
and end_time &lt; #{endTime}
</if>
and n.deleted = 0
and n.old = 0
</where>
</select>
<!-- 模糊查询公告-->
<select id="selectPageByCond" resultMap="NoticeAllResultMap" resultType="notice">
select u.id uid,
u.username,
n.id nid,
n.title,
n.content,
n.type_id,
n.sender_id,
n.create_time,
n.send_time,
n.end_time,
n.priority,
n.top,
n.modify_time,
n.origin_id,
type.id typeId,
type.name,
type.enable