mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix-[#676] Set notifyUserIds to null when empty the notify info of a job.
This commit is contained in:
parent
00228f3b3e
commit
8aaa602082
@ -89,8 +89,12 @@ public class JobServiceImpl implements JobService {
|
|||||||
fillDefaultValue(jobInfoDO);
|
fillDefaultValue(jobInfoDO);
|
||||||
|
|
||||||
// 转化报警用户列表
|
// 转化报警用户列表
|
||||||
if (!CollectionUtils.isEmpty(request.getNotifyUserIds())) {
|
if (request.getNotifyUserIds() != null) {
|
||||||
jobInfoDO.setNotifyUserIds(SJ.COMMA_JOINER.join(request.getNotifyUserIds()));
|
if (request.getNotifyUserIds().size() == 0) {
|
||||||
|
jobInfoDO.setNotifyUserIds(null);
|
||||||
|
} else {
|
||||||
|
jobInfoDO.setNotifyUserIds(SJ.COMMA_JOINER.join(request.getNotifyUserIds()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LifeCycle lifecycle = Optional.ofNullable(request.getLifeCycle()).orElse(LifeCycle.EMPTY_LIFE_CYCLE);
|
LifeCycle lifecycle = Optional.ofNullable(request.getLifeCycle()).orElse(LifeCycle.EMPTY_LIFE_CYCLE);
|
||||||
jobInfoDO.setLifecycle(JSON.toJSONString(lifecycle));
|
jobInfoDO.setLifecycle(JSON.toJSONString(lifecycle));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user