未完成的代码2
parent
d459415e40
commit
c1882a0d86
@ -1,8 +1,32 @@
|
|||||||
package com.docus.server.report.mapper;
|
package com.docus.server.report.mapper;
|
||||||
|
|
||||||
|
import com.docus.server.report.entity.AfJobTime;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* job 记录时间
|
* job 记录时间
|
||||||
* @author wyb
|
* @author wyb
|
||||||
*/
|
*/
|
||||||
public interface AfJobTimeMapper {
|
public interface AfJobTimeMapper {
|
||||||
|
/**
|
||||||
|
* 根据任务类型查询任务时间记录
|
||||||
|
* @param jobType 任务类型
|
||||||
|
* @return 任务时间记录
|
||||||
|
*/
|
||||||
|
AfJobTime getAfJobTimeByJobType(@Param("jobType") String jobType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入job时间参数
|
||||||
|
* @param afJobTime job时间参数
|
||||||
|
* @return 数据库操作结果
|
||||||
|
*/
|
||||||
|
int insert(@Param("afJobTime") AfJobTime afJobTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改job时间
|
||||||
|
* @param afJobTime job时间
|
||||||
|
* @return 数据库操作结果
|
||||||
|
*/
|
||||||
|
int updateById(@Param("afJobTime") AfJobTime afJobTime);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
<?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.docus.server.report.mapper.AfJobTimeMapper">
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO `docus_archivefile`.`af_job_time`(`id`, `update_time`, `job_type`)
|
||||||
|
VALUES (#{afJobTime.id}, #{afJobTime.updateTime}, #{afJobTime.jobType});
|
||||||
|
</insert>
|
||||||
|
<update id="updateById">
|
||||||
|
|
||||||
|
UPDATE `docus_archivefile`.`af_job_time`
|
||||||
|
SET `update_time` = #{afJobTime.updateTime},
|
||||||
|
WHERE `id` = #{afJobTime.id};
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getAfJobTimeByJobType" resultType="com.docus.server.report.entity.AfJobTime">
|
||||||
|
select id,update_time as updateTime,job_type as jobType
|
||||||
|
from af_job_time
|
||||||
|
where job_type= #{jobType}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue