sfd
2025-05-26 2a64b537e8e3bce9ce030585a3da17d48379c0ad
aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.system.mapper.SysPostMapper">
   <resultMap type="SysPost" id="SysPostResult">
   <resultMap type="com.aps.system.domain.SysPost" id="SysPostResult">
      <id     property="postId"        column="post_id"       />
      <result property="postCode"      column="post_code"     />
      <result property="postName"      column="post_name"     />
@@ -22,17 +22,17 @@
      from sys_post
    </sql>
   
   <select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
   <select id="selectPostList" parameterType="com.aps.system.domain.SysPost" resultMap="SysPostResult">
       <include refid="selectPostVo"/>
      <where>
         <if test="postCode != null and postCode != ''">
            AND post_code like concat('%', #{postCode}, '%')
            AND post_code like '%' || #{postCode} || '%'
         </if>
         <if test="status != null and status != ''">
            AND status = #{status}
         </if>
         <if test="postName != null and postName != ''">
            AND post_name like concat('%', #{postName}, '%')
            AND post_name like '%' || #{postName} || '%'
         </if>
      </where>
   </select>
@@ -72,7 +72,7 @@
       where post_code=#{postCode} limit 1
   </select>
   
   <update id="updatePost" parameterType="SysPost">
   <update id="updatePost" parameterType="com.aps.system.domain.SysPost">
       update sys_post
       <set>
          <if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
@@ -81,12 +81,12 @@
          <if test="status != null and status != ''">status = #{status},</if>
          <if test="remark != null">remark = #{remark},</if>
          <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
          update_time = sysdate()
          update_time = now()
       </set>
       where post_id = #{postId}
   </update>
    
    <insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
    <insert id="insertPost" parameterType="com.aps.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
       insert into sys_post(
          <if test="postId != null and postId != 0">post_id,</if>
          <if test="postCode != null and postCode != ''">post_code,</if>
@@ -104,7 +104,7 @@
          <if test="status != null and status != ''">#{status},</if>
          <if test="remark != null and remark != ''">#{remark},</if>
          <if test="createBy != null and createBy != ''">#{createBy},</if>
          sysdate()
          now()
       )
   </insert>