|
|
@@ -3,8 +3,8 @@ package com.template.controller;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
-import com.template.annotation.DESRespondSecret;
|
|
|
import com.template.api.SmartDataTaskControllerAPI;
|
|
|
+import com.template.common.utils.AesUtils;
|
|
|
import com.template.common.utils.CommonUtil;
|
|
|
import com.template.common.utils.paramUtils;
|
|
|
import com.template.model.pojo.*;
|
|
|
@@ -12,6 +12,7 @@ import com.template.model.result.CommonResult;
|
|
|
import com.template.model.result.PageUtils;
|
|
|
import com.template.services.SmartDataSourceLogService;
|
|
|
import com.template.services.SmartDataTaskService;
|
|
|
+import com.template.services.SmartUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -29,18 +30,18 @@ import java.util.Map;
|
|
|
* @since 2023-12-05
|
|
|
*/
|
|
|
@RestController
|
|
|
-//返回参数加密注解
|
|
|
-@DESRespondSecret
|
|
|
public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
|
|
|
@Autowired
|
|
|
private SmartDataTaskService smartDataTaskService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private SmartUserService smartUserService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private SmartDataSourceLogService smartDataSourceLogService;
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult createJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -51,6 +52,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("创建定时任务|【数据交换中心】→【数据源数据交换任务】|创建【定时任务】|create", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.createJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -60,7 +66,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult pauseJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -71,6 +76,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("暂停定时任务|【数据交换中心】→【数据源数据交换任务】|暂停【定时任务】|pause", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.pauseJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -80,7 +90,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult resumeJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -91,6 +100,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("恢复定时任务|【数据交换中心】→【数据源数据交换任务】|恢复【定时任务】|resume", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.resumeJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -100,7 +114,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult updateJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -110,6 +123,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("更新定时任务|【数据交换中心】→【数据源数据交换任务】|更新【定时任务】|update", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.updateJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -119,7 +137,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult deleteJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -130,6 +147,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("删除定时任务|【数据交换中心】→【数据源数据交换任务】|删除【定时任务】|delete", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.deleteJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -139,7 +161,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult runOnceJob(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -150,6 +171,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("执行1次定时任务|【数据交换中心】→【数据源数据交换任务】|执行1次【定时任务】|runOnce", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.runOnceJob(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -174,7 +200,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* 同步策略
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult getSyncPolicy() {
|
|
|
Map<String, Object> result = smartDataTaskService.getSyncPolicy();
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
@@ -188,7 +213,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* 交换方式
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult getExchangeType() {
|
|
|
Map<String, Object> result = smartDataTaskService.getExchangeType();
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
@@ -212,7 +236,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult getTables(String json) {
|
|
|
// 获取数据源id对应的数据源
|
|
|
Map<String, Object> result = smartDataTaskService.getTables(json);
|
|
|
@@ -224,7 +247,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult getViews(String json) {
|
|
|
// 获取数据源id对应的数据源
|
|
|
Map<String, Object> result = smartDataTaskService.getViews(json);
|
|
|
@@ -243,7 +265,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult insertSmartDataTask1(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -254,6 +275,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("新增数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|新增【任务-任务基本信息】|create", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.insertSmartDataTask1(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -263,7 +289,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult insertSmartDataTask2(JSONObject json, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -274,6 +299,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("新增数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|新增【任务-字段配置】|create", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.insertSmartDataTask2(json);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -283,7 +313,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult insertSmartDataTask3(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -294,6 +323,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("新增数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|新增【任务-定时信息】|create", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.insertSmartDataTask3(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -310,7 +344,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult updateSmartDataTaskById1(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -322,6 +355,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("更新数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|编辑【任务-任务基本信息】|update", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.updateSmartDataTaskById1(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -331,7 +369,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult updateSmartDataTaskById2(JSONObject json, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -342,6 +379,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("更新数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|编辑【任务-字段配置】|update", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.updateSmartDataTaskById2(json);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -351,7 +393,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult updateSmartDataTaskById3(SmartDataTask smartDataTask, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -362,6 +403,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("更新数据源数据交换任务|【数据交换中心】→【数据源数据交换任务】|编辑【任务-定时信息】|update", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.updateSmartDataTaskById3(smartDataTask);
|
|
|
if (Integer.parseInt((String) result.get("code")) == 0) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -379,7 +425,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryPageSmartDataTasks(int currentPage, int pageCount, SmartDataTask smartDataTask) {
|
|
|
PageUtils<SmartDataTask> result = smartDataTaskService.queryPageSmartDataTasks(currentPage, pageCount, smartDataTask);
|
|
|
|
|
|
@@ -394,7 +439,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult deleteSmartDataTaskById(int id, int delMethod, HttpServletRequest httpServletRequest) {
|
|
|
|
|
|
SmartDataTask smartDataTask = smartDataTaskService.getSmartById(id);
|
|
|
@@ -426,6 +470,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
Map<String, Object> result = smartDataTaskService.deleteSmartDataTaskById(id, delMethod);
|
|
|
if (result.get("code") == "0") {
|
|
|
if (smartDataSourceLog != null) {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
}
|
|
|
@@ -435,6 +484,16 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private String getName(HttpServletRequest httpServletRequest) {
|
|
|
+ String userHead = httpServletRequest.getHeader("User_head");
|
|
|
+ String userID = AesUtils.decrypt(userHead);
|
|
|
+ SmartUser operateData = smartUserService.getSmartById(Integer.valueOf(userID));
|
|
|
+ if (operateData == null) {
|
|
|
+ return "用户信息不合法,无法查看";
|
|
|
+ }
|
|
|
+ return operateData.getName();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询任务运行日志分页列表
|
|
|
*
|
|
|
@@ -446,7 +505,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return 返回
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryPageSmartDataTaskDebug(int currentPage, int pageCount, Integer eTaskId, String startTime, String endTime) {
|
|
|
PageInfo<SmartDataTaskDebug> result = smartDataTaskService.queryPageSmartDataTaskDebug(currentPage, pageCount, eTaskId, startTime, endTime);
|
|
|
|
|
|
@@ -462,7 +520,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
* @return 返回
|
|
|
*/
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult delSmartDataTaskDebugByIds(JSONObject json, HttpServletRequest httpServletRequest, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
String st = paramUtils.getParamError(bindingResult);
|
|
|
@@ -473,6 +530,11 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
CommonUtil.generateLog("删除任务运行日志数据|【数据交换中心】→【任务运行日志】|删除【任务运行日志数据】|delete", httpServletRequest);
|
|
|
Map<String, Object> result = smartDataTaskService.deleteSmartDataTaskDebugByIds(json);
|
|
|
if (result.get("code") == "0") {
|
|
|
+ String creater_people = getName(httpServletRequest);
|
|
|
+ if (creater_people.equals("用户信息不合法,无法查看")) {
|
|
|
+ return CommonResult.fail(creater_people);
|
|
|
+ }
|
|
|
+ smartDataSourceLog.setLogActionPeople(creater_people);
|
|
|
smartDataSourceLog.setLogActionStatus(1);
|
|
|
smartDataSourceLogService.insertSmartDataSourceLog(smartDataSourceLog);
|
|
|
return CommonResult.ok(result.get("msg"));
|
|
|
@@ -482,7 +544,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryPageSmartDataTaskLog(int currentPage, int pageCount, Integer eTaskId, String tkLogTaskName, Integer tkLogAutoManual,
|
|
|
Integer tkLogDsSourceId, Integer tkLogDsDestinationId,
|
|
|
Integer tkLogCostTime, Integer tkLogExeStatus, String startTime, String endTime) {
|
|
|
@@ -493,7 +554,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryAllTask() {
|
|
|
List<SmartDataTask> result = smartDataTaskService.queryAllTask();
|
|
|
if (result.size() > 0) {
|
|
|
@@ -502,9 +562,7 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
return CommonResult.fail("没有任何任务");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryTaskDebugSql() {
|
|
|
List<SmartDataTaskSetDebugSql> result = smartDataTaskService.queryTaskDebugSql();
|
|
|
if (result.size() > 0) {
|
|
|
@@ -515,7 +573,6 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @DESRespondSecret(validated = true)
|
|
|
public CommonResult queryTaskSetDebugSql(int tkId, int tkDebugSql) {
|
|
|
int count = smartDataTaskService.queryTaskSetDebugSql(tkId, tkDebugSql);
|
|
|
if (count > 0) {
|