代码提交
This commit is contained in:
parent
473d74ec8c
commit
a87c2ac7b7
|
|
@ -16,4 +16,6 @@ public interface ArchivedSettingMapper {
|
||||||
Integer addArchivedSetting(ArchivedSettingDto dto);
|
Integer addArchivedSetting(ArchivedSettingDto dto);
|
||||||
|
|
||||||
Integer updateArchivedSetting(ArchivedSettingDto dto);
|
Integer updateArchivedSetting(ArchivedSettingDto dto);
|
||||||
|
|
||||||
|
Integer updatecronExpression(ArchivedSettingDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.web.service.impl;
|
package com.bonus.web.service.impl;
|
||||||
|
|
||||||
import com.bonus.common.core.domain.AjaxResult;
|
import com.bonus.common.core.domain.AjaxResult;
|
||||||
|
import com.bonus.quartz.mapper.SysJobMapper;
|
||||||
import com.bonus.web.core.config.CronExpressionGenerator;
|
import com.bonus.web.core.config.CronExpressionGenerator;
|
||||||
import com.bonus.web.domain.ArchivedSettingDto;
|
import com.bonus.web.domain.ArchivedSettingDto;
|
||||||
import com.bonus.web.mapper.ArchivedSettingMapper;
|
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());
|
String cronStr = CronExpressionGenerator.generateCron(dto.getArchivedType(), dto.getCycle(), dto.getTime(), dto.getWeekOfDay(), dto.getMonthDay());
|
||||||
dto.setCronStr(cronStr);
|
dto.setCronStr(cronStr);
|
||||||
Integer i = archivedSettingMapper.updateArchivedSetting(dto);
|
Integer i = archivedSettingMapper.updateArchivedSetting(dto);
|
||||||
|
archivedSettingMapper.updatecronExpression(dto);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return AjaxResult.success("修改成功");
|
return AjaxResult.success("修改成功");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</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 id="getArchivedSetting" resultType="com.bonus.web.domain.ArchivedSettingDto">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue