mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-25 08:05:12 +00:00
修改代码规范
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
/**
|
||||
* AttachmentInfo.java
|
||||
* Created at 2017-05-29
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.core.domain.mail;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/**
|
||||
* InlineInfo.java
|
||||
* Created at 2017-05-29
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.core.domain.mail;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
@@ -170,8 +170,7 @@ public class DateUtil {
|
||||
* @return 转化后的日期时间.
|
||||
* @throws ParseException 异常
|
||||
*/
|
||||
public static String stringToTimezone(String srcFormater, String srcDateTime, String dstFormater,
|
||||
String dstTimeZoneId) throws ParseException {
|
||||
public static String stringToTimezone(String srcFormater, String srcDateTime, String dstFormater, String dstTimeZoneId) throws ParseException { //NOSONAR
|
||||
if (srcFormater == null || "".equals(srcFormater)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class CorsConfig {
|
||||
* @return WebMvcConfigurer
|
||||
*/
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() { //NOSONAR
|
||||
return new WebMvcConfigurerAdapter() {
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurerAdapter() { //NOSONAR
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
//扫描地址
|
||||
|
||||
@@ -28,7 +28,7 @@ import javax.validation.Valid;
|
||||
@Api(value = "邮件服务", consumes = "application/json", produces = "application/json",
|
||||
protocols = "http")
|
||||
@RequestMapping(value = "/service/mail")
|
||||
public interface IMailController {
|
||||
public interface IMailController { //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 发送邮件
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public interface IExecutor {
|
||||
public interface IExecutor { //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 执行方法
|
||||
|
||||
+7
-9
@@ -6,18 +6,16 @@
|
||||
*/
|
||||
package org.itkk.udf.scheduler.client.web;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobParam;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobResult;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobParam;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobResult;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* 描述 : ISchClientController
|
||||
@@ -27,7 +25,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
@Api(value = "计划任务客户端", consumes = "application/json", produces = "application/json",
|
||||
protocols = "http")
|
||||
@RequestMapping(value = "/service/scheduler/client")
|
||||
public interface ISchClientController {
|
||||
public interface ISchClientController { //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 执行计划任务
|
||||
|
||||
@@ -41,8 +41,7 @@ public class RmsJob extends AbstractBaseJob {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RmsJob.class);
|
||||
|
||||
@Override
|
||||
protected void executeInternal(JobExecutionContext jobExecutionContext)
|
||||
throws JobExecutionException {
|
||||
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException { //NOSONAR
|
||||
//从trigger中获得jobDataMap
|
||||
JobDataMap jobDataMap = jobExecutionContext.getTrigger().getJobDataMap();
|
||||
//获得必要字段
|
||||
|
||||
+3
-15
@@ -1,28 +1,16 @@
|
||||
/**
|
||||
* SchListener.java
|
||||
* Created at 2017-06-01
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.scheduler.listener;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.quartz.JobDetail;
|
||||
import org.quartz.JobKey;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.quartz.SchedulerListener;
|
||||
import org.quartz.Trigger;
|
||||
import org.quartz.TriggerKey;
|
||||
import org.itkk.udf.scheduler.IListenerLog;
|
||||
import org.quartz.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import org.itkk.udf.scheduler.IListenerLog;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ClassName: SchedulerListener
|
||||
* ClassName: SchListener
|
||||
* </p>
|
||||
* <p>
|
||||
* Description: 计划任务监听器
|
||||
|
||||
@@ -103,14 +103,12 @@ public class JobService {
|
||||
jobDataMap = new JobDataMap(jobDetailMeta.getDataMap());
|
||||
}
|
||||
//实例化作业
|
||||
JobDetail jobDetail =
|
||||
JobBuilder.newJob(((Class<Job>) Class.forName(jobDetailMeta.getClassName())))
|
||||
.withIdentity(jobKey).withDescription(jobDetailMeta.getDescription())
|
||||
.requestRecovery(jobDetailMeta.getRecovery())
|
||||
.storeDurably(jobDetailMeta.getDurability()).setJobData(jobDataMap).build();
|
||||
JobDetail jobDetail = JobBuilder.newJob(((Class<Job>) Class.forName(jobDetailMeta.getClassName()))) //NOSONAR
|
||||
.withIdentity(jobKey).withDescription(jobDetailMeta.getDescription())
|
||||
.requestRecovery(jobDetailMeta.getRecovery())
|
||||
.storeDurably(jobDetailMeta.getDurability()).setJobData(jobDataMap).build();
|
||||
// 添加job
|
||||
sch.addJob(jobDetail, true, !jobDetailMeta.getDurability());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/**
|
||||
* TriggerService.java
|
||||
* Created at 2017-06-02
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.scheduler.service;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
+6
-8
@@ -6,17 +6,15 @@
|
||||
*/
|
||||
package org.itkk.udf.scheduler.web;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobResult;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
import org.itkk.udf.scheduler.client.domain.RmsJobResult;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* 描述 : ISchClientCallbackController
|
||||
@@ -26,7 +24,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
@Api(value = "调度客户端回调服务", consumes = "application/json", produces = "application/json",
|
||||
protocols = "http")
|
||||
@RequestMapping(value = "/service/scheduler/client/callback")
|
||||
public interface ISchClientCallbackController {
|
||||
public interface ISchClientCallbackController { //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 客户端回调
|
||||
|
||||
+5
-7
@@ -6,16 +6,14 @@
|
||||
*/
|
||||
package org.itkk.udf.scheduler.web;
|
||||
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.itkk.udf.core.RestResponse;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* 描述 : IJobController
|
||||
@@ -25,7 +23,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
@Api(value = "调度服务", consumes = "application/json", produces = "application/json",
|
||||
protocols = "http")
|
||||
@RequestMapping(value = "/service/scheduler")
|
||||
public interface ISchedulerController {
|
||||
public interface ISchedulerController { //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 清理数据
|
||||
|
||||
Reference in New Issue
Block a user