mapper.SysTaskJobMapper.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of task Show documentation
Show all versions of task Show documentation
jishi series products task on java
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="system.mapper.SysTaskJobMapper"> <!-- @mgp-generator base/*Mapper由系统生成,不要修改,重新生成将被覆盖 本同名文件用于撰写自已的SQL,重新生成不会覆盖 两个文件在运行时将会自动合并 参考: https://www.xiaobo.li/project/projects/jishi-mgp/wiki --> <select id="list" parameterType="system.entity.SysTaskJob" resultType="system.entity.SysTaskJob"> SELECT <include refid="All_Column_List" /> FROM sys_task_job <where> <include refid="whereAll" /> </where> ORDER BY name ASC </select> <!-- 覆盖tk的insertSelective默认实现 --> <insert id="insertSelective" keyProperty="id" parameterType="system.entity.SysTaskJob" useGeneratedKeys="true"> INSERT INTO sys_task_job ( <trim suffixOverrides=","> <if test="id != null">id,</if> <if test="name != null">name,</if> <if test="createTime != null">create_time,</if> <if test="startTime != null">start_time,</if> <if test="expireTime != null">expire_time,</if> <if test="groupName != null">group_name,</if> <if test="description != null">description,</if> <if test="actuator != null">actuator,</if> <if test="schedule != null">schedule,</if> <if test="instruction != null">instruction,</if> <if test="param != null">param,</if> <if test="status != null">status,</if> <if test="hostname != null">hostname,</if> <if test="envName != null">env_name,</if> </trim> ) VALUES ( <trim suffixOverrides=","> <if test="id != null">#{id,jdbcType=BIGINT},</if> <if test="name != null">#{name,jdbcType=VARCHAR},</if> <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> <if test="expireTime != null">#{expireTime,jdbcType=TIMESTAMP},</if> <if test="groupName != null">#{groupName,jdbcType=VARCHAR},</if> <if test="description != null">#{description,jdbcType=VARCHAR},</if> <if test="actuator != null">#{actuator,jdbcType=VARCHAR},</if> <if test="schedule != null">#{schedule,jdbcType=VARCHAR},</if> <if test="instruction != null">#{instruction,jdbcType=VARCHAR},</if> <if test="param != null">#{param,jdbcType=VARCHAR},</if> <if test="status != null">#{status,jdbcType=VARCHAR},</if> <if test="hostname != null">#{hostname,jdbcType=VARCHAR},</if> <if test="envName != null">#{envName,jdbcType=VARCHAR},</if> </trim> ) </insert> <!-- 主体更新方法: 1. 注释不允许修改的字段 2. 表结构调整后需要手动添加或删除 --> <update id="updateBody" parameterType="system.entity.SysTaskJob"> UPDATE sys_task_job <set> <!-- id = #{id,jdbcType=BIGINT}, --> name = #{name,jdbcType=VARCHAR}, <!-- create_time = #{createTime,jdbcType=TIMESTAMP},--> start_time = #{startTime,jdbcType=TIMESTAMP}, expire_time = #{expireTime,jdbcType=TIMESTAMP}, group_name = #{groupName,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, actuator = #{actuator,jdbcType=VARCHAR}, schedule = #{schedule,jdbcType=VARCHAR}, instruction = #{instruction,jdbcType=VARCHAR}, param = #{param,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR}, hostname = #{hostname,jdbcType=VARCHAR}, env_name = #{envName,jdbcType=VARCHAR}, </set> <where> AND id = #{id,jdbcType=BIGINT} </where> </update> <update id="updateByName" parameterType="system.entity.SysTaskJob"> UPDATE sys_task_job <set> <include refid="setAll"></include> </set> WHERE name = #{name,jdbcType=VARCHAR} </update> </mapper>