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