Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
540541a6
Commit
540541a6
authored
Apr 29, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善界面的接口及部分BUG修改
parent
15a2087a
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
408 additions
and
61 deletions
+408
-61
FlowVersionViewController.java
...rc/main/java/com/byit/view/FlowVersionViewController.java
+4
-2
FlowViewController.java
...admin/src/main/java/com/byit/view/FlowViewController.java
+8
-6
JavaTaskViewController.java
...n/src/main/java/com/byit/view/JavaTaskViewController.java
+32
-0
RunLogViewController.java
...min/src/main/java/com/byit/view/RunLogViewController.java
+11
-0
RunRecordingViewController.java
...c/main/java/com/byit/view/RunRecordingViewController.java
+10
-8
WorkspaceViewController.java
.../src/main/java/com/byit/view/WorkspaceViewController.java
+27
-0
FlowConditionDto.java
...min-core/src/main/java/com/byit/dto/FlowConditionDto.java
+16
-0
FlowEventListener.java
...re/src/main/java/com/byit/listener/FlowEventListener.java
+2
-1
FlowMapper.java
...-admin-core/src/main/java/com/byit/mapper/FlowMapper.java
+4
-0
FlowVersionMapper.java
...core/src/main/java/com/byit/mapper/FlowVersionMapper.java
+2
-0
JavaTaskMapper.java
...in-core/src/main/java/com/byit/mapper/JavaTaskMapper.java
+1
-0
JobTaskRunLogMapper.java
...re/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
+5
-1
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+4
-3
WorkspaceMapper.java
...n-core/src/main/java/com/byit/mapper/WorkspaceMapper.java
+6
-0
RunRecording.java
...admin-core/src/main/java/com/byit/model/RunRecording.java
+3
-0
JavaTaskLogImportantVo.java
...c/main/java/com/byit/model/vo/JavaTaskLogImportantVo.java
+15
-0
RunLogVo.java
...-admin-core/src/main/java/com/byit/model/vo/RunLogVo.java
+1
-0
FlowService.java
...dmin-core/src/main/java/com/byit/service/FlowService.java
+5
-3
FlowVersionService.java
...re/src/main/java/com/byit/service/FlowVersionService.java
+2
-1
JavaTaskService.java
...-core/src/main/java/com/byit/service/JavaTaskService.java
+12
-0
JobTaskRunLogService.java
.../src/main/java/com/byit/service/JobTaskRunLogService.java
+3
-1
RunRecordingService.java
...e/src/main/java/com/byit/service/RunRecordingService.java
+5
-4
WorkspaceService.java
...core/src/main/java/com/byit/service/WorkspaceService.java
+16
-0
FlowServiceImpl.java
.../src/main/java/com/byit/service/impl/FlowServiceImpl.java
+8
-6
FlowVersionServiceImpl.java
...in/java/com/byit/service/impl/FlowVersionServiceImpl.java
+3
-2
JavaTaskServiceImpl.java
.../main/java/com/byit/service/impl/JavaTaskServiceImpl.java
+21
-0
JobTaskRunLogServiceImpl.java
.../java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
+18
-1
RunRecordingServiceImpl.java
...n/java/com/byit/service/impl/RunRecordingServiceImpl.java
+9
-8
WorkspaceServiceImpl.java
...main/java/com/byit/service/impl/WorkspaceServiceImpl.java
+25
-0
JavaTaskJobTask.java
...min-core/src/main/java/com/byit/task/JavaTaskJobTask.java
+1
-1
JavaTaskCallbackThread.java
...src/main/java/com/byit/thread/JavaTaskCallbackThread.java
+2
-0
LogCallbackThread.java
...core/src/main/java/com/byit/thread/LogCallbackThread.java
+8
-1
FailedRetryThreadRunHelper.java
...va/com/byit/thread/helper/FailedRetryThreadRunHelper.java
+2
-1
FlowThreadRunHelper.java
...main/java/com/byit/thread/helper/FlowThreadRunHelper.java
+1
-1
FlowMapper.xml
.../myth-admin-core/src/main/resources/mapper/FlowMapper.xml
+15
-0
FlowVersionMapper.xml
...dmin-core/src/main/resources/mapper/FlowVersionMapper.xml
+12
-0
JavaTaskMapper.xml
...h-admin-core/src/main/resources/mapper/JavaTaskMapper.xml
+12
-0
JobTaskRunLogMapper.xml
...in-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
+24
-2
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+41
-6
WorkspaceMapper.xml
...-admin-core/src/main/resources/mapper/WorkspaceMapper.xml
+6
-0
PluginRpcResponsePacket.java
...ava/com/byit/packet/response/PluginRpcResponsePacket.java
+1
-0
PluginClientInitialization.java
...c/main/java/com/byit/init/PluginClientInitialization.java
+4
-1
SentEmailServer.java
...g-boot/src/main/java/com/byit/server/SentEmailServer.java
+1
-1
No files found.
byit-myth-admin/src/main/java/com/byit/view/FlowVersionViewController.java
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.vo.FlowImportantAllVo
;
import
com.byit.model.vo.FlowVersionDetailedVo
;
import
com.byit.model.vo.FlowVersionVo
;
import
com.byit.service.FlowVersionService
;
import
com.byit.model.vo.FlowVersionVoDep
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -30,8 +32,8 @@ public class FlowVersionViewController {
}
@PostMapping
(
"findAllVersion"
)
public
List
<
FlowVersionVo
>
findAllVersion
(){
return
flowVersionService
.
findAllVersion
();
public
List
<
FlowVersionVo
>
findAllVersion
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
flowVersionService
.
findAllVersion
(
flowConditionDto
);
}
@RequestMapping
(
"findAllByFlowId"
)
public
List
<
FlowVersionDetailedVo
>
findAllByFlowId
(
Integer
flowId
)
{
...
...
byit-myth-admin/src/main/java/com/byit/view/FlowViewController.java
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.Flow
;
import
com.byit.model.vo.FlowImportantAllVo
;
import
com.byit.model.vo.FlowViewVo
;
import
com.byit.service.FlowService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -24,13 +26,13 @@ public class FlowViewController {
}
@PostMapping
(
"findAllThisVersionFlow"
)
public
List
<
Flow
>
findAllThisVersionFlow
(){
return
flowService
.
findAllFlow
();
public
List
<
Flow
>
findAllThisVersionFlow
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
flowService
.
findAllFlow
(
flowConditionDto
);
}
@PostMapping
(
"findAllFlowViewVo"
)
public
List
<
FlowViewVo
>
findAllFlowViewVo
(){
return
flowService
.
findAllFlowViewVo
();
public
List
<
FlowViewVo
>
findAllFlowViewVo
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
flowService
.
findAllFlowViewVo
(
flowConditionDto
);
}
/**
...
...
@@ -38,7 +40,7 @@ public class FlowViewController {
* @return
*/
@PostMapping
(
"findAllFlowImportant"
)
public
List
<
FlowImportantAllVo
>
findAllFlowImportant
()
{
return
flowService
.
findAllFlowImportant
();
public
List
<
FlowImportantAllVo
>
findAllFlowImportant
(
@RequestBody
FlowConditionDto
flowConditionDto
)
{
return
flowService
.
findAllFlowImportant
(
flowConditionDto
);
}
}
byit-myth-admin/src/main/java/com/byit/view/JavaTaskViewController.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.dto.plugin.JavaTask
;
import
com.byit.model.vo.JavaTaskLogImportantVo
;
import
com.byit.service.JavaTaskService
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author huangfu
*/
@RestController
@RequestMapping
(
"view/java"
)
public
class
JavaTaskViewController
{
private
final
JavaTaskService
javaTaskService
;
public
JavaTaskViewController
(
JavaTaskService
javaTaskService
)
{
this
.
javaTaskService
=
javaTaskService
;
}
@RequestMapping
(
"findAll"
)
public
List
<
JavaTask
>
findAll
(
String
jobName
){
return
javaTaskService
.
findAll
(
jobName
);
}
@RequestMapping
(
"findAllJavaTaskLogImportantVo"
)
public
List
<
JavaTaskLogImportantVo
>
findAllJavaTaskLogImportantVo
(
String
jobName
)
{
return
javaTaskService
.
findAllJavaTaskLogImportantVo
(
jobName
);
}
}
byit-myth-admin/src/main/java/com/byit/view/RunLogViewController.java
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.vo.RunLogVo
;
import
com.byit.service.JobTaskRunLogService
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -25,4 +26,14 @@ public class RunLogViewController {
public
List
<
RunLogVo
>
findAllRunLogIdByFlowIdAndRunId
(
@Param
(
"flowId"
)
Integer
flowId
,
@Param
(
"runId"
)
String
runId
){
return
jobTaskRunLogService
.
findAllRunLogIdByFlowIdAndRunId
(
flowId
,
runId
);
}
@RequestMapping
(
"findNodeLogByHandlerName"
)
public
List
<
RunLogVo
>
findNodeLogByHandlerName
(
String
handlerName
){
return
jobTaskRunLogService
.
findNodeLogByHandlerName
(
handlerName
);
}
@RequestMapping
(
"findImmediatelyNode"
)
public
List
<
JobTaskRunLog
>
findImmediatelyNode
(
String
nodeName
)
{
return
jobTaskRunLogService
.
findImmediatelyNode
(
nodeName
);
}
}
byit-myth-admin/src/main/java/com/byit/view/RunRecordingViewController.java
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.RunRecording
;
import
com.byit.model.vo.RunRecordingViewVo
;
import
com.byit.service.RunRecordingService
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -22,19 +24,19 @@ public class RunRecordingViewController {
}
@RequestMapping
(
"findAll"
)
public
List
<
RunRecording
>
findAll
(){
return
runRecordingService
.
findAll
();
public
List
<
RunRecording
>
findAll
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
runRecordingService
.
findAll
(
flowConditionDto
);
}
@RequestMapping
(
"findAllRunIng"
)
public
List
<
RunRecording
>
findAllRunIng
()
{
return
runRecordingService
.
findAllRunIng
();
public
List
<
RunRecording
>
findAllRunIng
(
@RequestBody
FlowConditionDto
flowConditionDto
)
{
return
runRecordingService
.
findAllRunIng
(
flowConditionDto
);
}
@RequestMapping
(
"findAllRunRecordingViewVo"
)
public
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
(){
return
runRecordingService
.
findAllRunRecordingViewVo
();
public
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
runRecordingService
.
findAllRunRecordingViewVo
(
flowConditionDto
);
}
@RequestMapping
(
"findAllError"
)
public
List
<
RunRecordingViewVo
>
findAllError
(){
return
runRecordingService
.
findAllError
();
public
List
<
RunRecordingViewVo
>
findAllError
(
@RequestBody
FlowConditionDto
flowConditionDto
){
return
runRecordingService
.
findAllError
(
flowConditionDto
);
}
}
byit-myth-admin/src/main/java/com/byit/view/WorkspaceViewController.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
view
;
import
com.byit.model.Workspace
;
import
com.byit.service.WorkspaceService
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author huangfu
*/
@RestController
@RequestMapping
(
"view/workspace"
)
public
class
WorkspaceViewController
{
private
final
WorkspaceService
workspaceService
;
public
WorkspaceViewController
(
WorkspaceService
workspaceService
)
{
this
.
workspaceService
=
workspaceService
;
}
@RequestMapping
(
"findAllWorkspace"
)
public
List
<
Workspace
>
findAllWorkspace
(){
return
workspaceService
.
findAll
();
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/dto/FlowConditionDto.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
dto
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.io.Serializable
;
/**
* @author huangfu
*/
@Data
@ToString
public
class
FlowConditionDto
implements
Serializable
{
private
Integer
workspaceId
;
private
String
flowName
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/listener/FlowEventListener.java
View file @
540541a6
...
...
@@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
/**
* 工作流的事件监听操作
* @author huangfu
...
...
@@ -16,7 +18,6 @@ import org.springframework.stereotype.Component;
@Component
@Slf4j
public
class
FlowEventListener
{
private
final
FlowService
flowService
;
public
FlowEventListener
(
FlowService
flowService
)
{
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/FlowMapper.java
View file @
540541a6
package
com
.
byit
.
mapper
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.Flow
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -59,4 +60,6 @@ public interface FlowMapper {
*/
List
<
Flow
>
findAll
();
List
<
Flow
>
findAllByCondition
(
FlowConditionDto
flowConditionDto
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/FlowVersionMapper.java
View file @
540541a6
package
com
.
byit
.
mapper
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.FlowVersion
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -13,6 +14,7 @@ public interface FlowVersionMapper {
* @return
*/
List
<
FlowVersion
>
findAllFlow
();
List
<
FlowVersion
>
findAllFlowCondition
(
FlowConditionDto
flowConditionDto
);
int
deleteById
(
Integer
flowVersionId
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JavaTaskMapper.java
View file @
540541a6
...
...
@@ -8,6 +8,7 @@ import java.util.List;
@Repository
public
interface
JavaTaskMapper
{
List
<
JavaTask
>
findAll
(
String
jobName
);
int
deleteById
(
Integer
id
);
int
insertSelective
(
JavaTask
record
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
View file @
540541a6
...
...
@@ -15,6 +15,8 @@ import java.util.List;
*/
@Repository
public
interface
JobTaskRunLogMapper
{
List
<
JobTaskRunLog
>
findImmediatelyNode
(
String
nodeName
);
/**
* 查询没有结束的节点
* @param nodeIds
...
...
@@ -23,11 +25,13 @@ public interface JobTaskRunLogMapper {
*/
List
<
JobTaskRunLog
>
findJobTaskRunLogNotEndNodeByRunCodeCount
(
@Param
(
"nodeIds"
)
List
<
Integer
>
nodeIds
,
@Param
(
"runId"
)
String
runId
);
List
<
JobTaskRunLogWithBLOBs
>
findNodeLogByHandlerName
(
String
handlerName
);
/**
* 查询失败且重试次数大于0的节点
* @return
*/
List
<
JobTaskRunLog
>
findErrorNode
();
List
<
JobTaskRunLog
WithBLOBs
>
findErrorNode
();
/**
* 查根据flowId和RunId查询一批节点
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
540541a6
package
com
.
byit
.
mapper
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.dto.plugin.StatisticData
;
import
com.byit.model.RunRecording
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -18,19 +19,19 @@ public interface RunRecordingMapper {
* 查询全部的数据
* @return
*/
List
<
RunRecording
>
findAll
();
List
<
RunRecording
>
findAll
(
FlowConditionDto
flowConditionDto
);
/**
* 查询全部错误的节点
* @return
*/
List
<
RunRecording
>
findAllError
();
List
<
RunRecording
>
findAllError
(
FlowConditionDto
flowConditionDto
);
/**
* 查询运行中的数据
* @return
*/
List
<
RunRecording
>
findAllRunIng
();
List
<
RunRecording
>
findAllRunIng
(
FlowConditionDto
flowConditionDto
);
/**
* 查询已经完结的,并且没有告警的任务流
* @return
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/WorkspaceMapper.java
View file @
540541a6
package
com
.
byit
.
mapper
;
import
com.byit.model.Workspace
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
WorkspaceMapper
{
List
<
Workspace
>
findAll
();
int
deleteById
(
Integer
workspaceId
);
int
insertSelective
(
Workspace
record
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/RunRecording.java
View file @
540541a6
...
...
@@ -156,6 +156,9 @@ public class RunRecording implements Serializable {
@ApiModelProperty
(
"重跑的运行标识"
)
private
String
reRunId
;
@ApiModelProperty
(
"工作空间id"
)
private
Integer
workspaceId
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/vo/JavaTaskLogImportantVo.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
model
.
vo
;
import
com.byit.dto.plugin.JavaTask
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* @author Administrator
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
JavaTaskLogImportantVo
extends
JavaTask
{
private
String
rowKey
;
private
boolean
hasChildren
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/vo/RunLogVo.java
View file @
540541a6
...
...
@@ -13,6 +13,7 @@ public class RunLogVo {
private
String
nodeName
;
private
String
jobType
;
private
Integer
failedRemainingCount
;
private
String
handlerName
;
private
String
isVirtual
;
private
Integer
mapFlowId
;
private
String
triggerCode
;
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/FlowService.java
View file @
540541a6
package
com
.
byit
.
service
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.Flow
;
import
com.byit.model.vo.FlowImportantAllVo
;
import
com.byit.model.vo.FlowViewVo
;
import
com.byit.model.vo.FlowVo
;
import
com.byit.model.vo.NodeVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
...
...
@@ -20,14 +22,14 @@ public interface FlowService {
* 查询全部的任务流数据
* @return
*/
List
<
FlowViewVo
>
findAllFlowViewVo
();
List
<
FlowViewVo
>
findAllFlowViewVo
(
FlowConditionDto
flowConditionDto
);
List
<
FlowImportantAllVo
>
findAllFlowImportant
();
List
<
FlowImportantAllVo
>
findAllFlowImportant
(
FlowConditionDto
flowConditionDto
);
/**
* 查询全部的任务流数据
* @return
*/
List
<
Flow
>
findAllFlow
();
List
<
Flow
>
findAllFlow
(
FlowConditionDto
flowConditionDto
);
/**
* 根据ID查询
* @param id
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/FlowVersionService.java
View file @
540541a6
package
com
.
byit
.
service
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.FlowVersion
;
import
com.byit.model.vo.FlowImportantAllVo
;
import
com.byit.model.vo.FlowVersionDetailedVo
;
...
...
@@ -22,7 +23,7 @@ public interface FlowVersionService {
* 查询全部的工作流
* @return
*/
List
<
FlowVersionVo
>
findAllVersion
();
List
<
FlowVersionVo
>
findAllVersion
(
FlowConditionDto
flowConditionDto
);
List
<
FlowVersionDetailedVo
>
findAllByFlowId
(
Integer
flowId
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/JavaTaskService.java
View file @
540541a6
package
com
.
byit
.
service
;
import
com.byit.dto.plugin.JavaTask
;
import
com.byit.model.vo.JavaTaskLogImportantVo
;
import
java.util.List
;
...
...
@@ -10,6 +11,17 @@ import java.util.List;
*/
public
interface
JavaTaskService
{
/**
* 查询全部的task任务
* @return
*/
List
<
JavaTask
>
findAll
(
String
javaTaskName
);
/**
* javaTask主要信息
* @return
*/
List
<
JavaTaskLogImportantVo
>
findAllJavaTaskLogImportantVo
(
String
jobName
);
/**
* 查询当前时间+若干秒内该执行的任务节点
* @param triggerTime
* @return
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/JobTaskRunLogService.java
View file @
540541a6
...
...
@@ -14,7 +14,9 @@ import java.util.List;
**/
public
interface
JobTaskRunLogService
{
List
<
JobTaskRunLog
>
findImmediatelyNode
(
String
nodeName
);
List
<
RunLogVo
>
findNodeLogByHandlerName
(
String
handlerName
);
/**
* 查询没有结束的节点
...
...
@@ -28,7 +30,7 @@ public interface JobTaskRunLogService {
* 查询失败且重试次数大于0的节点
* @return
*/
List
<
JobTaskRunLog
>
findErrorNode
();
List
<
JobTaskRunLog
WithBLOBs
>
findErrorNode
();
/**
* 查根据flowId和RunId查询一批节点
* @param flowId
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/RunRecordingService.java
View file @
540541a6
package
com
.
byit
.
service
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.model.RunRecording
;
import
com.byit.model.vo.RunRecordingViewVo
;
...
...
@@ -14,24 +15,24 @@ public interface RunRecordingService {
* 查询全部数据 映射成VO
* @return
*/
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
();
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
(
FlowConditionDto
flowConditionDt
);
/**
* 查询全部的数据
* @return
*/
List
<
RunRecording
>
findAll
();
List
<
RunRecording
>
findAll
(
FlowConditionDto
flowConditionDto
);
/**
* 查询全部错误的节点
* @return
*/
List
<
RunRecordingViewVo
>
findAllError
();
List
<
RunRecordingViewVo
>
findAllError
(
FlowConditionDto
flowConditionDto
);
/**
* 查询运行中的数据
* @return
*/
List
<
RunRecording
>
findAllRunIng
();
List
<
RunRecording
>
findAllRunIng
(
FlowConditionDto
flowConditionDto
);
/**
* 查询已经完结的,并且没有告警的任务流
* @return
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/WorkspaceService.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
service
;
import
com.byit.model.Workspace
;
import
java.util.List
;
/**
* @author huangfu
*/
public
interface
WorkspaceService
{
/**
* 查询全部工作空间
* @return 返回全部工作空间
*/
List
<
Workspace
>
findAll
();
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/FlowServiceImpl.java
View file @
540541a6
...
...
@@ -3,6 +3,7 @@ package com.byit.service.impl;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.dto.web.ResponseResult
;
import
com.byit.enums.ExecuteStatusEnum
;
import
com.byit.enums.FlowPropertyEnum
;
...
...
@@ -22,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
javax.annotation.Resource
;
import
java.util.*
;
...
...
@@ -54,8 +56,8 @@ public class FlowServiceImpl implements FlowService {
@Override
public
List
<
FlowViewVo
>
findAllFlowViewVo
()
{
List
<
Flow
>
allFlow
=
findAllFlow
();
public
List
<
FlowViewVo
>
findAllFlowViewVo
(
FlowConditionDto
flowConditionDto
)
{
List
<
Flow
>
allFlow
=
findAllFlow
(
flowConditionDto
);
return
allFlow
.
stream
().
map
(
flow
->
{
FlowViewVo
flowViewVo
=
new
FlowViewVo
();
flowViewVo
.
setFlowId
(
flow
.
getFlowId
());
...
...
@@ -68,8 +70,8 @@ public class FlowServiceImpl implements FlowService {
}
@Override
public
List
<
FlowImportantAllVo
>
findAllFlowImportant
()
{
List
<
Flow
>
all
=
flowMapper
.
findAll
(
);
public
List
<
FlowImportantAllVo
>
findAllFlowImportant
(
FlowConditionDto
flowConditionDto
)
{
List
<
Flow
>
all
=
flowMapper
.
findAll
ByCondition
(
flowConditionDto
);
return
all
.
stream
().
map
(
flow
->
{
FlowImportantAllVo
flowImportantAllVo
=
new
FlowImportantAllVo
();
flowImportantAllVo
.
setRowKey
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
...
...
@@ -81,8 +83,8 @@ public class FlowServiceImpl implements FlowService {
}
@Override
public
List
<
Flow
>
findAllFlow
()
{
return
flowMapper
.
findAll
(
);
public
List
<
Flow
>
findAllFlow
(
FlowConditionDto
flowConditionDto
)
{
return
flowMapper
.
findAll
ByCondition
(
flowConditionDto
);
}
@Override
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/FlowVersionServiceImpl.java
View file @
540541a6
package
com
.
byit
.
service
.
impl
;
import
cn.hutool.core.util.IdcardUtil
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.mapper.FlowVersionMapper
;
import
com.byit.model.FlowVersion
;
import
com.byit.model.vo.FlowImportantAllVo
;
...
...
@@ -44,8 +45,8 @@ public class FlowVersionServiceImpl implements FlowVersionService {
@Override
public
List
<
FlowVersionVo
>
findAllVersion
()
{
List
<
FlowVersion
>
allFlow
=
flowVersionMapper
.
findAllFlow
(
);
public
List
<
FlowVersionVo
>
findAllVersion
(
FlowConditionDto
flowConditionDto
)
{
List
<
FlowVersion
>
allFlow
=
flowVersionMapper
.
findAllFlow
Condition
(
flowConditionDto
);
return
allFlow
.
stream
().
map
(
flowVersion
->
{
FlowVersionVo
flowVersionVo
=
new
FlowVersionVo
();
flowVersionVo
.
setNodeId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JavaTaskServiceImpl.java
View file @
540541a6
...
...
@@ -2,10 +2,14 @@ package com.byit.service.impl;
import
com.byit.dto.plugin.JavaTask
;
import
com.byit.mapper.JavaTaskMapper
;
import
com.byit.model.vo.JavaTaskLogImportantVo
;
import
com.byit.service.JavaTaskService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
/**
* @author huangfu
...
...
@@ -19,6 +23,23 @@ public class JavaTaskServiceImpl implements JavaTaskService {
}
@Override
public
List
<
JavaTask
>
findAll
(
String
jobName
)
{
return
javaTaskMapper
.
findAll
(
jobName
);
}
@Override
public
List
<
JavaTaskLogImportantVo
>
findAllJavaTaskLogImportantVo
(
String
jobName
)
{
List
<
JavaTask
>
javaTasks
=
this
.
findAll
(
jobName
);
return
javaTasks
.
stream
().
map
(
javaTask
->
{
JavaTaskLogImportantVo
javaTaskLogImportantVo
=
new
JavaTaskLogImportantVo
();
javaTaskLogImportantVo
.
setRowKey
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
javaTaskLogImportantVo
.
setHasChildren
(
true
);
BeanUtils
.
copyProperties
(
javaTask
,
javaTaskLogImportantVo
);
return
javaTaskLogImportantVo
;
}).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
JavaTask
>
findAllByTriggerTimeLessThanEqual
(
Long
triggerTime
)
{
return
javaTaskMapper
.
findAllByTriggerTimeLessThanEqual
(
triggerTime
);
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
View file @
540541a6
...
...
@@ -41,12 +41,29 @@ public class JobTaskRunLogServiceImpl implements JobTaskRunLogService {
}
@Override
public
List
<
JobTaskRunLog
>
findImmediatelyNode
(
String
nodeName
)
{
return
jobTaskRunLogMapper
.
findImmediatelyNode
(
nodeName
);
}
@Override
public
List
<
RunLogVo
>
findNodeLogByHandlerName
(
String
handlerName
)
{
List
<
JobTaskRunLogWithBLOBs
>
nodeLogByHandlerName
=
jobTaskRunLogMapper
.
findNodeLogByHandlerName
(
handlerName
);
return
nodeLogByHandlerName
.
stream
().
map
(
nodeLog
->{
RunLogVo
runLogVo
=
new
RunLogVo
();
runLogVo
.
setRowKey
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
runLogVo
.
setHasTrigger
(
true
);
BeanUtils
.
copyProperties
(
nodeLog
,
runLogVo
);
return
runLogVo
;
}).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
JobTaskRunLog
>
findJobTaskRunLogNotEndNodeByRunCodeCount
(
List
<
Integer
>
nodIds
,
String
runId
)
{
return
jobTaskRunLogMapper
.
findJobTaskRunLogNotEndNodeByRunCodeCount
(
nodIds
,
runId
);
}
@Override
public
List
<
JobTaskRunLog
>
findErrorNode
()
{
public
List
<
JobTaskRunLog
WithBLOBs
>
findErrorNode
()
{
return
jobTaskRunLogMapper
.
findErrorNode
();
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/RunRecordingServiceImpl.java
View file @
540541a6
package
com
.
byit
.
service
.
impl
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.mapper.RunRecordingMapper
;
import
com.byit.model.RunRecording
;
...
...
@@ -29,8 +30,8 @@ public class RunRecordingServiceImpl implements RunRecordingService {
}
@Override
public
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
()
{
List
<
RunRecording
>
runRecordings
=
findAll
();
public
List
<
RunRecordingViewVo
>
findAllRunRecordingViewVo
(
FlowConditionDto
flowConditionDt
)
{
List
<
RunRecording
>
runRecordings
=
findAll
(
flowConditionDt
);
return
runRecordings
.
stream
().
map
(
runRecording
->
{
RunRecordingViewVo
runRecordingViewVo
=
new
RunRecordingViewVo
();
runRecordingViewVo
.
setHasChildren
(
true
);
...
...
@@ -41,13 +42,13 @@ public class RunRecordingServiceImpl implements RunRecordingService {
}
@Override
public
List
<
RunRecording
>
findAll
()
{
return
runRecordingMapper
.
findAll
();
public
List
<
RunRecording
>
findAll
(
FlowConditionDto
flowConditionDto
)
{
return
runRecordingMapper
.
findAll
(
flowConditionDto
);
}
@Override
public
List
<
RunRecordingViewVo
>
findAllError
()
{
List
<
RunRecording
>
allError
=
runRecordingMapper
.
findAllError
();
public
List
<
RunRecordingViewVo
>
findAllError
(
FlowConditionDto
flowConditionDto
)
{
List
<
RunRecording
>
allError
=
runRecordingMapper
.
findAllError
(
flowConditionDto
);
return
allError
.
stream
().
map
(
runRecording
->
{
RunRecordingViewVo
runRecordingViewVo
=
new
RunRecordingViewVo
();
runRecordingViewVo
.
setHasChildren
(
true
);
...
...
@@ -58,8 +59,8 @@ public class RunRecordingServiceImpl implements RunRecordingService {
}
@Override
public
List
<
RunRecording
>
findAllRunIng
()
{
return
runRecordingMapper
.
findAllRunIng
();
public
List
<
RunRecording
>
findAllRunIng
(
FlowConditionDto
flowConditionDto
)
{
return
runRecordingMapper
.
findAllRunIng
(
flowConditionDto
);
}
@Override
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/WorkspaceServiceImpl.java
0 → 100644
View file @
540541a6
package
com
.
byit
.
service
.
impl
;
import
com.byit.mapper.WorkspaceMapper
;
import
com.byit.model.Workspace
;
import
com.byit.service.WorkspaceService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author huangfu
*/
@Service
public
class
WorkspaceServiceImpl
implements
WorkspaceService
{
private
final
WorkspaceMapper
workspaceMapper
;
public
WorkspaceServiceImpl
(
WorkspaceMapper
workspaceMapper
)
{
this
.
workspaceMapper
=
workspaceMapper
;
}
@Override
public
List
<
Workspace
>
findAll
()
{
return
workspaceMapper
.
findAll
();
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/JavaTaskJobTask.java
View file @
540541a6
...
...
@@ -62,13 +62,13 @@ public class JavaTaskJobTask implements TimerTask {
log
.
setTriggerCode
(
RunResultEnum
.
TRIGGER_ERROR
.
getCode
());
}
log
.
setTriggerMsg
(
pluginRpcResponsePacket
.
getMsg
());
log
.
setJobGroupIp
(
pluginRpcResponsePacket
.
getRunIp
());
}
catch
(
Exception
e
){
log
.
setTriggerCode
(
RunResultEnum
.
TRIGGER_ERROR
.
getCode
());
log
.
setRunCode
(
RunResultEnum
.
RUN_ERROR
.
getCode
());
log
.
setRunMsg
(
javaTask
.
getTaskName
()+
":"
+
e
.
getMessage
());
log
.
setTriggerMsg
(
javaTask
.
getTaskName
()+
":"
+
e
.
getMessage
());
}
JobTaskRunLogServiceImpl
jobTaskRunLogService
=
SpringUtil
.
getBean
(
JobTaskRunLogServiceImpl
.
class
);
jobTaskRunLogService
.
updateJobTaskRunLogWithBLOBs
(
log
);
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/JavaTaskCallbackThread.java
View file @
540541a6
...
...
@@ -7,6 +7,7 @@ import com.byit.packet.response.PluginRpcResponsePacket;
import
com.byit.service.impl.JobTaskRunLogServiceImpl
;
import
com.byit.util.SpringUtil
;
import
java.util.Date
;
import
java.util.Map
;
/**
...
...
@@ -34,6 +35,7 @@ public class JavaTaskCallbackThread implements Runnable {
jobTaskRunLog
.
setRunMsg
(
result
.
get
(
"msg"
));
jobTaskRunLog
.
setRunCode
(
code
);
jobTaskRunLog
.
setLogId
(
logId
);
jobTaskRunLog
.
setEndTime
(
new
Date
());
mythJobTaskRunLogService
.
updateJobTaskRunLogWithBLOBs
(
jobTaskRunLog
);
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/LogCallbackThread.java
View file @
540541a6
...
...
@@ -2,6 +2,8 @@ package com.byit.thread;
import
com.byit.dto.executor.JobRunResultDto
;
import
com.byit.enums.EmailEnum
;
import
com.byit.enums.JobResultEnum
;
import
com.byit.enums.task.RunResultEnum
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.service.impl.JobTaskRunLogServiceImpl
;
import
com.byit.util.SpringUtil
;
...
...
@@ -41,7 +43,12 @@ public class LogCallbackThread implements Runnable {
jobTaskRunLog
.
setLogId
(
jobRunResultDto
.
getLogId
());
jobTaskRunLog
.
setStartTime
(
jobRunResultDto
.
getStartTime
());
jobTaskRunLog
.
setEndTime
(
jobRunResultDto
.
getEndTime
());
jobTaskRunLog
.
setRunCode
(
jobRunResultDto
.
getReturnResult
().
getCode
());
String
code
=
RunResultEnum
.
RUN_ERROR
.
getCode
();
if
(
JobResultEnum
.
SUCCESS
.
getCode
().
equals
(
jobRunResultDto
.
getReturnResult
().
getCode
())){
code
=
RunResultEnum
.
RUN_SUCCESS
.
getCode
();
}
jobTaskRunLog
.
setRunCode
(
code
);
jobTaskRunLog
.
setAlertEnd
(
EmailEnum
.
IS_ALARM_NO
.
getCode
());
mythJobTaskRunLogService
.
updateJobTaskRunLogWithBLOBs
(
jobTaskRunLog
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/FailedRetryThreadRunHelper.java
View file @
540541a6
...
...
@@ -2,6 +2,7 @@ package com.byit.thread.helper;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.service.mapservice.JobTaskRunLogAndJobTaskService
;
import
com.byit.service.JobTaskRunLogService
;
import
com.byit.thread.BaseThreadRunHelper
;
...
...
@@ -35,7 +36,7 @@ public class FailedRetryThreadRunHelper extends BaseThreadRunHelper {
@Override
public
Long
start
()
{
//查询又重试次数的失败节点
List
<
JobTaskRunLog
>
errorNodes
=
jobTaskRunLogService
.
findErrorNode
();
List
<
JobTaskRunLog
WithBLOBs
>
errorNodes
=
jobTaskRunLogService
.
findErrorNode
();
if
(
CollectionUtil
.
isNotEmpty
(
errorNodes
)){
errorNodes
.
forEach
(
errorNode
->{
log
.
debug
(
"-----------------【操作失败节点{}】-----------------"
,
errorNode
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/FlowThreadRunHelper.java
View file @
540541a6
...
...
@@ -39,7 +39,7 @@ public class FlowThreadRunHelper extends BaseThreadRunHelper {
@Override
public
Long
start
()
{
Long
preTestTime
=
System
.
currentTimeMillis
()+
TimeUnit
.
HOUR
S
.
toMillis
(
PRE_TIME
);
Long
preTestTime
=
System
.
currentTimeMillis
()+
TimeUnit
.
MINUTE
S
.
toMillis
(
PRE_TIME
);
//这个查询时有一个条件是 剩余次数不等于0也就是说 等于0的就查询不出来
List
<
Flow
>
halfAnHourFlow
=
flowService
.
findHalfAnHourFlow
(
preTestTime
);
if
(
CollectionUtil
.
isNotEmpty
(
halfAnHourFlow
))
{
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/FlowMapper.xml
View file @
540541a6
...
...
@@ -92,6 +92,21 @@
from flow
</select>
<select
id=
"findAllByCondition"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from flow
<trim
prefix=
"where"
prefixOverrides=
"and"
>
<if
test=
"workspaceId != null"
>
workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if
test=
"flowName != null and flowName != ''"
>
and flow_name like concat(concat('%',#{flowName,jdbcType=VARCHAR}),'%')
</if>
</trim>
</select>
<delete
id=
"deleteById"
parameterType=
"java.lang.Integer"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
delete from flow
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/FlowVersionMapper.xml
View file @
540541a6
...
...
@@ -41,6 +41,18 @@
from flow_version where remove_mark = '1'
</select>
<select
id=
"findAllFlowCondition"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from flow_version where remove_mark = '1'
<if
test=
"workspaceId != null"
>
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if
test=
"flowName != null and flowName != ''"
>
and flow_name = #{flowName,jdbcType=INTEGER}
</if>
</select>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
select
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/JavaTaskMapper.xml
View file @
540541a6
...
...
@@ -21,6 +21,18 @@
id, job_name, task_name, repeat_count, param, trigger_time, cron, remaining_count,
create_time, update_time, alarml_action, alarm_email
</sql>
<select
id=
"findAll"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from java_task
<where>
<if
test=
"jobName != null and jobName != ''"
>
job_name like concat(concat('%',#{jobName,jdbcType=VARCHAR}),'%')
</if>
</where>
</select>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<!-- generated @mbg.generated date: 2020-04-14 -->
select
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
View file @
540541a6
...
...
@@ -62,8 +62,30 @@
</foreach>
</select>
<select
id=
"findErrorNode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<select
id=
"findImmediatelyNode"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task_run_log where schedule_type = 4
<if
test=
"nodeName != null and nodeName != ''"
>
AND node_name = #{nodeName,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"findNodeLogByHandlerName"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task_run_log where handler_name = #{handlerName,jdbcType=VARCHAR}
</select>
<select
id=
"findErrorNode"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task_run_log
where (run_code = '2' || run_code = '4') and failed_remaining_count > 0
and is_virtual = '1'
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
540541a6
...
...
@@ -25,32 +25,55 @@
<result
column=
"schedule_type"
jdbcType=
"INTEGER"
property=
"scheduleType"
/>
<result
column=
"operator"
jdbcType=
"VARCHAR"
property=
"operator"
/>
<result
column=
"re_run_id"
jdbcType=
"VARCHAR"
property=
"reRunId"
/>
<result
column=
"workspace_id"
jdbcType=
"INTEGER"
property=
"workspaceId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
recording_id, run_id, alarm_email, dispatch_ip, flow_name, flow_run_result, flow_status,
flow_timeout, flow_version_name, alarml_action, priority, trigger_time, principal,
flow_id, start_time, end_time, is_alarm,is_inner,fail_fast, flow_node_count, schedule_type, operator, re_run_id
,workspace_id
</sql>
<select
id=
"findAll"
resultMap=
"BaseResultMap"
>
<select
id=
"findAll"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from run_recording
<trim
prefix=
"WHERE"
prefixOverrides=
"AND |OR"
>
<if
test=
"workspaceId != null"
>
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if
test=
"flowName != null and flowName != ''"
>
and flow_name = #{flowName,jdbcType=VARCHAR}
</if>
</trim>
</select>
<select
id=
"findAllError"
resultMap=
"BaseResultMap"
>
<select
id=
"findAllError"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from run_recording
where flow_run_result = '2' or flow_run_result = '4'
or flow_run_result = '5'
where (flow_run_result = '2' or flow_run_result = '4'
or flow_run_result = '5')
<if
test=
"workspaceId != null"
>
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if
test=
"flowName != null and flowName != ''"
>
and flow_name = #{flowName,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"findAllRunIng"
resultMap=
"BaseResultMap"
>
<select
id=
"findAllRunIng"
parameterType=
"com.byit.dto.FlowConditionDto"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from run_recording
where flow_status = '2' or flow_status = '3'
where (flow_status = '2' or flow_status = '3')
<if
test=
"workspaceId != null"
>
AND workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if
test=
"flowName != null and flowName != ''"
>
AND flow_name = #{flowName,jdbcType=VARCHAR}
</if>
</select>
<!--查询已完结 没有告警的-->
...
...
@@ -311,6 +334,9 @@
<if
test=
"reRunId != null"
>
re_run_id,
</if>
<if
test=
"workspaceId != null"
>
workspace_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"recordingId != null"
>
...
...
@@ -382,6 +408,9 @@
<if
test=
"reRunId != null"
>
#{reRunId,jdbcType=VARCHAR},
</if>
<if
test=
"workspaceId != null"
>
#{workspaceId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateRunRecordingById"
parameterType=
"com.byit.model.RunRecording"
>
...
...
@@ -453,6 +482,9 @@
<if
test=
"reRunId != null"
>
re_run_id = #{reRunId,jdbcType=VARCHAR},
</if>
<if
test=
"workspaceId != null"
>
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
</set>
where recording_id = #{recordingId,jdbcType=INTEGER}
</update>
...
...
@@ -526,6 +558,9 @@
<if
test=
"reRunId != null"
>
re_run_id = #{reRunId,jdbcType=VARCHAR},
</if>
<if
test=
"workspaceId != null"
>
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
</set>
where flow_id = #{flowId,jdbcType=INTEGER} and run_id = #{runId,jdbcType=VARCHAR}
</update>
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/WorkspaceMapper.xml
View file @
540541a6
...
...
@@ -14,6 +14,12 @@
workspace_id, workspace_name, author, add_time, remove_mark
</sql>
<select
id=
"findAll"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from workspace
</select>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
select
...
...
byit-plugin-core/byit-plugin-rpc-common/src/main/java/com/byit/packet/response/PluginRpcResponsePacket.java
View file @
540541a6
...
...
@@ -27,6 +27,7 @@ public class PluginRpcResponsePacket extends BasePacketModel {
private
String
type
;
private
long
runTime
;
private
boolean
status
=
false
;
private
String
runIp
;
@Override
public
Command
getCommand
()
{
return
Command
.
RUN_REMOTELY_JOB_NODE_RESPONSE
;
...
...
byit-plugin-core/myth-plugin-rpc-client/src/main/java/com/byit/init/PluginClientInitialization.java
View file @
540541a6
...
...
@@ -5,6 +5,7 @@ import com.byit.client.PluginClient;
import
com.byit.factory.PluginClientFactory
;
import
com.byit.future.PluginFutureResponse
;
import
com.byit.packet.request.PluginRpcRequestPacket
;
import
com.byit.packet.response.PluginRpcResponsePacket
;
import
com.byit.registry.PluginServiceRegistry
;
import
com.byit.rpc.remoting.invoker.route.LoadBalance
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -87,7 +88,9 @@ public class PluginClientInitialization {
//发送请求
pluginClient
.
send
(
address
,
pluginRpcRequestPacket
);
//获取结果
return
pluginFutureResponse
.
get
();
PluginRpcResponsePacket
pluginRpcResponsePacket
=
pluginFutureResponse
.
get
();
pluginRpcResponsePacket
.
setRunIp
(
address
);
return
pluginRpcResponsePacket
;
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
e
);
}
finally
{
...
...
demo-client/plugin-test-spring-boot/src/main/java/com/byit/server/SentEmailServer.java
View file @
540541a6
...
...
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
* @author huangfu
*/
@Component
@TaskHandler
(
expand
=
"{sadasdadasdasdasd}"
,
cron
=
"0 0/2 * * * ?"
,
taskName
=
"sentEmailServer"
,
autoPublish
=
fals
e
,
publishUrl
=
"http://127.0.0.1:8081/myth-job-admin/api/node/autoAddJavaTask"
)
@TaskHandler
(
expand
=
"{sadasdadasdasdasd}"
,
cron
=
"0 0/2 * * * ?"
,
taskName
=
"sentEmailServer"
,
autoPublish
=
tru
e
,
publishUrl
=
"http://127.0.0.1:8081/myth-job-admin/api/node/autoAddJavaTask"
)
@Slf4j
public
class
SentEmailServer
extends
BaseJobHandler
{
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment