白名单增加各个操作的定时任务处理;
各种批量操作增加定时任务的处理;
This commit is contained in:
@@ -20,14 +20,14 @@ public interface SchedulerDao extends CrudDao<ScheduleCfg> {
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
List<ScheduleCfg> findNewlyCfg(@Param("id")Long id,@Param("limit")Long limit,@Param("type")int type);
|
||||
List<ScheduleCfg> findNewlyCfg(@Param("id")Long id,@Param("limit")Long limit,@Param("type")int type,@Param("delFlag")Integer delFlag);
|
||||
|
||||
/**
|
||||
* 更新 del_flag 字段为删除标识
|
||||
* @param cfg
|
||||
* @return
|
||||
*/
|
||||
int deleteByCompileId(ScheduleCfg cfg);
|
||||
int deleteByCompileIds(String compileIds);
|
||||
|
||||
/**
|
||||
* 查找 配置 下发 最新记录
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<result property="userRegion4" column="user_region4"/>
|
||||
<result property="userRegion5" column="user_region5"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="type" column="type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -123,6 +124,36 @@
|
||||
order by a.id
|
||||
</select>
|
||||
|
||||
<!-- 查找最新的更新数据 -->
|
||||
<select id="get" resultType="com.nis.domain.ScheduleCfg">
|
||||
select
|
||||
a.ID,
|
||||
a.NAME,
|
||||
a.cron_valid,
|
||||
a.cron_invalid,
|
||||
a.SERVICE_ID,
|
||||
a.COMPILE_ID,
|
||||
a.CFG_ID,
|
||||
a.IS_VALID,
|
||||
a.IS_AUDIT,
|
||||
a.function_id,
|
||||
a.CREATOR_ID,
|
||||
a.CREATE_TIME,
|
||||
a.EDITOR_ID,
|
||||
a.EDIT_TIME,
|
||||
a.table_name,
|
||||
a.user_region1,
|
||||
a.user_region2,
|
||||
a.user_region3,
|
||||
a.user_region4,
|
||||
a.user_region5,
|
||||
a.del_flag,
|
||||
a.type
|
||||
from schedule_cfg a
|
||||
<where>
|
||||
and id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
<!-- 查找最新的更新数据 -->
|
||||
<select id="findNewlyCfg" resultMap="scheduleCfgMap">
|
||||
select
|
||||
@@ -145,12 +176,16 @@
|
||||
a.user_region2,
|
||||
a.user_region3,
|
||||
a.user_region4,
|
||||
a.user_region5
|
||||
a.user_region5,
|
||||
a.del_flag,
|
||||
a.type
|
||||
from schedule_cfg a
|
||||
<where>
|
||||
del_Flag = 1
|
||||
and id > #{id}
|
||||
and type=#{type}
|
||||
<if test=" delFlag != null">
|
||||
and del_flag = #{delFlag}
|
||||
</if>
|
||||
</where>
|
||||
order by a.id
|
||||
limit #{limit}
|
||||
@@ -179,6 +214,7 @@
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5,
|
||||
del_flag,
|
||||
type
|
||||
) values (
|
||||
#{name,jdbcType=VARCHAR},
|
||||
@@ -200,23 +236,18 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{delFlag,jdbcType=INTEGER},
|
||||
#{type,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 根据 compileId 将定时任务失效,定时任务的修改策略为:删除之前的所有配置,新增 -->
|
||||
<update id="deleteByCompileId" parameterType="com.nis.domain.ScheduleCfg">
|
||||
<!-- 根据 compileIds 将定时任务失效,定时任务的修改策略为:删除之前的所有配置,新增 -->
|
||||
<update id="deleteByCompileIds" parameterType="com.nis.domain.ScheduleCfg">
|
||||
update schedule_cfg
|
||||
<set>
|
||||
<if test="editorId != null ">
|
||||
editor_Id = #{editorId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="editTime != null ">
|
||||
edit_Time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
del_flag = #{DEL_FLAG_DELETE}
|
||||
del_flag = 0
|
||||
</set>
|
||||
WHERE compile_Id = #{compileId} and del_flag =1
|
||||
WHERE compile_Id in (#{compileIds}) and del_flag =1
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user