|
|
@ -5,6 +5,7 @@ import com.xxl.job.admin.core.model.XxlJobLog;
|
|
|
|
import com.xxl.job.admin.core.thread.JobTriggerPoolHelper;
|
|
|
|
import com.xxl.job.admin.core.thread.JobTriggerPoolHelper;
|
|
|
|
import com.xxl.job.admin.core.trigger.TriggerTypeEnum;
|
|
|
|
import com.xxl.job.admin.core.trigger.TriggerTypeEnum;
|
|
|
|
import com.xxl.job.admin.core.util.I18nUtil;
|
|
|
|
import com.xxl.job.admin.core.util.I18nUtil;
|
|
|
|
|
|
|
|
import com.xxl.job.admin.dao.XxlJobGroupDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobInfoDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobInfoDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobLogDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobLogDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobRegistryDao;
|
|
|
|
import com.xxl.job.admin.dao.XxlJobRegistryDao;
|
|
|
@ -35,6 +36,8 @@ public class AdminBizImpl implements AdminBiz {
|
|
|
|
private XxlJobInfoDao xxlJobInfoDao;
|
|
|
|
private XxlJobInfoDao xxlJobInfoDao;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private XxlJobRegistryDao xxlJobRegistryDao;
|
|
|
|
private XxlJobRegistryDao xxlJobRegistryDao;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private XxlJobGroupDao xxlJobGroupDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -126,14 +129,26 @@ public class AdminBizImpl implements AdminBiz {
|
|
|
|
int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
if (ret < 1) {
|
|
|
|
if (ret < 1) {
|
|
|
|
xxlJobRegistryDao.registrySave(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
xxlJobRegistryDao.registrySave(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fresh
|
|
|
|
|
|
|
|
freshGroupRegistryInfo(registryParam);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ReturnT.SUCCESS;
|
|
|
|
return ReturnT.SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ReturnT<String> registryRemove(RegistryParam registryParam) {
|
|
|
|
public ReturnT<String> registryRemove(RegistryParam registryParam) {
|
|
|
|
xxlJobRegistryDao.registryDelete(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
|
|
|
|
|
|
|
|
if (ret > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fresh
|
|
|
|
|
|
|
|
freshGroupRegistryInfo(registryParam);
|
|
|
|
|
|
|
|
}
|
|
|
|
return ReturnT.SUCCESS;
|
|
|
|
return ReturnT.SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void freshGroupRegistryInfo(RegistryParam registryParam){
|
|
|
|
|
|
|
|
// Under consideration, prevent affecting core tables
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|