|
@ -6,12 +6,16 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 任务启动
|
|
* 任务启动
|
|
@ -23,9 +27,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|
@Api(description = "后台-任务控制")
|
|
@Api(description = "后台-任务控制")
|
|
public class JobController extends BaseController {
|
|
public class JobController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private JobService jobService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JobService jobService;
|
|
|
|
@Autowired
|
|
|
|
private StringRedisTemplate redisTemplate;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动任务
|
|
* 启动任务
|
|
@ -36,7 +40,7 @@ public class JobController extends BaseController {
|
|
@ApiOperation(value = "根据ID立即单个任务")
|
|
@ApiOperation(value = "根据ID立即单个任务")
|
|
@RequestMapping(value = "startNowById", method = RequestMethod.GET)
|
|
@RequestMapping(value = "startNowById", method = RequestMethod.GET)
|
|
public String startNowById(
|
|
public String startNowById(
|
|
@ApiParam(name = "id", value = "任务ID", required = true)@RequestParam(value = "id", required = true) String id) {
|
|
|
|
|
|
@ApiParam(name = "id", value = "任务ID", required = true) @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.startNowById(id);
|
|
jobService.startNowById(id);
|
|
@ -55,7 +59,7 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去几天的数据")
|
|
@ApiOperation(value = "生成过去几天的数据")
|
|
@RequestMapping(value = "productDataByDay", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByDay", method = RequestMethod.GET)
|
|
public String productDataByDay( @ApiParam(name = "day", value = "距离今天的天数(如果是要生成昨天的数据,day=1)")@RequestParam(value = "day", required = true) int day) {
|
|
|
|
|
|
public String productDataByDay(@ApiParam(name = "day", value = "距离今天的天数(如果是要生成昨天的数据,day=1)") @RequestParam(value = "day", required = true) int day) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByDay(day);
|
|
jobService.productDataByDay(day);
|
|
@ -74,7 +78,7 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去某一天的全部的数据")
|
|
@ApiOperation(value = "生成过去某一天的全部的数据")
|
|
@RequestMapping(value = "productDataByOneDay", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByOneDay", method = RequestMethod.GET)
|
|
public String productDataByOneDay( @ApiParam(name = "day", value = "yyyy-MM-dd")@RequestParam(value = "day", required = true)String day) {
|
|
|
|
|
|
public String productDataByOneDay(@ApiParam(name = "day", value = "yyyy-MM-dd") @RequestParam(value = "day", required = true) String day) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByOneDay(day);
|
|
jobService.productDataByOneDay(day);
|
|
@ -84,6 +88,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去某一天到某一天的全部的数据
|
|
* 生成过去某一天到某一天的全部的数据
|
|
*
|
|
*
|
|
@ -93,17 +98,18 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去某一天到某一天的全部的数据(包含头尾)")
|
|
@ApiOperation(value = "生成过去某一天到某一天的全部的数据(包含头尾)")
|
|
@RequestMapping(value = "productDataByDayToDay", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByDayToDay", method = RequestMethod.GET)
|
|
public String productDataByDayToDay( @ApiParam(name = "start", value = "yyyy-MM-dd", required = true)@RequestParam(value = "start", required = true)String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd", required = true)@RequestParam(value = "end", required = true)String end) {
|
|
|
|
|
|
public String productDataByDayToDay(@ApiParam(name = "start", value = "yyyy-MM-dd", required = true) @RequestParam(value = "start", required = true) String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd", required = true) @RequestParam(value = "end", required = true) String end) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByDayToDay(start,end);
|
|
|
|
|
|
jobService.productDataByDayToDay(start, end);
|
|
return success("启动成功!");
|
|
return success("启动成功!");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去某一天到某一天的某个指标的数据
|
|
* 生成过去某一天到某一天的某个指标的数据
|
|
*
|
|
*
|
|
@ -113,18 +119,19 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去某一天到某一天的某个指标的数据(包含头尾)")
|
|
@ApiOperation(value = "生成过去某一天到某一天的某个指标的数据(包含头尾)")
|
|
@RequestMapping(value = "productDataByDayToDayAndId", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByDayToDayAndId", method = RequestMethod.GET)
|
|
public String productDataByDayToDayAndId( @ApiParam(name = "start", value = "yyyy-MM-dd")@RequestParam(value = "start", required = true)String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd")@RequestParam(value = "end", required = true)String end,
|
|
|
|
@ApiParam(name = "id", value = "任务id")@RequestParam(value = "id", required = true)String id) {
|
|
|
|
|
|
public String productDataByDayToDayAndId(@ApiParam(name = "start", value = "yyyy-MM-dd") @RequestParam(value = "start", required = true) String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd") @RequestParam(value = "end", required = true) String end,
|
|
|
|
@ApiParam(name = "id", value = "任务id") @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByDayToDayAndId(start,end,id);
|
|
|
|
|
|
jobService.productDataByDayToDayAndId(start, end, id);
|
|
return success("启动成功!");
|
|
return success("启动成功!");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去某一天的某一个指标的数据
|
|
* 生成过去某一天的某一个指标的数据
|
|
*
|
|
*
|
|
@ -134,8 +141,8 @@ public class JobController extends BaseController {
|
|
@ApiOperation(value = "生成过去某一天的全部的数据")
|
|
@ApiOperation(value = "生成过去某一天的全部的数据")
|
|
@RequestMapping(value = "productDataByOneDayWithId", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByOneDayWithId", method = RequestMethod.GET)
|
|
public String productDataByOneDayWithId(
|
|
public String productDataByOneDayWithId(
|
|
@ApiParam(name = "day", value = "yyyy-MM-dd")@RequestParam(value = "day", required = true)String day,
|
|
|
|
@ApiParam(name = "id", value = "任务id")@RequestParam(value = "id", required = true)String id) {
|
|
|
|
|
|
@ApiParam(name = "day", value = "yyyy-MM-dd") @RequestParam(value = "day", required = true) String day,
|
|
|
|
@ApiParam(name = "id", value = "任务id") @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByOneDayWithId(day, id);
|
|
jobService.productDataByOneDayWithId(day, id);
|
|
@ -145,6 +152,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去到现在的全部的数据
|
|
* 生成过去到现在的全部的数据
|
|
*
|
|
*
|
|
@ -154,8 +162,8 @@ public class JobController extends BaseController {
|
|
@ApiOperation(value = "生成过去到现在的全部的数据")
|
|
@ApiOperation(value = "生成过去到现在的全部的数据")
|
|
@RequestMapping(value = "productDataByDayAndId", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productDataByDayAndId", method = RequestMethod.GET)
|
|
public String productDataByDayAndId(
|
|
public String productDataByDayAndId(
|
|
@ApiParam(name = "day", value = "距离今天的天数(如果是要生成昨天的数据,day=1)")@RequestParam(value = "day", required = true) int day,
|
|
|
|
@ApiParam(name="id",required=true)@RequestParam(value = "id", required = true) String id) {
|
|
|
|
|
|
@ApiParam(name = "day", value = "距离今天的天数(如果是要生成昨天的数据,day=1)") @RequestParam(value = "day", required = true) int day,
|
|
|
|
@ApiParam(name = "id", required = true) @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.cleanCache();
|
|
jobService.cleanCache();
|
|
jobService.productDataByDayAndId(day, id);
|
|
jobService.productDataByDayAndId(day, id);
|
|
@ -171,11 +179,11 @@ public class JobController extends BaseController {
|
|
*
|
|
*
|
|
* @param id id
|
|
* @param id id
|
|
* @return
|
|
* @return
|
|
*/
|
|
|
|
|
|
*/
|
|
@ApiOperation(value = "启动单个任务")
|
|
@ApiOperation(value = "启动单个任务")
|
|
@RequestMapping(value = "startById", method = RequestMethod.GET)
|
|
@RequestMapping(value = "startById", method = RequestMethod.GET)
|
|
public String startById(
|
|
public String startById(
|
|
@ApiParam(name="id",value="任务id",required=true)@RequestParam(value = "id", required = true) String id) {
|
|
|
|
|
|
@ApiParam(name = "id", value = "任务id", required = true) @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.startById(id);
|
|
jobService.startById(id);
|
|
return success("启动成功!");
|
|
return success("启动成功!");
|
|
@ -193,7 +201,7 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "停止单个任务")
|
|
@ApiOperation(value = "停止单个任务")
|
|
@RequestMapping(value = "stopById", method = RequestMethod.GET)
|
|
@RequestMapping(value = "stopById", method = RequestMethod.GET)
|
|
public String stopById(@ApiParam(name="id",value="任务id",required=true)@RequestParam(value = "id", required = true)String id) {
|
|
|
|
|
|
public String stopById(@ApiParam(name = "id", value = "任务id", required = true) @RequestParam(value = "id", required = true) String id) {
|
|
try {
|
|
try {
|
|
jobService.stopById(id);
|
|
jobService.stopById(id);
|
|
return success("停止成功!");
|
|
return success("停止成功!");
|
|
@ -219,6 +227,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动判断的任务
|
|
* 启动判断的任务
|
|
*
|
|
*
|
|
@ -235,6 +244,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 停止判断的任务
|
|
* 停止判断的任务
|
|
*
|
|
*
|
|
@ -251,6 +261,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动判断的任务
|
|
* 启动判断的任务
|
|
*
|
|
*
|
|
@ -267,6 +278,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 停止判断的任务
|
|
* 停止判断的任务
|
|
*
|
|
*
|
|
@ -283,6 +295,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动所有任务
|
|
* 启动所有任务
|
|
*
|
|
*
|
|
@ -299,6 +312,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "清除緩存")
|
|
@ApiOperation(value = "清除緩存")
|
|
@RequestMapping(value = "cleanCache", method = RequestMethod.GET)
|
|
@RequestMapping(value = "cleanCache", method = RequestMethod.GET)
|
|
public String cleanCache() {
|
|
public String cleanCache() {
|
|
@ -310,17 +324,19 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查看緩存情况")
|
|
@ApiOperation(value = "查看緩存情况")
|
|
@RequestMapping(value = "seeCache", method = RequestMethod.GET)
|
|
@RequestMapping(value = "seeCache", method = RequestMethod.GET)
|
|
public String seeCache() {
|
|
public String seeCache() {
|
|
try {
|
|
try {
|
|
String message=jobService.seeCache();
|
|
|
|
return write(200,message);
|
|
|
|
|
|
String message = jobService.seeCache();
|
|
|
|
return write(200, message);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动健康信息生成的任务
|
|
* 启动健康信息生成的任务
|
|
*
|
|
*
|
|
@ -337,6 +353,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "立即启动健康信息生成的任务")
|
|
@ApiOperation(value = "立即启动健康信息生成的任务")
|
|
@RequestMapping(value = "startHealthMessageJobNow", method = RequestMethod.GET)
|
|
@RequestMapping(value = "startHealthMessageJobNow", method = RequestMethod.GET)
|
|
public String startHealthMessageJobNow() {
|
|
public String startHealthMessageJobNow() {
|
|
@ -348,6 +365,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 停止判断的任务
|
|
* 停止判断的任务
|
|
*
|
|
*
|
|
@ -365,7 +383,7 @@ public class JobController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//@RequestMapping(value = "startaaaa", method = RequestMethod.GET)
|
|
|
|
|
|
//@RequestMapping(value = "startaaaa", method = RequestMethod.GET)
|
|
public String startaaaa() {
|
|
public String startaaaa() {
|
|
try {
|
|
try {
|
|
jobService.startaaaa();
|
|
jobService.startaaaa();
|
|
@ -375,6 +393,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去某一天的健康消息
|
|
* 生成过去某一天的健康消息
|
|
*
|
|
*
|
|
@ -383,8 +402,8 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去某一天的健康消息")
|
|
@ApiOperation(value = "生成过去某一天的健康消息")
|
|
@RequestMapping(value = "productHealthDataByOneDay", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productHealthDataByOneDay", method = RequestMethod.GET)
|
|
public String productHealthDataByOneDay( @ApiParam(name = "day", value = "yyyy-MM-dd")
|
|
|
|
@RequestParam(value = "day", required = true)String day) {
|
|
|
|
|
|
public String productHealthDataByOneDay(@ApiParam(name = "day", value = "yyyy-MM-dd")
|
|
|
|
@RequestParam(value = "day", required = true) String day) {
|
|
try {
|
|
try {
|
|
jobService.productHealthDataByOneDay(day);
|
|
jobService.productHealthDataByOneDay(day);
|
|
return success("启动成功!");
|
|
return success("启动成功!");
|
|
@ -393,6 +412,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成过去某一天到某一天的某个指标的数据
|
|
* 生成过去某一天到某一天的某个指标的数据
|
|
*
|
|
*
|
|
@ -402,11 +422,11 @@ public class JobController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "生成过去某一天到某一天的健康消息(包含头尾)")
|
|
@ApiOperation(value = "生成过去某一天到某一天的健康消息(包含头尾)")
|
|
@RequestMapping(value = "productHealthDataByDayToDay", method = RequestMethod.GET)
|
|
@RequestMapping(value = "productHealthDataByDayToDay", method = RequestMethod.GET)
|
|
public String productHealthDataByDayToDay( @ApiParam(name = "start", value = "yyyy-MM-dd")@RequestParam(value = "start", required = true)String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd")@RequestParam(value = "end", required = true)String end
|
|
|
|
) {
|
|
|
|
|
|
public String productHealthDataByDayToDay(@ApiParam(name = "start", value = "yyyy-MM-dd") @RequestParam(value = "start", required = true) String start,
|
|
|
|
@ApiParam(name = "end", value = "yyyy-MM-dd") @RequestParam(value = "end", required = true) String end
|
|
|
|
) {
|
|
try {
|
|
try {
|
|
jobService.productHealthDataByDayToDay(start,end);
|
|
|
|
|
|
jobService.productHealthDataByDayToDay(start, end);
|
|
return success("启动成功!");
|
|
return success("启动成功!");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
@ -430,6 +450,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 停止每天的统计报表任务
|
|
* 停止每天的统计报表任务
|
|
*
|
|
*
|
|
@ -446,6 +467,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动通知任务
|
|
* 启动通知任务
|
|
*
|
|
*
|
|
@ -462,6 +484,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动通知任务
|
|
* 启动通知任务
|
|
*
|
|
*
|
|
@ -478,6 +501,7 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动通知任务
|
|
* 启动通知任务
|
|
*
|
|
*
|
|
@ -495,7 +519,9 @@ public class JobController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/******************************** 随访计划消息 ****************************************************/
|
|
|
|
|
|
/********************************
|
|
|
|
* 随访计划消息
|
|
|
|
****************************************************/
|
|
|
|
|
|
@ApiOperation(value = "启动随访计划消息任务")
|
|
@ApiOperation(value = "启动随访计划消息任务")
|
|
@RequestMapping(value = "startFollowupPlantJob", method = RequestMethod.GET)
|
|
@RequestMapping(value = "startFollowupPlantJob", method = RequestMethod.GET)
|
|
@ -520,4 +546,16 @@ public class JobController extends BaseController {
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
return invalidUserException(e, -1, "启动失败:" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "addRedisKey", method = RequestMethod.POST)
|
|
|
|
public void addRedisKey() {
|
|
|
|
try {
|
|
|
|
String key="cwd:"+new Random().toString();
|
|
|
|
redisTemplate.opsForValue().set(key,"123");
|
|
|
|
redisTemplate.expire(key,10, TimeUnit.SECONDS);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|