代码提交
This commit is contained in:
parent
473d74ec8c
commit
a87c2ac7b7
|
|
@ -16,4 +16,6 @@ public interface ArchivedSettingMapper {
|
|||
Integer addArchivedSetting(ArchivedSettingDto dto);
|
||||
|
||||
Integer updateArchivedSetting(ArchivedSettingDto dto);
|
||||
|
||||
Integer updatecronExpression(ArchivedSettingDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.web.service.impl;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.quartz.mapper.SysJobMapper;
|
||||
import com.bonus.web.core.config.CronExpressionGenerator;
|
||||
import com.bonus.web.domain.ArchivedSettingDto;
|
||||
import com.bonus.web.mapper.ArchivedSettingMapper;
|
||||
|
|
@ -47,6 +48,7 @@ public class ArchivedSettingServiceImpl implements ArchivedSettingService {
|
|||
String cronStr = CronExpressionGenerator.generateCron(dto.getArchivedType(), dto.getCycle(), dto.getTime(), dto.getWeekOfDay(), dto.getMonthDay());
|
||||
dto.setCronStr(cronStr);
|
||||
Integer i = archivedSettingMapper.updateArchivedSetting(dto);
|
||||
archivedSettingMapper.updatecronExpression(dto);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("修改成功");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updatecronExpression">
|
||||
UPDATE da_ky_sys_job
|
||||
SET cron_str = #{cronStr},
|
||||
invoke_target = CASE
|
||||
WHEN archived_type = 1 THEN 'archivedSetting.regularly'
|
||||
WHEN archived_type = 2 THEN 'archivedSetting.noRegularly'
|
||||
ELSE invoke_target END
|
||||
</update>
|
||||
|
||||
<select id="getArchivedSetting" resultType="com.bonus.web.domain.ArchivedSettingDto">
|
||||
SELECT
|
||||
|
|
|
|||
Loading…
Reference in New Issue