欣影管理平台时间任务功能

jni
liuguijing 2 years ago
parent 0e12618250
commit 834eccbfbe

@ -0,0 +1,24 @@
package com.shxy.xymanager_common.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class TerminalScheduleMapper implements Serializable {
private Integer id;
private Integer termId;
private Byte channelId;
private Integer scheduleId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,29 @@
package com.shxy.xymanager_common.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class TerminalScheduleRule implements Serializable {
private Integer id;
private String name;
private Date startTime;
private Date endTime;
private Integer interval;
private String remark;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,17 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.TerminalScheduleMapper;
public interface TerminalScheduleMapperDao {
int deleteByPrimaryKey(Integer id);
int insert(TerminalScheduleMapper record);
int insertSelective(TerminalScheduleMapper record);
TerminalScheduleMapper selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TerminalScheduleMapper record);
int updateByPrimaryKey(TerminalScheduleMapper record);
}

@ -0,0 +1,17 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.TerminalScheduleRule;
public interface TerminalScheduleRuleDao {
int deleteByPrimaryKey(Integer id);
int insert(TerminalScheduleRule record);
int insertSelective(TerminalScheduleRule record);
TerminalScheduleRule selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TerminalScheduleRule record);
int updateByPrimaryKey(TerminalScheduleRule record);
}

@ -0,0 +1,106 @@
<?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="com.shxy.xymanager_dao.dao.TerminalScheduleMapperDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalScheduleMapper">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="term_id" jdbcType="INTEGER" property="termId"/>
<result column="channel_id" jdbcType="TINYINT" property="channelId"/>
<result column="schedule_id" jdbcType="INTEGER" property="scheduleId"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, term_id, channel_id, schedule_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_schedulemapper
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_schedulemapper
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleMapper">
insert into terminal_schedulemapper (id, term_id, channel_id,
schedule_id, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT},
#{scheduleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleMapper">
insert into terminal_schedulemapper
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="termId != null">
term_id,
</if>
<if test="channelId != null">
channel_id,
</if>
<if test="scheduleId != null">
schedule_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="termId != null">
#{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
#{channelId,jdbcType=TINYINT},
</if>
<if test="scheduleId != null">
#{scheduleId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleMapper">
update terminal_schedulemapper
<set>
<if test="termId != null">
term_id = #{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
channel_id = #{channelId,jdbcType=TINYINT},
</if>
<if test="scheduleId != null">
schedule_id = #{scheduleId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleMapper">
update terminal_schedulemapper
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
schedule_id = #{scheduleId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -0,0 +1,128 @@
<?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="com.shxy.xymanager_dao.dao.TerminalScheduleRuleDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalScheduleRule">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="start_time" jdbcType="TIME" property="startTime"/>
<result column="end_time" jdbcType="TIME" property="endTime"/>
<result column="interval" jdbcType="INTEGER" property="interval"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, name, start_time, end_time, interval, remark, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_schedulerule
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_schedulerule
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleRule">
insert into terminal_schedulerule (id, name, start_time,
end_time, interval, remark,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME},
#{endTime,jdbcType=TIME}, #{interval,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleRule">
insert into terminal_schedulerule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="interval != null">
interval,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIME},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIME},
</if>
<if test="interval != null">
#{interval,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleRule">
update terminal_schedulerule
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIME},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIME},
</if>
<if test="interval != null">
interval = #{interval,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalScheduleRule">
update terminal_schedulerule
set name = #{name,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIME},
end_time = #{endTime,jdbcType=TIME},
interval = #{interval,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save