Fix typos and clean some code.

This commit is contained in:
Zhouchuanwen 2019-11-20 15:04:55 +08:00
parent 8512a34469
commit 56ef13576c
2 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
private XxlJobScheduler xxlJobScheduler; private XxlJobScheduler xxlJobScheduler;
@Override @Override
public void afterPropertiesSet() { public void afterPropertiesSet() throws Exception {
adminConfig = this; adminConfig = this;
xxlJobScheduler = new XxlJobScheduler(); xxlJobScheduler = new XxlJobScheduler();

View File

@ -129,15 +129,15 @@ public class AdminBizImpl implements AdminBiz {
public ReturnT<String> registry(RegistryParam registryParam) { public ReturnT<String> registry(RegistryParam registryParam) {
// valid // valid
if (!StringUtils.hasText(registryParam.getRegistGroup()) if (!StringUtils.hasText(registryParam.getRegistryGroup())
|| !StringUtils.hasText(registryParam.getRegistryKey()) || !StringUtils.hasText(registryParam.getRegistryKey())
|| !StringUtils.hasText(registryParam.getRegistryValue())) { || !StringUtils.hasText(registryParam.getRegistryValue())) {
return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument."); return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
} }
int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date()); int ret = xxlJobRegistryDao.registryUpdate(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
if (ret < 1) { if (ret < 1) {
xxlJobRegistryDao.registrySave(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date()); xxlJobRegistryDao.registrySave(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue(), new Date());
// fresh // fresh
freshGroupRegistryInfo(registryParam); freshGroupRegistryInfo(registryParam);
@ -149,13 +149,13 @@ public class AdminBizImpl implements AdminBiz {
public ReturnT<String> registryRemove(RegistryParam registryParam) { public ReturnT<String> registryRemove(RegistryParam registryParam) {
// valid // valid
if (!StringUtils.hasText(registryParam.getRegistGroup()) if (!StringUtils.hasText(registryParam.getRegistryGroup())
|| !StringUtils.hasText(registryParam.getRegistryKey()) || !StringUtils.hasText(registryParam.getRegistryKey())
|| !StringUtils.hasText(registryParam.getRegistryValue())) { || !StringUtils.hasText(registryParam.getRegistryValue())) {
return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument."); return new ReturnT<String>(ReturnT.FAIL_CODE, "Illegal Argument.");
} }
int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue()); int ret = xxlJobRegistryDao.registryDelete(registryParam.getRegistryGroup(), registryParam.getRegistryKey(), registryParam.getRegistryValue());
if (ret > 0) { if (ret > 0) {
// fresh // fresh