Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
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
姚本章
jz-dmp-service
Commits
daedaa9c
Commit
daedaa9c
authored
Mar 14, 2021
by
mcb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dmp_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service
into dmp_dev
parents
f28f06dc
520bc13d
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
356 additions
and
47 deletions
+356
-47
CommConstant.java
src/main/java/com/jz/common/constant/CommConstant.java
+32
-0
CBTHandler.java
src/main/java/com/jz/common/persistence/CBTHandler.java
+2
-1
DataSourceController.java
...ules/controller/DataIntegration/DataSourceController.java
+5
-0
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+8
-0
RealTimeSyncController.java
...es/controller/DataIntegration/RealTimeSyncController.java
+7
-0
DmpDevelopTaskController.java
...m/jz/dmp/modules/controller/DmpDevelopTaskController.java
+8
-0
DmpDevelopTaskHistoryController.java
...p/modules/controller/DmpDevelopTaskHistoryController.java
+22
-0
DmpDevelopTaskHistoryDto.java
...dmp/modules/controller/bean/DmpDevelopTaskHistoryDto.java
+15
-0
DmpDevelopTaskHistoryRequest.java
...modules/controller/bean/DmpDevelopTaskHistoryRequest.java
+82
-0
DmpDevExamplesController.java
...es/controller/dataOperation/DmpDevExamplesController.java
+3
-0
DmpDevTaskController.java
...odules/controller/dataOperation/DmpDevTaskController.java
+3
-0
DmpApiMangeController.java
...modules/controller/dataService/DmpApiMangeController.java
+8
-0
DmpApiServiceMangeController.java
.../controller/dataService/DmpApiServiceMangeController.java
+5
-0
DmpOrgMangeController.java
...modules/controller/dataService/DmpOrgMangeController.java
+5
-0
DmpProjectConfigInfoController.java
...controller/projconfig/DmpProjectConfigInfoController.java
+1
-0
SystemCommonController.java
...jz/dmp/modules/controller/sys/SystemCommonController.java
+21
-0
DmpDevelopTaskHistoryServiceImpl.java
...odules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
+8
-1
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+4
-0
SystemCommonService.java
...a/com/jz/dmp/modules/service/sys/SystemCommonService.java
+12
-0
SystemCommonServiceImpl.java
...dmp/modules/service/sys/impl/SystemCommonServiceImpl.java
+52
-0
application-test.yml
src/main/resources/application-test.yml
+1
-1
DmpDevelopTaskHistoryMapper.xml
...main/resources/mapper/dmp/DmpDevelopTaskHistoryMapper.xml
+45
-42
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+2
-2
DmpRoleMapper.xml
src/main/resources/mapper/sys/DmpRoleMapper.xml
+5
-0
No files found.
src/main/java/com/jz/common/constant/CommConstant.java
View file @
daedaa9c
...
@@ -66,4 +66,36 @@ public class CommConstant {
...
@@ -66,4 +66,36 @@ public class CommConstant {
//模板名称
//模板名称
public
static
final
String
API_TEST
=
"api_test.ftl"
;
public
static
final
String
API_TEST
=
"api_test.ftl"
;
public
static
final
String
realTimeTask
=
"source_connector.ftl"
;
public
static
final
String
realTimeTask
=
"source_connector.ftl"
;
/***************************************************/
//操作类型
public
static
final
String
OPT_TYPE_ADD
=
"新增"
;
//新增
public
static
final
String
OPT_TYPE_EDIT
=
"修改"
;
//修改(SLA设置、重置)
public
static
final
String
OPT_TYPE_DELETE
=
"删除"
;
//删除
public
static
final
String
OPT_TYPE_AUTH
=
"授权"
;
//授权
public
static
final
String
OPT_TYPE_UNAUTH
=
"取消授权"
;
//取消授权
public
static
final
String
OPT_TYPE_UPLOAD
=
"上传"
;
//上传
public
static
final
String
OPT_TYPE_RUN
=
"运行"
;
//运行
public
static
final
String
OPT_TYPE_STOP
=
"停止"
;
//停止
public
static
final
String
OPT_TYPE_PUBLISH
=
"发布"
;
//发布
public
static
final
String
OPT_TYPE_UNPUBLISH
=
"取消发布"
;
//取消发布
public
static
final
String
OPT_TYPE_MEMBERCONFIG
=
"成员配置"
;
//成员配置
public
static
final
String
OPT_TYPE_PUBLISHORUN
=
"发布/取消发布"
;
//发布/取消发布(新增)
public
static
final
String
OPT_TYPE_ADDOREDIT
=
"新建/编辑"
;
//新建/编辑(新增)
/***************************************************/
//功能模块
public
static
final
String
MODULAR_DATAINTEGRATION
=
"数据集成"
;
//数据集成
public
static
final
String
MODULAR_DATAINTEGRATION_DATASOURCE
=
"数据开发/数据源"
;
//数据开发/数据源
public
static
final
String
MODULAR_DATAINTEGRATION_OFFLINE
=
"数据开发/离线同步"
;
//数据开发/离线同步
public
static
final
String
MODULAR_DATAINTEGRATION_REALTIME
=
"数据开发/实时同步"
;
//数据开发/实时同步
public
static
final
String
MODULAR_DATADEV
=
"数据开发"
;
//数据开发
public
static
final
String
MODULAR_DATADEV_FLOW
=
"数据开发/业务流程"
;
//数据开发/业务流程
public
static
final
String
MODULAR_OPTCENTER
=
"数据运维"
;
//数据运维
public
static
final
String
MODULAR_OPTCENTER_DATADEV
=
"数据运维/数据开发运维"
;
//数据运维/数据开发运维
public
static
final
String
MODULAR_DATASERVICE
=
"数据服务"
;
//数据服务
public
static
final
String
MODULAR_DATASERVICE_DEV
=
"数据服务/服务开发"
;
//数据服务/服务开发
public
static
final
String
MODULAR_DATASERVICE_ORG
=
"数据服务/组织管理"
;
//数据服务/组织管理
public
static
final
String
MODULAR_DATASERVICE_AUTHMANAG
=
"数据服务/授权管理"
;
//数据服务/授权管理
}
}
src/main/java/com/jz/common/persistence/CBTHandler.java
View file @
daedaa9c
...
@@ -36,7 +36,8 @@ public class CBTHandler extends BaseTypeHandler<String> {
...
@@ -36,7 +36,8 @@ public class CBTHandler extends BaseTypeHandler<String> {
}
}
try
{
try
{
if
(
returnValue
==
null
)
return
""
;
if
(
returnValue
==
null
)
return
""
;
return
new
String
(
returnValue
,
DEFAULT_CHARSET
);
String
valueStr
=
new
String
(
returnValue
,
DEFAULT_CHARSET
);
return
valueStr
;
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
throw
new
RuntimeException
(
"Blob Encoding Error!"
);
throw
new
RuntimeException
(
"Blob Encoding Error!"
);
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/DataSourceController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
...
@@ -73,6 +75,7 @@ public class DataSourceController {
...
@@ -73,6 +75,7 @@ public class DataSourceController {
@ApiImplicitParam
(
name
=
"datasourceId"
,
value
=
"数据源id"
)
@ApiImplicitParam
(
name
=
"datasourceId"
,
value
=
"数据源id"
)
@ApiOperation
(
value
=
"批量删除数据源"
,
notes
=
"批量删除数据源"
)
@ApiOperation
(
value
=
"批量删除数据源"
,
notes
=
"批量删除数据源"
)
@GetMapping
(
value
=
"/delDataSource"
)
@GetMapping
(
value
=
"/delDataSource"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"批量删除数据源"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_DATASOURCE
,
isProjOpt
=
true
)
public
JsonResult
delDataSource
(
@RequestParam
String
datasourceId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
delDataSource
(
@RequestParam
String
datasourceId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
datasourceId
))
{
if
(
StringUtils
.
isEmpty
(
datasourceId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
...
@@ -115,6 +118,7 @@ public class DataSourceController {
...
@@ -115,6 +118,7 @@ public class DataSourceController {
*/
*/
@ApiOperation
(
value
=
"保存数据源"
,
notes
=
"保存数据源"
)
@ApiOperation
(
value
=
"保存数据源"
,
notes
=
"保存数据源"
)
@PostMapping
(
value
=
"/addDatasourceInfo"
)
@PostMapping
(
value
=
"/addDatasourceInfo"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"保存数据源"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_DATASOURCE
,
isProjOpt
=
true
)
public
JsonResult
addDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
addDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
JsonResult
result
=
dmpSyncingDatasourceService
.
addDatasourceInfo
(
saveBody
);
JsonResult
result
=
dmpSyncingDatasourceService
.
addDatasourceInfo
(
saveBody
);
return
result
;
return
result
;
...
@@ -176,6 +180,7 @@ public class DataSourceController {
...
@@ -176,6 +180,7 @@ public class DataSourceController {
*/
*/
@ApiOperation
(
value
=
"编辑数据源"
,
notes
=
"编辑数据源"
)
@ApiOperation
(
value
=
"编辑数据源"
,
notes
=
"编辑数据源"
)
@PostMapping
(
value
=
"/updateDatasourceInfo"
)
@PostMapping
(
value
=
"/updateDatasourceInfo"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"编辑数据源"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_DATASOURCE
,
isProjOpt
=
true
)
public
JsonResult
updateDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
updateDatasourceInfo
(
@RequestBody
@Validated
DmpSyncingDatasourceReq
saveBody
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
saveBody
.
getId
()))
{
if
(
StringUtils
.
isEmpty
(
saveBody
.
getId
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"数据源ID不能为空"
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"数据源ID不能为空"
);
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
import
com.amazonaws.services.xray.model.Http
;
import
com.amazonaws.services.xray.model.Http
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.BasePageBean
;
import
com.jz.common.page.BasePageBean
;
...
@@ -114,6 +116,7 @@ public class OfflineSynchController {
...
@@ -114,6 +116,7 @@ public class OfflineSynchController {
@ApiOperation
(
value
=
"任务立即运行"
,
notes
=
"任务立即运行"
)
@ApiOperation
(
value
=
"任务立即运行"
,
notes
=
"任务立即运行"
)
@GetMapping
(
value
=
"/taskRunNowByTaskId"
)
@GetMapping
(
value
=
"/taskRunNowByTaskId"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_RUN
,
descrption
=
"任务立即运行"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
getTaskRunNowByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
public
JsonResult
getTaskRunNowByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
...
@@ -139,6 +142,7 @@ public class OfflineSynchController {
...
@@ -139,6 +142,7 @@ public class OfflineSynchController {
@ApiOperation
(
value
=
"停止运行"
,
notes
=
"停止运行"
)
@ApiOperation
(
value
=
"停止运行"
,
notes
=
"停止运行"
)
@GetMapping
(
value
=
"/stopSyncingTask"
)
@GetMapping
(
value
=
"/stopSyncingTask"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_STOP
,
descrption
=
"任务停止运行"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
stopTaskRunNowByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
public
JsonResult
stopTaskRunNowByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
...
@@ -164,6 +168,7 @@ public class OfflineSynchController {
...
@@ -164,6 +168,7 @@ public class OfflineSynchController {
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"删除任务"
)
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"删除任务"
)
@GetMapping
(
value
=
"/delTaskByTaskId"
)
@GetMapping
(
value
=
"/delTaskByTaskId"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除任务"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
delTaskByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
public
JsonResult
delTaskByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
...
@@ -273,6 +278,7 @@ public class OfflineSynchController {
...
@@ -273,6 +278,7 @@ public class OfflineSynchController {
*/
*/
@ApiOperation
(
value
=
"保存/编辑离线任务数据"
,
notes
=
"保存/编辑离线任务数据"
)
@ApiOperation
(
value
=
"保存/编辑离线任务数据"
,
notes
=
"保存/编辑离线任务数据"
)
@PostMapping
(
value
=
"/addSyncTask"
)
@PostMapping
(
value
=
"/addSyncTask"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"保存/编辑离线任务数据"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
JsonResult
list
=
new
JsonResult
();
JsonResult
list
=
new
JsonResult
();
try
{
try
{
...
@@ -317,6 +323,7 @@ public class OfflineSynchController {
...
@@ -317,6 +323,7 @@ public class OfflineSynchController {
*/
*/
@ApiOperation
(
value
=
"编辑离线任务数据"
,
notes
=
"编辑离线任务数据"
)
@ApiOperation
(
value
=
"编辑离线任务数据"
,
notes
=
"编辑离线任务数据"
)
@PostMapping
(
value
=
"/updateSyncTask"
)
@PostMapping
(
value
=
"/updateSyncTask"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"编辑离线任务数据"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
updateSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
public
JsonResult
updateSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
JsonResult
list
=
offlineSynchService
.
updateSyncTask
(
syncDmpTaskAddReq
);
JsonResult
list
=
offlineSynchService
.
updateSyncTask
(
syncDmpTaskAddReq
);
return
list
;
return
list
;
...
@@ -331,6 +338,7 @@ public class OfflineSynchController {
...
@@ -331,6 +338,7 @@ public class OfflineSynchController {
*/
*/
@ApiOperation
(
value
=
"新增同步任务"
,
notes
=
"新增同步任务"
)
@ApiOperation
(
value
=
"新增同步任务"
,
notes
=
"新增同步任务"
)
@PostMapping
(
value
=
"/newSynchTask"
)
@PostMapping
(
value
=
"/newSynchTask"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新增同步任务"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_OFFLINE
,
isProjOpt
=
true
)
public
JsonResult
addNewSynchTask
(
@RequestBody
@Validated
NewSynchTaskReq
newSynchTaskReq
)
throws
Exception
{
public
JsonResult
addNewSynchTask
(
@RequestBody
@Validated
NewSynchTaskReq
newSynchTaskReq
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
newSynchTaskReq
.
getProjectId
()))
{
if
(
StringUtils
.
isEmpty
(
newSynchTaskReq
.
getProjectId
()))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"项目ID不能为空"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"项目ID不能为空"
);
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/RealTimeSyncController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
...
@@ -81,6 +83,7 @@ public class RealTimeSyncController {
...
@@ -81,6 +83,7 @@ public class RealTimeSyncController {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
,
required
=
true
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"01:运行,02:停止"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"01:运行,02:停止"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
,
required
=
true
)})
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
,
required
=
true
)})
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_RUN
,
descrption
=
"批量启动/停止运行实时同步任务"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_REALTIME
,
isProjOpt
=
true
)
public
JsonResult
startRealTimeSync
(
@RequestParam
String
taskId
,
@RequestParam
String
projectId
,
@RequestParam
String
type
)
throws
Exception
{
public
JsonResult
startRealTimeSync
(
@RequestParam
String
taskId
,
@RequestParam
String
projectId
,
@RequestParam
String
type
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
...
@@ -112,6 +115,7 @@ public class RealTimeSyncController {
...
@@ -112,6 +115,7 @@ public class RealTimeSyncController {
@ApiOperation
(
value
=
"删除实时同步任务"
,
notes
=
"删除实时同步任务"
)
@ApiOperation
(
value
=
"删除实时同步任务"
,
notes
=
"删除实时同步任务"
)
@GetMapping
(
value
=
"/delRealTimeSync"
)
@GetMapping
(
value
=
"/delRealTimeSync"
)
@ApiImplicitParam
(
name
=
"realTaskId"
,
value
=
"任务id"
)
@ApiImplicitParam
(
name
=
"realTaskId"
,
value
=
"任务id"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除实时同步任务"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_REALTIME
,
isProjOpt
=
true
)
public
JsonResult
delRealTimeSync
(
@RequestParam
String
realTaskId
)
throws
Exception
{
public
JsonResult
delRealTimeSync
(
@RequestParam
String
realTaskId
)
throws
Exception
{
logger
.
info
(
"###################请求参数{}taskId="
+
realTaskId
+
"###################"
);
logger
.
info
(
"###################请求参数{}taskId="
+
realTaskId
+
"###################"
);
if
(
StringUtils
.
isEmpty
(
realTaskId
))
{
if
(
StringUtils
.
isEmpty
(
realTaskId
))
{
...
@@ -193,6 +197,7 @@ public class RealTimeSyncController {
...
@@ -193,6 +197,7 @@ public class RealTimeSyncController {
@GetMapping
(
value
=
"/settingBlackListCheckTask"
)
@GetMapping
(
value
=
"/settingBlackListCheckTask"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"srcDatasourceId"
,
value
=
"来源数据源id"
,
required
=
true
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"srcDatasourceId"
,
value
=
"来源数据源id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"sourceTableName"
,
value
=
"来源表名称"
,
required
=
true
)})
@ApiImplicitParam
(
name
=
"sourceTableName"
,
value
=
"来源表名称"
,
required
=
true
)})
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"设置成黑名单时 ,检查是否有同步任务存在运行"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_REALTIME
,
isProjOpt
=
true
)
public
JsonResult
settingBlackListCheckTask
(
@RequestParam
String
srcDatasourceId
,
@RequestParam
String
sourceTableName
)
throws
Exception
{
public
JsonResult
settingBlackListCheckTask
(
@RequestParam
String
srcDatasourceId
,
@RequestParam
String
sourceTableName
)
throws
Exception
{
logger
.
info
(
"###################请求参数{}srcDatasourceId="
+
srcDatasourceId
+
"&sourceTableName="
+
sourceTableName
);
logger
.
info
(
"###################请求参数{}srcDatasourceId="
+
srcDatasourceId
+
"&sourceTableName="
+
sourceTableName
);
if
(
StringUtils
.
isEmpty
(
srcDatasourceId
))
{
if
(
StringUtils
.
isEmpty
(
srcDatasourceId
))
{
...
@@ -214,6 +219,7 @@ public class RealTimeSyncController {
...
@@ -214,6 +219,7 @@ public class RealTimeSyncController {
*/
*/
@ApiOperation
(
value
=
"保存/编辑实时同步任务"
,
notes
=
"保存实时同步任务"
)
@ApiOperation
(
value
=
"保存/编辑实时同步任务"
,
notes
=
"保存实时同步任务"
)
@PostMapping
(
value
=
"/addTask"
)
@PostMapping
(
value
=
"/addTask"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"保存/编辑实时同步任务"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_REALTIME
,
isProjOpt
=
true
)
public
JsonResult
addTask
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
addTask
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
httpRequest
)
throws
Exception
{
logger
.
info
(
"###################请求参数{}"
+
params
.
toString
()
+
"############"
);
logger
.
info
(
"###################请求参数{}"
+
params
.
toString
()
+
"############"
);
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"projectId"
).
toString
()))
{
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"projectId"
).
toString
()))
{
...
@@ -324,6 +330,7 @@ public class RealTimeSyncController {
...
@@ -324,6 +330,7 @@ public class RealTimeSyncController {
@GetMapping
(
value
=
"/batchUptOnlineStatus"
)
@GetMapping
(
value
=
"/batchUptOnlineStatus"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"realTaskId"
,
value
=
"任务id"
,
required
=
true
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"realTaskId"
,
value
=
"任务id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"onlineStatus"
,
value
=
"上下线状态:Y 上线,N 下线"
,
required
=
true
)})
@ApiImplicitParam
(
name
=
"onlineStatus"
,
value
=
"上下线状态:Y 上线,N 下线"
,
required
=
true
)})
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"批量上下线"
,
optModular
=
CommConstant
.
MODULAR_DATAINTEGRATION_REALTIME
,
isProjOpt
=
true
)
public
JsonResult
batchUptOnlineStatus
(
@RequestParam
String
realTaskId
,
@RequestParam
String
onlineStatus
)
throws
Exception
{
public
JsonResult
batchUptOnlineStatus
(
@RequestParam
String
realTaskId
,
@RequestParam
String
onlineStatus
)
throws
Exception
{
logger
.
info
(
"###################请求参数{}taskId="
+
realTaskId
+
"###################"
);
logger
.
info
(
"###################请求参数{}taskId="
+
realTaskId
+
"###################"
);
if
(
StringUtils
.
isEmpty
(
realTaskId
))
{
if
(
StringUtils
.
isEmpty
(
realTaskId
))
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpDevelopTaskController.java
View file @
daedaa9c
...
@@ -14,6 +14,7 @@ import com.jz.common.annotation.SysOperationLogAnnotation;
...
@@ -14,6 +14,7 @@ import com.jz.common.annotation.SysOperationLogAnnotation;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest
;
...
@@ -66,6 +67,7 @@ public class DmpDevelopTaskController {
...
@@ -66,6 +67,7 @@ public class DmpDevelopTaskController {
*/
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增开发任务"
,
notes
=
"新增开发任务"
)
@ApiOperation
(
value
=
"新增开发任务"
,
notes
=
"新增开发任务"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新增任务"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpDevelopTask
>
add
(
@RequestBody
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
DmpDevelopTask
>
add
(
@RequestBody
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpDevelopTask
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTask
>();
BaseBeanResponse
<
DmpDevelopTask
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTask
>();
try
{
try
{
...
@@ -107,6 +109,7 @@ public class DmpDevelopTaskController {
...
@@ -107,6 +109,7 @@ public class DmpDevelopTaskController {
@MethodCallLogPrint
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改任务开发"
,
notes
=
"修改任务开发"
)
@ApiOperation
(
value
=
"修改任务开发"
,
notes
=
"修改任务开发"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"修改任务"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpDevelopTask
>
edit
(
@RequestBody
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
DmpDevelopTask
>
edit
(
@RequestBody
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpDevelopTask
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTask
>();
BaseBeanResponse
<
DmpDevelopTask
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTask
>();
try
{
try
{
...
@@ -128,6 +131,7 @@ public class DmpDevelopTaskController {
...
@@ -128,6 +131,7 @@ public class DmpDevelopTaskController {
@ApiOperation
(
value
=
"任务流程发布接口"
,
notes
=
"任务流程发布接口"
)
@ApiOperation
(
value
=
"任务流程发布接口"
,
notes
=
"任务流程发布接口"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"发布任务树主键"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"发布任务树主键"
)
@MethodCallLogPrint
@MethodCallLogPrint
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_PUBLISH
,
descrption
=
"任务流程发布"
,
optModular
=
CommConstant
.
MODULAR_DATADEV_FLOW
,
isProjOpt
=
true
)
public
BaseResponse
flowSubmit
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
public
BaseResponse
flowSubmit
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
BaseResponse
baseResponse
=
new
BaseResponse
();
...
@@ -149,6 +153,7 @@ public class DmpDevelopTaskController {
...
@@ -149,6 +153,7 @@ public class DmpDevelopTaskController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskPublish"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskPublish"
)
@ApiOperation
(
value
=
"SHELL/SQL/离线任务发布接口"
,
notes
=
"SHELL/SQL/离线任务发布接口"
)
@ApiOperation
(
value
=
"SHELL/SQL/离线任务发布接口"
,
notes
=
"SHELL/SQL/离线任务发布接口"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"发布任务树主键"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"发布任务树主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_PUBLISH
,
descrption
=
"SHELL/SQL/离线任务发布"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseResponse
taskPublish
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
public
BaseResponse
taskPublish
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
BaseResponse
baseResponse
=
new
BaseResponse
();
...
@@ -170,6 +175,7 @@ public class DmpDevelopTaskController {
...
@@ -170,6 +175,7 @@ public class DmpDevelopTaskController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskAzkabanRun"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskAzkabanRun"
)
@ApiOperation
(
value
=
"任务立即运行接口"
,
notes
=
"任务立即运行接口"
)
@ApiOperation
(
value
=
"任务立即运行接口"
,
notes
=
"任务立即运行接口"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务树主键"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务树主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_RUN
,
descrption
=
"任务运行"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
Integer
>
taskAzkabanRun
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
Integer
>
taskAzkabanRun
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
Integer
>
baseBeanResponse
=
new
BaseBeanResponse
<
Integer
>();
BaseBeanResponse
<
Integer
>
baseBeanResponse
=
new
BaseBeanResponse
<
Integer
>();
...
@@ -191,6 +197,7 @@ public class DmpDevelopTaskController {
...
@@ -191,6 +197,7 @@ public class DmpDevelopTaskController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskAzkabanStop"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskAzkabanStop"
)
@ApiOperation
(
value
=
"任务立即运行停止接口"
,
notes
=
"任务立即运行停止接口"
)
@ApiOperation
(
value
=
"任务立即运行停止接口"
,
notes
=
"任务立即运行停止接口"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务树主键"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务树主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_STOP
,
descrption
=
"任务停止"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
String
>
taskAzkabanStop
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
String
>
taskAzkabanStop
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
String
>
baseBeanResponse
=
new
BaseBeanResponse
<
String
>();
BaseBeanResponse
<
String
>
baseBeanResponse
=
new
BaseBeanResponse
<
String
>();
...
@@ -213,6 +220,7 @@ public class DmpDevelopTaskController {
...
@@ -213,6 +220,7 @@ public class DmpDevelopTaskController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/softDeleteByTreeId"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/softDeleteByTreeId"
)
@ApiOperation
(
value
=
"软删除任务开发"
,
notes
=
"软删除任务开发"
)
@ApiOperation
(
value
=
"软删除任务开发"
,
notes
=
"软删除任务开发"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务开发主键"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"任务开发主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除任务"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseResponse
softDeleteByTreeId
(
@RequestParam
(
name
=
"treeId"
,
required
=
true
)
Integer
treeId
,
HttpServletRequest
httpRequest
){
public
BaseResponse
softDeleteByTreeId
(
@RequestParam
(
name
=
"treeId"
,
required
=
true
)
Integer
treeId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpDevelopTaskHistoryController.java
View file @
daedaa9c
...
@@ -9,12 +9,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -9,12 +9,14 @@ 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
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest
;
import
com.jz.dmp.modules.model.DmpDevelopTaskHistory
;
import
com.jz.dmp.modules.service.DmpDevelopTaskHistoryService
;
import
com.jz.dmp.modules.service.DmpDevelopTaskHistoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -73,4 +75,24 @@ public class DmpDevelopTaskHistoryController {
...
@@ -73,4 +75,24 @@ public class DmpDevelopTaskHistoryController {
return
baseResponse
;
return
baseResponse
;
}
}
/**修改任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @return
*/
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改任务历史版本"
,
notes
=
"修改任务历史版本"
)
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
edit
(
@RequestBody
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpDevelopTaskHistory
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTaskHistory
>();
try
{
baseBeanResponse
=
dmpDevelopTaskHistoryService
.
edit
(
dmpDevelopTaskHistory
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"修改失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
}
}
src/main/java/com/jz/dmp/modules/controller/bean/DmpDevelopTaskHistoryDto.java
View file @
daedaa9c
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
import
com.jz.dmp.modules.model.DmpDevelopTaskHistory
;
import
com.jz.dmp.modules.model.DmpDevelopTaskHistory
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**任务历史版本Dto
/**任务历史版本Dto
* @author ybz
* @author ybz
...
@@ -9,5 +10,19 @@ import io.swagger.annotations.ApiModel;
...
@@ -9,5 +10,19 @@ import io.swagger.annotations.ApiModel;
*/
*/
@ApiModel
(
value
=
"任务历史版本Dto"
,
description
=
"任务历史版本Dto"
)
@ApiModel
(
value
=
"任务历史版本Dto"
,
description
=
"任务历史版本Dto"
)
public
class
DmpDevelopTaskHistoryDto
extends
DmpDevelopTaskHistory
{
public
class
DmpDevelopTaskHistoryDto
extends
DmpDevelopTaskHistory
{
/**
* 创建用户名称
*/
@ApiModelProperty
(
value
=
"创建用户名称"
)
private
String
createUserName
;
public
String
getCreateUserName
()
{
return
createUserName
;
}
public
void
setCreateUserName
(
String
createUserName
)
{
this
.
createUserName
=
createUserName
;
}
}
}
src/main/java/com/jz/dmp/modules/controller/bean/DmpDevelopTaskHistoryRequest.java
View file @
daedaa9c
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
import
java.util.Date
;
import
java.util.Date
;
import
com.jz.common.annotation.FieldAssist
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -17,98 +18,121 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -17,98 +18,121 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
* 主键
* 主键
*/
*/
@ApiModelProperty
(
value
=
"主键"
)
@ApiModelProperty
(
value
=
"主键"
)
@FieldAssist
(
orderBy
=
"_history.id"
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 所属任务(关联任务主键)
* 所属任务(关联任务主键)
*/
*/
@ApiModelProperty
(
value
=
"所属任务(关联任务主键)"
)
@ApiModelProperty
(
value
=
"所属任务(关联任务主键)"
)
@FieldAssist
(
orderBy
=
"_history.task_id"
)
private
Integer
taskId
;
private
Integer
taskId
;
/**
/**
* tree ID
* tree ID
*/
*/
@ApiModelProperty
(
value
=
"tree ID"
)
@ApiModelProperty
(
value
=
"tree ID"
)
@FieldAssist
(
orderBy
=
"_history.tree_id"
)
private
Integer
treeId
;
private
Integer
treeId
;
/**
/**
* 数据源ID
* 数据源ID
*/
*/
@ApiModelProperty
(
value
=
"数据源ID"
)
@ApiModelProperty
(
value
=
"数据源ID"
)
@FieldAssist
(
orderBy
=
"_history.datasource_id"
)
private
Integer
datasourceId
;
private
Integer
datasourceId
;
/**
/**
* 任务类型
* 任务类型
*/
*/
@ApiModelProperty
(
value
=
"任务类型"
)
@ApiModelProperty
(
value
=
"任务类型"
)
@FieldAssist
(
orderBy
=
"_history.task_type"
)
private
String
taskType
;
private
String
taskType
;
/**
/**
* 类型
* 类型
*/
*/
@ApiModelProperty
(
value
=
"类型"
)
@ApiModelProperty
(
value
=
"类型"
)
@FieldAssist
(
orderBy
=
"_history.type"
)
private
String
type
;
private
String
type
;
/**
/**
* 调度类型
* 调度类型
*/
*/
@ApiModelProperty
(
value
=
"调度类型"
)
@ApiModelProperty
(
value
=
"调度类型"
)
@FieldAssist
(
orderBy
=
"_history.schedule_type"
)
private
String
scheduleType
;
private
String
scheduleType
;
/**
/**
* 是否已提交
* 是否已提交
*/
*/
@ApiModelProperty
(
value
=
"是否已提交"
)
@ApiModelProperty
(
value
=
"是否已提交"
)
@FieldAssist
(
orderBy
=
"_history.is_submit"
)
private
String
isSubmit
;
private
String
isSubmit
;
/**
/**
* 描述
* 描述
*/
*/
@ApiModelProperty
(
value
=
"描述"
)
@ApiModelProperty
(
value
=
"描述"
)
@FieldAssist
(
orderBy
=
"_history.task_desc"
)
private
String
taskDesc
;
private
String
taskDesc
;
/**
/**
* 脚本
* 脚本
*/
*/
@ApiModelProperty
(
value
=
"脚本"
)
@ApiModelProperty
(
value
=
"脚本"
)
@FieldAssist
(
orderBy
=
"_history.script"
)
private
String
script
;
private
String
script
;
/**
/**
* flow_header
* flow_header
*/
*/
@ApiModelProperty
(
value
=
"flow_header"
)
@ApiModelProperty
(
value
=
"flow_header"
)
@FieldAssist
(
orderBy
=
"_history.flow_header"
)
private
String
flowHeader
;
private
String
flowHeader
;
/**
/**
* flow_json
* flow_json
*/
*/
@ApiModelProperty
(
value
=
"flow_json"
)
@ApiModelProperty
(
value
=
"flow_json"
)
@FieldAssist
(
orderBy
=
"_history.flow_json"
)
private
String
flowJson
;
private
String
flowJson
;
/**
/**
* 版本
* 版本
*/
*/
@ApiModelProperty
(
value
=
"版本"
)
@ApiModelProperty
(
value
=
"版本"
)
@FieldAssist
(
orderBy
=
"_history.version"
)
private
String
version
;
private
String
version
;
/**
/**
* is_gziped
* is_gziped
*/
*/
@ApiModelProperty
(
value
=
"is_gziped"
)
@ApiModelProperty
(
value
=
"is_gziped"
)
@FieldAssist
(
orderBy
=
"_history.is_gziped"
)
private
String
isGziped
;
private
String
isGziped
;
/**
/**
* 任务数据状态
* 任务数据状态
*/
*/
@ApiModelProperty
(
value
=
"任务数据状态"
)
@ApiModelProperty
(
value
=
"任务数据状态"
)
@FieldAssist
(
orderBy
=
"_history.task_data_status"
)
private
String
taskDataStatus
;
private
String
taskDataStatus
;
/**
/**
* 任务创建用户ID
* 任务创建用户ID
*/
*/
@ApiModelProperty
(
value
=
"任务创建用户ID"
)
@ApiModelProperty
(
value
=
"任务创建用户ID"
)
@FieldAssist
(
orderBy
=
"_history.task_create_user_id"
)
private
String
taskCreateUserId
;
private
String
taskCreateUserId
;
/**
* 任务创建时间
*/
@ApiModelProperty
(
value
=
"任务创建时间"
)
@FieldAssist
(
orderBy
=
"_history.task_create_time"
)
private
Date
taskCreateTime
;
/**
/**
* 任务创建时间起
* 任务创建时间起
*/
*/
...
@@ -125,8 +149,16 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -125,8 +149,16 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
* 任务修改用户ID
* 任务修改用户ID
*/
*/
@ApiModelProperty
(
value
=
"任务修改用户ID"
)
@ApiModelProperty
(
value
=
"任务修改用户ID"
)
@FieldAssist
(
orderBy
=
"_history.task_update_user_id"
)
private
String
taskUpdateUserId
;
private
String
taskUpdateUserId
;
/**
* 任务修改时间
*/
@ApiModelProperty
(
value
=
"任务修改时间"
)
@FieldAssist
(
orderBy
=
"_history.task_update_time"
)
private
Date
taskUpdateTime
;
/**
/**
* 任务修改时间起
* 任务修改时间起
*/
*/
...
@@ -143,20 +175,30 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -143,20 +175,30 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
* 备注
* 备注
*/
*/
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
@FieldAssist
(
orderBy
=
"_history.remark"
)
private
String
remark
;
private
String
remark
;
/**
/**
* 数据状态(0:删除,1,未删除)
* 数据状态(0:删除,1,未删除)
*/
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@FieldAssist
(
orderBy
=
"_history.data_status"
)
private
String
dataStatus
;
private
String
dataStatus
;
/**
/**
* 创建用户ID
* 创建用户ID
*/
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
@ApiModelProperty
(
value
=
"创建用户ID"
)
@FieldAssist
(
orderBy
=
"_history.create_user_id"
)
private
Integer
createUserId
;
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@FieldAssist
(
orderBy
=
"_history.create_time"
)
private
Date
createTime
;
/**
/**
* 创建时间起
* 创建时间起
*/
*/
...
@@ -173,8 +215,16 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -173,8 +215,16 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
* 修改用户ID
* 修改用户ID
*/
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
@ApiModelProperty
(
value
=
"修改用户ID"
)
@FieldAssist
(
orderBy
=
"_history.update_user_id"
)
private
Integer
updateUserId
;
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@FieldAssist
(
orderBy
=
"_history.update_time"
)
private
Date
updateTime
;
/**
/**
* 修改时间起
* 修改时间起
*/
*/
...
@@ -315,6 +365,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -315,6 +365,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
this
.
taskCreateUserId
=
taskCreateUserId
;
this
.
taskCreateUserId
=
taskCreateUserId
;
}
}
public
Date
getTaskCreateTime
()
{
return
taskCreateTime
;
}
public
void
setTaskCreateTime
(
Date
taskCreateTime
)
{
this
.
taskCreateTime
=
taskCreateTime
;
}
public
Date
getTaskCreateTimeStart
()
{
public
Date
getTaskCreateTimeStart
()
{
return
taskCreateTimeStart
;
return
taskCreateTimeStart
;
}
}
...
@@ -339,6 +397,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -339,6 +397,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
this
.
taskUpdateUserId
=
taskUpdateUserId
;
this
.
taskUpdateUserId
=
taskUpdateUserId
;
}
}
public
Date
getTaskUpdateTime
()
{
return
taskUpdateTime
;
}
public
void
setTaskUpdateTime
(
Date
taskUpdateTime
)
{
this
.
taskUpdateTime
=
taskUpdateTime
;
}
public
Date
getTaskUpdateTimeStart
()
{
public
Date
getTaskUpdateTimeStart
()
{
return
taskUpdateTimeStart
;
return
taskUpdateTimeStart
;
}
}
...
@@ -379,6 +445,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -379,6 +445,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
this
.
createUserId
=
createUserId
;
this
.
createUserId
=
createUserId
;
}
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getCreateTimeStart
()
{
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
return
createTimeStart
;
}
}
...
@@ -403,6 +477,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
...
@@ -403,6 +477,14 @@ public class DmpDevelopTaskHistoryRequest extends BasePageBean {
this
.
updateUserId
=
updateUserId
;
this
.
updateUserId
=
updateUserId
;
}
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Date
getUpdateTimeStart
()
{
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
return
updateTimeStart
;
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/dataOperation/DmpDevExamplesController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
...
@@ -94,6 +96,7 @@ public class DmpDevExamplesController {
...
@@ -94,6 +96,7 @@ public class DmpDevExamplesController {
*/
*/
@ApiOperation
(
value
=
"设置SLA"
,
notes
=
"设置SLA"
)
@ApiOperation
(
value
=
"设置SLA"
,
notes
=
"设置SLA"
)
@PostMapping
(
value
=
"/setSla"
)
@PostMapping
(
value
=
"/setSla"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"设置SLA"
,
optModular
=
CommConstant
.
MODULAR_OPTCENTER_DATADEV
,
isProjOpt
=
true
)
public
JsonResult
setSla
(
@RequestBody
SetSlaReq
req
)
{
public
JsonResult
setSla
(
@RequestBody
SetSlaReq
req
)
{
JsonResult
result
=
new
JsonResult
();
JsonResult
result
=
new
JsonResult
();
try
{
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/dataOperation/DmpDevTaskController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataOperation
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.page.PageInfoResponse
;
import
com.jz.common.page.PageInfoResponse
;
...
@@ -69,6 +71,7 @@ public class DmpDevTaskController {
...
@@ -69,6 +71,7 @@ public class DmpDevTaskController {
@ApiOperation
(
value
=
"执行"
,
notes
=
"执行"
)
@ApiOperation
(
value
=
"执行"
,
notes
=
"执行"
)
@GetMapping
(
value
=
"/runTask"
)
@GetMapping
(
value
=
"/runTask"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_RUN
,
descrption
=
"任务执行"
,
optModular
=
CommConstant
.
MODULAR_OPTCENTER_DATADEV
,
isProjOpt
=
true
)
public
JsonResult
runTaskByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
public
JsonResult
runTaskByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiMangeController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.dmp.modules.controller.dataService.bean.*
;
import
com.jz.dmp.modules.controller.dataService.bean.*
;
...
@@ -67,6 +69,7 @@ public class DmpApiMangeController {
...
@@ -67,6 +69,7 @@ public class DmpApiMangeController {
@ApiOperation
(
value
=
"取消授权"
,
notes
=
"取消授权"
)
@ApiOperation
(
value
=
"取消授权"
,
notes
=
"取消授权"
)
@GetMapping
(
value
=
"/cancelApiAuth"
)
@GetMapping
(
value
=
"/cancelApiAuth"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"授权id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"授权id"
,
required
=
true
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_UNAUTH
,
descrption
=
"取消授权"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_AUTHMANAG
,
isProjOpt
=
true
)
public
JsonResult
getCancelApiAuth
(
@RequestParam
String
id
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
getCancelApiAuth
(
@RequestParam
String
id
,
HttpServletRequest
httpRequest
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"授权id不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"授权id不能为空!"
);
...
@@ -112,6 +115,7 @@ public class DmpApiMangeController {
...
@@ -112,6 +115,7 @@ public class DmpApiMangeController {
@GetMapping
(
value
=
"/delApiInfo"
)
@GetMapping
(
value
=
"/delApiInfo"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"apiKey"
,
value
=
"apiKey"
,
required
=
true
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"apiKey"
,
value
=
"apiKey"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型:0删除提示,1正式删除"
,
required
=
true
)})
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型:0删除提示,1正式删除"
,
required
=
true
)})
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除api"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
delApiInfo
(
@RequestParam
String
apiKey
,
@RequestParam
String
type
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
delApiInfo
(
@RequestParam
String
apiKey
,
@RequestParam
String
type
,
HttpServletRequest
httpRequest
)
{
if
(
StringUtils
.
isEmpty
(
apiKey
))
{
if
(
StringUtils
.
isEmpty
(
apiKey
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"apiKey不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"apiKey不能为空!"
);
...
@@ -268,6 +272,7 @@ public class DmpApiMangeController {
...
@@ -268,6 +272,7 @@ public class DmpApiMangeController {
@ApiOperation
(
value
=
"服务发布/服务取消"
,
notes
=
"服务发布/服务取消"
)
@ApiOperation
(
value
=
"服务发布/服务取消"
,
notes
=
"服务发布/服务取消"
)
@GetMapping
(
value
=
"/apiPublishCancel"
)
@GetMapping
(
value
=
"/apiPublishCancel"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_PUBLISHORUN
,
descrption
=
"服务发布/服务取消"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
apiPublishCancel
(
@RequestParam
String
id
,
@RequestParam
(
name
=
"optStatus"
)
Boolean
optStatus
)
{
public
JsonResult
apiPublishCancel
(
@RequestParam
String
id
,
@RequestParam
(
name
=
"optStatus"
)
Boolean
optStatus
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空!"
);
...
@@ -291,6 +296,7 @@ public class DmpApiMangeController {
...
@@ -291,6 +296,7 @@ public class DmpApiMangeController {
*/
*/
@ApiOperation
(
value
=
"盐值重置"
,
notes
=
"盐值重置"
)
@ApiOperation
(
value
=
"盐值重置"
,
notes
=
"盐值重置"
)
@PostMapping
(
value
=
"/saltReset"
)
@PostMapping
(
value
=
"/saltReset"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"盐值重置"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_AUTHMANAG
,
isProjOpt
=
true
)
public
JsonResult
saltReset
(
@RequestBody
@Validated
SaltResetReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
saltReset
(
@RequestBody
@Validated
SaltResetReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
@@ -331,6 +337,7 @@ public class DmpApiMangeController {
...
@@ -331,6 +337,7 @@ public class DmpApiMangeController {
*/
*/
@ApiOperation
(
value
=
"授权"
,
notes
=
"授权"
)
@ApiOperation
(
value
=
"授权"
,
notes
=
"授权"
)
@PostMapping
(
value
=
"/authUserApi"
)
@PostMapping
(
value
=
"/authUserApi"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_AUTH
,
descrption
=
"授权"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
authUserApi
(
@RequestBody
@Validated
AuthUserApiReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
authUserApi
(
@RequestBody
@Validated
AuthUserApiReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
@@ -352,6 +359,7 @@ public class DmpApiMangeController {
...
@@ -352,6 +359,7 @@ public class DmpApiMangeController {
@ApiOperation
(
value
=
"服务开发--上传"
,
notes
=
"上传"
)
@ApiOperation
(
value
=
"服务开发--上传"
,
notes
=
"上传"
)
@GetMapping
(
value
=
"/serverUpload"
)
@GetMapping
(
value
=
"/serverUpload"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_UPLOAD
,
descrption
=
"服务开发--上传"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
serverUpload
(
@RequestParam
String
id
)
{
public
JsonResult
serverUpload
(
@RequestParam
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空!"
);
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiServiceMangeController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.SourceDbNameListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.SourceDbNameListDto
;
...
@@ -56,6 +58,7 @@ public class DmpApiServiceMangeController {
...
@@ -56,6 +58,7 @@ public class DmpApiServiceMangeController {
*/
*/
@ApiOperation
(
value
=
"制作/编辑API(第三方)和(大数据查询/标签查询)"
,
notes
=
"保存/编辑API(第三方)"
)
@ApiOperation
(
value
=
"制作/编辑API(第三方)和(大数据查询/标签查询)"
,
notes
=
"保存/编辑API(第三方)"
)
@PostMapping
(
value
=
"/saveApi"
)
@PostMapping
(
value
=
"/saveApi"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"制作/编辑API(第三方)和(大数据查询/标签查询)"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
saveApiInfo
(
@RequestBody
@Validated
ApiInterfaceReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
saveApiInfo
(
@RequestBody
@Validated
ApiInterfaceReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
@@ -321,6 +324,7 @@ public class DmpApiServiceMangeController {
...
@@ -321,6 +324,7 @@ public class DmpApiServiceMangeController {
@ApiOperation
(
value
=
"删除文件夹"
,
notes
=
"删除文件夹"
)
@ApiOperation
(
value
=
"删除文件夹"
,
notes
=
"删除文件夹"
)
@GetMapping
(
value
=
"/delFolder"
)
@GetMapping
(
value
=
"/delFolder"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"文件夹id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"文件夹id"
,
required
=
true
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除文件夹"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
delFolderById
(
@RequestParam
String
id
)
throws
Exception
{
public
JsonResult
delFolderById
(
@RequestParam
String
id
)
throws
Exception
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
@@ -361,6 +365,7 @@ public class DmpApiServiceMangeController {
...
@@ -361,6 +365,7 @@ public class DmpApiServiceMangeController {
*/
*/
@ApiOperation
(
value
=
"创建/编辑项目文件夹"
,
notes
=
"创建/编辑项目文件夹"
)
@ApiOperation
(
value
=
"创建/编辑项目文件夹"
,
notes
=
"创建/编辑项目文件夹"
)
@PostMapping
(
value
=
"/createProjectFolder"
)
@PostMapping
(
value
=
"/createProjectFolder"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADDOREDIT
,
descrption
=
"创建/编辑项目文件夹"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_DEV
,
isProjOpt
=
true
)
public
JsonResult
createProjectFolder
(
@RequestBody
@Validated
CreateFolderReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
createProjectFolder
(
@RequestBody
@Validated
CreateFolderReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpOrgMangeController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
import
com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto
;
...
@@ -68,6 +70,7 @@ public class DmpOrgMangeController {
...
@@ -68,6 +70,7 @@ public class DmpOrgMangeController {
@ApiOperation
(
value
=
"删除组织"
,
notes
=
"删除组织"
)
@ApiOperation
(
value
=
"删除组织"
,
notes
=
"删除组织"
)
@GetMapping
(
value
=
"/delOrg"
)
@GetMapping
(
value
=
"/delOrg"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"组织id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"组织id"
,
required
=
true
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除组织"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_ORG
,
isProjOpt
=
true
)
public
JsonResult
delOrgById
(
@RequestParam
long
id
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
delOrgById
(
@RequestParam
long
id
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
@@ -89,6 +92,7 @@ public class DmpOrgMangeController {
...
@@ -89,6 +92,7 @@ public class DmpOrgMangeController {
*/
*/
@ApiOperation
(
value
=
"新增组织"
,
notes
=
"新增组织"
)
@ApiOperation
(
value
=
"新增组织"
,
notes
=
"新增组织"
)
@PostMapping
(
value
=
"/addOrg"
)
@PostMapping
(
value
=
"/addOrg"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新增组织"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_ORG
,
isProjOpt
=
true
)
public
JsonResult
addOrg
(
@RequestBody
@Validated
OrganizationManageAddReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
addOrg
(
@RequestBody
@Validated
OrganizationManageAddReq
req
,
HttpServletRequest
httpRequest
)
{
if
(
StringUtils
.
isEmpty
(
req
.
getOrgName
()))
{
if
(
StringUtils
.
isEmpty
(
req
.
getOrgName
()))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"组织名称不能为空!"
);
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"组织名称不能为空!"
);
...
@@ -116,6 +120,7 @@ public class DmpOrgMangeController {
...
@@ -116,6 +120,7 @@ public class DmpOrgMangeController {
*/
*/
@ApiOperation
(
value
=
"编辑组织"
,
notes
=
"编辑组织"
)
@ApiOperation
(
value
=
"编辑组织"
,
notes
=
"编辑组织"
)
@PostMapping
(
value
=
"/updateOrg"
)
@PostMapping
(
value
=
"/updateOrg"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"编辑组织"
,
optModular
=
CommConstant
.
MODULAR_DATASERVICE_ORG
,
isProjOpt
=
true
)
public
JsonResult
updateOrg
(
@RequestBody
@Validated
OrganizationManageUpdateReq
req
,
HttpServletRequest
httpRequest
)
{
public
JsonResult
updateOrg
(
@RequestBody
@Validated
OrganizationManageUpdateReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
JsonResult
jsonResult
=
new
JsonResult
();
try
{
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/projconfig/DmpProjectConfigInfoController.java
View file @
daedaa9c
...
@@ -82,6 +82,7 @@ public class DmpProjectConfigInfoController {
...
@@ -82,6 +82,7 @@ public class DmpProjectConfigInfoController {
@MethodCallLogPrint
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addOrEdit"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addOrEdit"
)
@ApiOperation
(
value
=
"新增或修改项目配置表"
,
notes
=
"新增或修改项目配置表"
)
@ApiOperation
(
value
=
"新增或修改项目配置表"
,
notes
=
"新增或修改项目配置表"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"组织id"
,
required
=
true
)
public
BaseBeanResponse
<
DmpProjectConfigInfo
>
addOrEdit
(
@RequestBody
DmpProjectConfigInfo
dmpProjectConfigInfo
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
DmpProjectConfigInfo
>
addOrEdit
(
@RequestBody
DmpProjectConfigInfo
dmpProjectConfigInfo
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpProjectConfigInfo
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProjectConfigInfo
>();
BaseBeanResponse
<
DmpProjectConfigInfo
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProjectConfigInfo
>();
try
{
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/sys/SystemCommonController.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
;
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
;
import
java.util.Date
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -46,4 +48,23 @@ public class SystemCommonController {
...
@@ -46,4 +48,23 @@ public class SystemCommonController {
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
/**根据调度生成时间
* @param corn
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/getCornTimes"
)
@ApiOperation
(
value
=
"根据调度生成时间"
,
notes
=
"根据调度生成时间"
)
public
BaseBeanResponse
<
String
>
getCornTimes
(
String
corn
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
String
>
baseBeanResponse
=
new
BaseBeanResponse
<
String
>();
try
{
baseBeanResponse
=
systemCommonService
.
getCornTimes
(
corn
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"获取失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskHistoryServiceImpl.java
View file @
daedaa9c
...
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
...
@@ -188,7 +189,13 @@ public class DmpDevelopTaskHistoryServiceImpl extends BaseService implements Dmp
...
@@ -188,7 +189,13 @@ public class DmpDevelopTaskHistoryServiceImpl extends BaseService implements Dmp
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
param
.
put
(
"updateTimeEnd"
,
dmpDevelopTaskHistoryRequest
.
getUpdateTimeEnd
());
}
}
PageHelper
.
startPage
(
dmpDevelopTaskHistoryRequest
.
getPageNum
(),
dmpDevelopTaskHistoryRequest
.
getPageSize
());
String
obderByStr
=
dmpDevelopTaskHistoryRequest
.
takeOrderByStr
(
DmpDevelopTaskHistoryRequest
.
class
);
Page
page
=
null
;
if
(
obderByStr
==
null
)
{
page
=
PageHelper
.
startPage
(
dmpDevelopTaskHistoryRequest
.
getPageNum
(),
dmpDevelopTaskHistoryRequest
.
getPageSize
());
}
else
{
page
=
PageHelper
.
startPage
(
dmpDevelopTaskHistoryRequest
.
getPageNum
(),
dmpDevelopTaskHistoryRequest
.
getPageSize
(),
obderByStr
);
}
List
<
DmpDevelopTaskHistoryDto
>
list
=
dmpDevelopTaskHistoryMapper
.
findList
(
param
);
List
<
DmpDevelopTaskHistoryDto
>
list
=
dmpDevelopTaskHistoryMapper
.
findList
(
param
);
PageInfo
<
DmpDevelopTaskHistoryDto
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
DmpDevelopTaskHistoryDto
>
pageInfo
=
new
PageInfo
<>(
list
);
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
daedaa9c
...
@@ -1308,6 +1308,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1308,6 +1308,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
BaseBeanResponse
<
DmpDevelopTaskDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
BaseBeanResponse
<
DmpDevelopTaskDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpDevelopTask
dmpDevelopTask
=
dmpDevelopTaskDao
.
selectTaskInfoByParam
(
treeId
);
DmpDevelopTask
dmpDevelopTask
=
dmpDevelopTaskDao
.
selectTaskInfoByParam
(
treeId
);
//dmpDevelopTask.setScript(new String(dmpDevelopTask.getData(), "utf-8"));
DmpDevelopTaskDto
dmpDevelopTaskDto
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
domain2dto
(
dmpDevelopTask
);
DmpDevelopTaskDto
dmpDevelopTaskDto
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
domain2dto
(
dmpDevelopTask
);
...
@@ -1346,6 +1348,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1346,6 +1348,8 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
String
version
=
CodeGeneratorUtils
.
generatorNextTaskVesion
(
dmpDevelopTaskDb
.
getVersion
());
String
version
=
CodeGeneratorUtils
.
generatorNextTaskVesion
(
dmpDevelopTaskDb
.
getVersion
());
dmpDevelopTask
.
setVersion
(
version
);
dmpDevelopTask
.
setVersion
(
version
);
//dmpDevelopTask.setData(dmpDevelopTask.getScript().getBytes("utf-8"));
dmpDevelopTaskDao
.
update
(
dmpDevelopTask
);
dmpDevelopTaskDao
.
update
(
dmpDevelopTask
);
...
...
src/main/java/com/jz/dmp/modules/service/sys/SystemCommonService.java
View file @
daedaa9c
...
@@ -24,4 +24,16 @@ public interface SystemCommonService {
...
@@ -24,4 +24,16 @@ public interface SystemCommonService {
*/
*/
public
BaseBeanResponse
<
String
>
getResubmitToken
(
HttpServletRequest
httpRequest
)
throws
Exception
;
public
BaseBeanResponse
<
String
>
getResubmitToken
(
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: getCornTimes
* @Description: TODO(根据corn获取调度时间)
* @param @param corn
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseBeanResponse<String> 返回类型
* @throws
*/
public
BaseBeanResponse
<
String
>
getCornTimes
(
String
corn
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/SystemCommonServiceImpl.java
View file @
daedaa9c
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.scheduling.support.CronSequenceGenerator
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.utils.HttpRequestUtil
;
import
com.jz.common.utils.HttpRequestUtil
;
import
com.jz.dmp.modules.service.sys.SystemCommonService
;
import
com.jz.dmp.modules.service.sys.SystemCommonService
;
...
@@ -33,4 +43,46 @@ public class SystemCommonServiceImpl implements SystemCommonService {
...
@@ -33,4 +43,46 @@ public class SystemCommonServiceImpl implements SystemCommonService {
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
@Override
public
BaseBeanResponse
<
String
>
getCornTimes
(
String
corn
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
String
>
baseBeanResponse
=
new
BaseBeanResponse
<
String
>();
//CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator("* * * * * ?");
corn
=
corn
.
replace
(
"/"
,
"0/"
);
CronSequenceGenerator
cronSequenceGenerator
=
new
CronSequenceGenerator
(
corn
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
String
>
list
=
new
ArrayList
<
String
>(
10
);
Date
nextTimePoint
=
new
Date
();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
nextTimePoint
=
cronSequenceGenerator
.
next
(
nextTimePoint
);
list
.
add
(
sdf
.
format
(
nextTimePoint
));
}
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"生成成功"
);
baseBeanResponse
.
setDatas
(
list
);
return
baseBeanResponse
;
}
public
static
void
main
(
String
[]
args
)
{
CronSequenceGenerator
cronSequenceGenerator
=
new
CronSequenceGenerator
(
"0 1-3 * * * ?"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
String
>
list
=
new
ArrayList
<
String
>(
10
);
Date
nextTimePoint
=
new
Date
();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
nextTimePoint
=
cronSequenceGenerator
.
next
(
nextTimePoint
);
list
.
add
(
sdf
.
format
(
nextTimePoint
));
}
System
.
out
.
println
(
JSONObject
.
toJSONString
(
list
));
}
}
}
src/main/resources/application-test.yml
View file @
daedaa9c
# 测试环境配置
# 测试环境配置
server
:
server
:
port
:
718
3
port
:
718
1
#contextPath: /resource
#contextPath: /resource
management
:
management
:
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskHistoryMapper.xml
View file @
daedaa9c
...
@@ -33,28 +33,30 @@
...
@@ -33,28 +33,30 @@
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto"
extends=
"BaseResultMap"
>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
<!-- /*$BaseDtoResultMapContent$*/ -->
<result
column=
"user_name"
property=
"createUserName"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, task_id, tree_id, datasource_id,
task_type,
_history.id, _history.task_id, _history.tree_id, _history.datasource_id, _history.
task_type,
type, schedule_type, is_submit, task_desc,
script,
_history.type, _history.schedule_type, _history.is_submit, _history.task_desc, _history.
script,
flow_header, flow_json, version, is_gziped,
task_data_status,
_history.flow_header, _history.flow_json, _history.version, _history.is_gziped, _history.
task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time,
remark,
_history.task_create_user_id, _history.task_create_time, _history.task_update_user_id, _history.task_update_time, _history.
remark,
data_status, create_user_id, create_time, update_user_id,
update_time
_history.data_status, _history.create_user_id, _history.create_time, _history.update_user_id, _history.
update_time
</sql>
</sql>
<sql
id=
"BaseDto_Column_List"
>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
<!-- /*$BaseDtoColumnListContent$*/ -->
, _user.user_name
</sql>
</sql>
<!-- 根据主键查询任务历史版本 -->
<!-- 根据主键查询任务历史版本 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from dmp_develop_task_history
from dmp_develop_task_history
_history
where id = #{id,jdbcType=INTEGER}
where
_history.
id = #{id,jdbcType=INTEGER}
AND data_status='1'
AND
_history.
data_status='1'
</select>
</select>
<!-- 根据主键删除任务历史版本 -->
<!-- 根据主键删除任务历史版本 -->
...
@@ -581,96 +583,96 @@
...
@@ -581,96 +583,96 @@
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
SELECT
<include
refid=
"BaseDto_Column_List"
/>
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_develop_task_history
FROM dmp_develop_task_history _history
LEFT JOIN dmp_member _user ON _history.CREATE_USER_ID=_user.user_id
<where>
<where>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
AND id = #{id,jdbcType=INTEGER}
AND
_history.
id = #{id,jdbcType=INTEGER}
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"taskId != null"
>
AND task_id = #{taskId,jdbcType=INTEGER}
AND
_history.
task_id = #{taskId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"treeId != null"
>
<if
test=
"treeId != null"
>
AND tree_id = #{treeId,jdbcType=INTEGER}
AND
_history.
tree_id = #{treeId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"datasourceId != null"
>
<if
test=
"datasourceId != null"
>
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
AND
_history.
datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"taskType != null"
>
<if
test=
"taskType != null"
>
AND task_type = #{taskType,jdbcType=CHAR}
AND
_history.
task_type = #{taskType,jdbcType=CHAR}
</if>
</if>
<if
test=
"type != null"
>
<if
test=
"type != null"
>
AND type = #{type,jdbcType=CHAR}
AND
_history.
type = #{type,jdbcType=CHAR}
</if>
</if>
<if
test=
"scheduleType != null"
>
<if
test=
"scheduleType != null"
>
AND schedule_type = #{scheduleType,jdbcType=CHAR}
AND
_history.
schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
</if>
<if
test=
"isSubmit != null"
>
<if
test=
"isSubmit != null"
>
AND is_submit = #{isSubmit,jdbcType=CHAR}
AND
_history.
is_submit = #{isSubmit,jdbcType=CHAR}
</if>
</if>
<if
test=
"taskDesc != null"
>
<if
test=
"taskDesc != null"
>
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
AND
_history.
task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"script != null"
>
<if
test=
"script != null"
>
AND
script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler
}
AND
_history.script = #{script,jdbcType=LONGBLOB
}
</if>
</if>
<if
test=
"flowHeader != null"
>
<if
test=
"flowHeader != null"
>
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
AND
_history.
flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"flowJson != null"
>
<if
test=
"flowJson != null"
>
AND
flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler
}
AND
_history.flow_json = #{flowJson,jdbcType=LONGBLOB
}
</if>
</if>
<if
test=
"version != null"
>
<if
test=
"version != null"
>
AND version = #{version,jdbcType=VARCHAR}
AND
_history.
version = #{version,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"isGziped != null"
>
<if
test=
"isGziped != null"
>
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
AND
_history.
is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"taskDataStatus != null"
>
<if
test=
"taskDataStatus != null"
>
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
AND
_history.
task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
</if>
<if
test=
"taskCreateUserId != null"
>
<if
test=
"taskCreateUserId != null"
>
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
AND
_history.
task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
</if>
<if
test=
"taskCreateTimeStart != null"
>
<if
test=
"taskCreateTimeStart != null"
>
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
AND
_history.
task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"taskCreateTimeEnd != null"
>
<if
test=
"taskCreateTimeEnd != null"
>
AND task_create_time
<![CDATA[ <= ]]>
#{taskCreateTimeEnd,jdbcType=TIMESTAMP}
AND
_history.
task_create_time
<![CDATA[ <= ]]>
#{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"taskUpdateUserId != null"
>
<if
test=
"taskUpdateUserId != null"
>
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
AND
_history.
task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
</if>
<if
test=
"taskUpdateTimeStart != null"
>
<if
test=
"taskUpdateTimeStart != null"
>
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
AND
_history.
task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"taskUpdateTimeEnd != null"
>
<if
test=
"taskUpdateTimeEnd != null"
>
AND task_update_time
<![CDATA[ <= ]]>
#{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
AND
_history.
task_update_time
<![CDATA[ <= ]]>
#{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
AND
_history.
remark = #{remark,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"dataStatus != null"
>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
AND
_history.
data_status = #{dataStatus,jdbcType=CHAR}
</if>
</if>
<if
test=
"createUserId != null"
>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
AND
_history.
create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"createTimeStart != null"
>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
AND
_history.
create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"createTimeEnd != null"
>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
AND
_history.
create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"updateUserId != null"
>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
AND
_history.
update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
</if>
<if
test=
"updateTimeStart != null"
>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
AND
_history.
update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"updateTimeEnd != null"
>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
AND
_history.
update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</if>
AND data_status='1'
</where>
</where>
</select>
</select>
...
@@ -678,9 +680,10 @@
...
@@ -678,9 +680,10 @@
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
select
<include
refid=
"BaseDto_Column_List"
/>
<include
refid=
"BaseDto_Column_List"
/>
from dmp_develop_task_history
from dmp_develop_task_history _history
where id = #{id,jdbcType=INTEGER}
LEFT JOIN dmp_member _user ON _history.CREATE_USER_ID=_user.user_id
AND data_status='1'
where _history.id = #{id,jdbcType=INTEGER}
AND _history.data_status='1'
</select>
</select>
<!-- 根据主键批量删除任务历史版本 -->
<!-- 根据主键批量删除任务历史版本 -->
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
daedaa9c
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
where ID = #{id}
where ID = #{id}
</update>
</update>
<select
id=
"selectTaskInfoByParam"
parameterType=
"map"
result
Type=
"com.jz.dmp.modules.model.DmpDevelopTask
"
>
<select
id=
"selectTaskInfoByParam"
parameterType=
"map"
result
Map=
"DmpDevelopTaskResultMap
"
>
SELECT
SELECT
task.id,task.task_type,task.type,task.schedule_type,task.is_submit,task.task_desc,task.script,task.data_status,task.create_user_id,task.create_time,
task.id,task.task_type,task.type,task.schedule_type,task.is_submit,task.task_desc,task.script,task.data_status,task.create_user_id,task.create_time,
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
...
@@ -253,7 +253,7 @@
...
@@ -253,7 +253,7 @@
WHERE task.tree_id = #{id}
WHERE task.tree_id = #{id}
</select>
</select>
<select
id=
"selectTaskById"
result
Type=
"com.jz.dmp.modules.model.DmpDevelopTask
"
>
<select
id=
"selectTaskById"
result
Map=
"DmpDevelopTaskResultMap
"
>
select
select
<include
refid=
"FIND_ALL_COLUMN"
/>
<include
refid=
"FIND_ALL_COLUMN"
/>
from dmp_develop_task
from dmp_develop_task
...
...
src/main/resources/mapper/sys/DmpRoleMapper.xml
View file @
daedaa9c
...
@@ -307,6 +307,11 @@
...
@@ -307,6 +307,11 @@
left join dmp_member member on mprole.user_id=member.user_id
left join dmp_member member on mprole.user_id=member.user_id
where member.data_status='1'
where member.data_status='1'
group by role.role_code,role.role_name
group by role.role_code,role.role_name
UNION
select
'' AS roleCode,'全部' AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member member
where member.data_status='1'
</select>
</select>
</mapper>
</mapper>
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