From 620bb4712a31791231c4381581f0f60088f079fe Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 27 五月 2026 14:03:45 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev_New_pro' into dev_宁夏_英泽防锈
---
src/main/resources/mapper/system/SysPostMapper.xml | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/main/resources/mapper/system/SysPostMapper.xml b/src/main/resources/mapper/system/SysPostMapper.xml
index 177f74d..d62d78b 100644
--- a/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/src/main/resources/mapper/system/SysPostMapper.xml
@@ -16,12 +16,12 @@
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
-
+
<sql id="selectPostVo">
- select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
+ select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
from sys_post
</sql>
-
+
<select id="selectPostList" parameterType="com.ruoyi.project.system.domain.SysPost" resultMap="SysPostResult">
<include refid="selectPostVo"/>
<where>
@@ -35,17 +35,18 @@
AND post_name like concat('%', #{postName}, '%')
</if>
</where>
+ order by create_time desc
</select>
-
+
<select id="selectPostAll" resultMap="SysPostResult">
<include refid="selectPostVo"/>
</select>
-
+
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_id = #{postId}
</select>
-
+
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
select p.post_id
from sys_post p
@@ -53,7 +54,7 @@
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
-
+
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
select p.post_id, p.post_name, p.post_code
from sys_post p
@@ -61,17 +62,17 @@
left join sys_user u on u.user_id = up.user_id
where u.user_name = #{userName}
</select>
-
+
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_name=#{postName} limit 1
</select>
-
+
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_code=#{postCode} limit 1
</select>
-
+
<update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost">
update sys_post
<set>
@@ -85,7 +86,7 @@
</set>
where post_id = #{postId}
</update>
-
+
<insert id="insertPost" parameterType="com.ruoyi.project.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
insert into sys_post(
<if test="postId != null and postId != 0">post_id,</if>
@@ -107,16 +108,16 @@
sysdate()
)
</insert>
-
+
<delete id="deletePostById" parameterType="Long">
delete from sys_post where post_id = #{postId}
</delete>
-
+
<delete id="deletePostByIds" parameterType="Long">
delete from sys_post where post_id in
<foreach collection="array" item="postId" open="(" separator="," close=")">
#{postId}
- </foreach>
+ </foreach>
</delete>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3