feat:(1.3.0-beta1.1): 修复通知配置更新未清空数据
This commit is contained in:
parent
5ba5467e4c
commit
e936ace0b3
@ -3,9 +3,7 @@ package com.aizuda.snailjob.template.datasource.persistence.po;
|
|||||||
import com.aizuda.snailjob.common.core.enums.ExecutorTypeEnum;
|
import com.aizuda.snailjob.common.core.enums.ExecutorTypeEnum;
|
||||||
import com.aizuda.snailjob.common.core.enums.JobTaskTypeEnum;
|
import com.aizuda.snailjob.common.core.enums.JobTaskTypeEnum;
|
||||||
import com.aizuda.snailjob.common.core.enums.StatusEnum;
|
import com.aizuda.snailjob.common.core.enums.StatusEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -150,6 +148,7 @@ public class Job extends CreateUpdateDt {
|
|||||||
/**
|
/**
|
||||||
* 负责人id
|
* 负责人id
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private Long ownerId;
|
private Long ownerId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public interface JobConverter {
|
|||||||
|
|
||||||
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
||||||
if (CollUtil.isEmpty(notifyIds)) {
|
if (CollUtil.isEmpty(notifyIds)) {
|
||||||
return null;
|
return StrUtil.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonUtil.toJsonString(notifyIds);
|
return JsonUtil.toJsonString(notifyIds);
|
||||||
|
@ -45,7 +45,7 @@ public interface SceneConfigConverter {
|
|||||||
|
|
||||||
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
||||||
if (CollUtil.isEmpty(notifyIds)) {
|
if (CollUtil.isEmpty(notifyIds)) {
|
||||||
return null;
|
return StrUtil.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonUtil.toJsonString(notifyIds);
|
return JsonUtil.toJsonString(notifyIds);
|
||||||
|
@ -120,7 +120,7 @@ public interface WorkflowConverter {
|
|||||||
|
|
||||||
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
static String toNotifyIdsStr(Set<Long> notifyIds) {
|
||||||
if (CollUtil.isEmpty(notifyIds)) {
|
if (CollUtil.isEmpty(notifyIds)) {
|
||||||
return null;
|
return StrUtil.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonUtil.toJsonString(notifyIds);
|
return JsonUtil.toJsonString(notifyIds);
|
||||||
|
@ -153,7 +153,6 @@ public class SceneConfigServiceImpl implements SceneConfigService {
|
|||||||
|
|
||||||
retrySceneConfig.setTriggerInterval(
|
retrySceneConfig.setTriggerInterval(
|
||||||
Optional.ofNullable(retrySceneConfig.getTriggerInterval()).orElse(StrUtil.EMPTY));
|
Optional.ofNullable(retrySceneConfig.getTriggerInterval()).orElse(StrUtil.EMPTY));
|
||||||
retrySceneConfig.setNotifyIds(JsonUtil.toJsonString(Optional.ofNullable(requestVO.getNotifyIds()).orElse(Sets.newHashSet())));
|
|
||||||
Assert.isTrue(1 == accessTemplate.getSceneConfigAccess().update(retrySceneConfig,
|
Assert.isTrue(1 == accessTemplate.getSceneConfigAccess().update(retrySceneConfig,
|
||||||
new LambdaUpdateWrapper<RetrySceneConfig>()
|
new LambdaUpdateWrapper<RetrySceneConfig>()
|
||||||
.eq(RetrySceneConfig::getNamespaceId, namespaceId)
|
.eq(RetrySceneConfig::getNamespaceId, namespaceId)
|
||||||
|
Loading…
Reference in New Issue
Block a user