sfd
2025-05-26 2a64b537e8e3bce9ce030585a3da17d48379c0ad
aps-modules/aps-job/src/main/resources/mapper/job/SysJobMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.job.mapper.SysJobMapper">
   <resultMap type="SysJob" id="SysJobResult">
   <resultMap type="com.aps.job.domain.SysJob" id="SysJobResult">
      <id     property="jobId"          column="job_id"          />
      <result property="jobName"        column="job_name"        />
      <result property="jobGroup"       column="job_group"       />
@@ -25,11 +25,11 @@
      from sys_job
    </sql>
   
   <select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
   <select id="selectJobList" parameterType="com.aps.job.domain.SysJob" resultMap="SysJobResult">
      <include refid="selectJobVo"/>
      <where>
         <if test="jobName != null and jobName != ''">
            AND job_name like concat('%', #{jobName}, '%')
            AND job_name like '%' || #{jobName} || '%'
         </if>
         <if test="jobGroup != null and jobGroup != ''">
            AND job_group = #{jobGroup}
@@ -41,6 +41,7 @@
            AND invoke_target like concat('%', #{invokeTarget}, '%')
         </if>
      </where>
      order by job_id asc
   </select>
   
   <select id="selectJobAll" resultMap="SysJobResult">
@@ -63,7 +64,7 @@
        </foreach> 
    </delete>
    
    <update id="updateJob" parameterType="SysJob">
    <update id="updateJob" parameterType="com.aps.job.domain.SysJob">
       update sys_job
       <set>
          <if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
@@ -75,12 +76,12 @@
          <if test="status !=null">status = #{status},</if>
          <if test="remark != null and remark != ''">remark = #{remark},</if>
          <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
          update_time = sysdate()
          update_time = now()
       </set>
       where job_id = #{jobId}
   </update>
    
    <insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
    <insert id="insertJob" parameterType="com.aps.job.domain.SysJob" useGeneratedKeys="true" keyProperty="jobId">
       insert into sys_job(
          <if test="jobId != null and jobId != 0">job_id,</if>
          <if test="jobName != null and jobName != ''">job_name,</if>
@@ -104,7 +105,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>