7 小时以前 620bb4712a31791231c4381581f0f60088f079fe
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>
</mapper>