| | |
| | | "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" /> |
| | |
| | | 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} |
| | |
| | | AND invoke_target like concat('%', #{invokeTarget}, '%') |
| | | </if> |
| | | </where> |
| | | order by job_id asc |
| | | </select> |
| | | |
| | | <select id="selectJobAll" resultMap="SysJobResult"> |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |