|
|
@@ -6,10 +6,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import com.template.api.SmartDataTaskControllerAPI;
|
|
|
import com.template.common.utils.CommonUtil;
|
|
|
import com.template.common.utils.paramUtils;
|
|
|
-import com.template.model.pojo.SmartDataSourceLog;
|
|
|
-import com.template.model.pojo.SmartDataTask;
|
|
|
-import com.template.model.pojo.SmartDataTaskDebug;
|
|
|
-import com.template.model.pojo.SmartDataTaskLog;
|
|
|
+import com.template.model.pojo.*;
|
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.model.result.PageUtils;
|
|
|
import com.template.services.SmartDataSourceLogService;
|
|
|
@@ -19,6 +16,7 @@ import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -469,5 +467,33 @@ public class SmartDataTaskController implements SmartDataTaskControllerAPI {
|
|
|
|
|
|
return CommonResult.ok(result);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult queryTaskDebugSql() {
|
|
|
+ List<SmartDataTaskSetDebugSql> result = smartDataTaskService.queryTaskDebugSql();
|
|
|
+ if (result.size() > 0) {
|
|
|
+ return CommonResult.ok(result);
|
|
|
+ } else {
|
|
|
+ return CommonResult.fail("没有任何任务");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult queryTaskSetDebugSql(int tkId, int tkDebugSql) {
|
|
|
+ int count = smartDataTaskService.queryTaskSetDebugSql(tkId, tkDebugSql);
|
|
|
+ if (count > 0) {
|
|
|
+ if (tkDebugSql == 1) {
|
|
|
+ return CommonResult.ok("启用调试成功");
|
|
|
+ } else {
|
|
|
+ return CommonResult.ok("关闭调试成功");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (tkDebugSql == 1) {
|
|
|
+ return CommonResult.ok("启用调试失败");
|
|
|
+ } else {
|
|
|
+ return CommonResult.ok("关闭调试失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|