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
ccb56a80
Commit
ccb56a80
authored
Mar 03, 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
688f3c6a
3f961945
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
2279 additions
and
8 deletions
+2279
-8
SysOperationLogAnnotation.java
...a/com/jz/common/annotation/SysOperationLogAnnotation.java
+20
-0
SysOperationLogAspect.java
...main/java/com/jz/common/aspect/SysOperationLogAspect.java
+144
-0
AzkabanApiUtils2.java
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
+1
-0
FlowParseTool.java
src/main/java/com/jz/common/utils/FlowParseTool.java
+11
-2
DmpDevelopTaskController.java
...m/jz/dmp/modules/controller/DmpDevelopTaskController.java
+3
-0
DmpOptLogBatch.java
...va/com/jz/dmp/modules/controller/bean/DmpOptLogBatch.java
+23
-0
DmpOptLogDto.java
...java/com/jz/dmp/modules/controller/bean/DmpOptLogDto.java
+13
-0
DmpOptLogRequest.java
.../com/jz/dmp/modules/controller/bean/DmpOptLogRequest.java
+293
-0
MyDmpOptLogConverter.java
.../jz/dmp/modules/controller/bean/MyDmpOptLogConverter.java
+54
-0
DmpOptLogMapper.java
src/main/java/com/jz/dmp/modules/dao/DmpOptLogMapper.java
+118
-0
DmpOptLog.java
src/main/java/com/jz/dmp/modules/model/DmpOptLog.java
+249
-0
DmpOptLogService.java
...ain/java/com/jz/dmp/modules/service/DmpOptLogService.java
+137
-0
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+6
-4
DmpOptLogServiceImpl.java
...com/jz/dmp/modules/service/impl/DmpOptLogServiceImpl.java
+689
-0
FlowServiceImpl.java
...java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
+7
-1
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+1
-1
DmpOptLogMapper.xml
src/main/resources/mapper/dmp/DmpOptLogMapper.xml
+510
-0
No files found.
src/main/java/com/jz/common/annotation/SysOperationLogAnnotation.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
common
.
annotation
;
import
java.lang.annotation.*
;
/**
* 操作日志切面注解
* @author ybz
* @Title: SysOperationLogAnnotation
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
//元注解,定义注解被保留策略,一般有三种策略
//1、RetentionPolicy.SOURCE 注解只保留在源文件中,在编译成class文件的时候被遗弃
//2、RetentionPolicy.CLASS 注解被保留在class中,但是在jvm加载的时候北欧抛弃,这个是默认的声明周期
//3、RetentionPolicy.RUNTIME 注解在jvm加载的时候仍被保留
@Target
({
ElementType
.
METHOD
})
//定义了注解声明在哪些元素之前
@Documented
public
@interface
SysOperationLogAnnotation
{
//定义成员
String
descrption
()
default
""
;
//描述
String
actionType
()
default
""
;
//操作的类型,1、添加 2、修改 3、删除 4、查询
}
src/main/java/com/jz/common/aspect/SysOperationLogAspect.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
common
.
aspect
;
import
java.lang.reflect.Method
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.utils.HttpRequestUtil
;
import
com.jz.common.utils.web.SessionUtils
;
import
com.jz.dmp.modules.model.DmpOptLog
;
import
com.jz.dmp.modules.service.DmpOptLogService
;
/**系统操作日志
* @author ybz
*
*/
@Aspect
@Component
public
class
SysOperationLogAspect
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
SysOperationLogAspect
.
class
);
@Autowired
private
DmpOptLogService
dmpOptLogService
;
@Pointcut
(
"@annotation( com.jz.common.annotation.SysOperationLogAnnotation)"
)
public
void
sysOperationLogPointCut
(){
}
@Around
(
"sysOperationLogPointCut()"
)
public
Object
saveSysOperationLog
(
ProceedingJoinPoint
pjp
)
throws
Throwable
{
System
.
out
.
println
(
"=============== 保存操作日志 ==============="
);
//参数准备
Date
optTime
=
new
Date
();
//保存日志
DmpOptLog
dmpOptLog
=
new
DmpOptLog
();
//设置操作时间
dmpOptLog
.
setOptTime
(
optTime
);
dmpOptLog
.
setCreateTime
(
optTime
);
//从切面织入点处通过反射机制获取织入点处的方法
MethodSignature
signature
=
(
MethodSignature
)
pjp
.
getSignature
();
//获取切入点所在的方法
Method
method
=
signature
.
getMethod
();
//获取操作
SysOperationLogAnnotation
operationLogAnnotation
=
method
.
getAnnotation
(
SysOperationLogAnnotation
.
class
);
if
(
operationLogAnnotation
!=
null
)
{
String
optType
=
operationLogAnnotation
.
actionType
();
String
optDesc
=
operationLogAnnotation
.
descrption
();
dmpOptLog
.
setOptType
(
optType
);
//保存获取的操作
dmpOptLog
.
setOptDesc
(
optDesc
);
}
//获取请求的类名
String
className
=
pjp
.
getTarget
().
getClass
().
getName
();
//获取请求的方法名
String
methodName
=
method
.
getName
();
dmpOptLog
.
setMethod
(
className
+
"."
+
methodName
);
//请求的参数
String
[]
argNames
=
signature
.
getParameterNames
();
// 参数名
Object
[]
argObjs
=
pjp
.
getArgs
()
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
for
(
int
index
=
0
;
index
<
argNames
.
length
;
index
++)
{
String
argName
=
argNames
[
index
];
Object
argObj
=
argObjs
[
index
];
if
(
argObj
instanceof
HttpServletRequest
)
{
continue
;
}
paramMap
.
put
(
argName
,
argObj
);
}
dmpOptLog
.
setRequestParam
(
JSONObject
.
toJSONString
(
paramMap
));
// 保存操作用户信息
String
userId
=
SessionUtils
.
getCurrentUserId
();
dmpOptLog
.
setUserId
(
Integer
.
parseInt
(
userId
));
dmpOptLog
.
setUserName
(
SessionUtils
.
getCurrentUserName
());
dmpOptLog
.
setCreateUserId
(
Integer
.
parseInt
(
userId
));
//设置ip
String
optIp
=
""
;
try
{
// 获取request
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
optIp
=
HttpRequestUtil
.
getNginxRealIp
(
request
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
info
(
"ip获取异常:"
+
e
.
getMessage
());
}
dmpOptLog
.
setOptIp
(
optIp
);
Object
obj
;
try
{
obj
=
pjp
.
proceed
();
dmpOptLog
.
setOptResult
(
JSONObject
.
toJSONString
(
obj
));
//调用service保存SysLog实体类到数据库
try
{
dmpOptLogService
.
add
(
dmpOptLog
,
null
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"插入操作日志异常。e:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
catch
(
Throwable
e1
)
{
e1
.
printStackTrace
();
dmpOptLog
.
setOptResult
(
e1
.
getMessage
());
dmpOptLog
.
setRemark
(
"系统异常"
);
//调用service保存SysLog实体类到数据库
try
{
dmpOptLogService
.
add
(
dmpOptLog
,
null
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"插入操作日志异常。e:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
throw
e1
;
}
return
obj
;
}
}
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
View file @
ccb56a80
...
...
@@ -117,6 +117,7 @@ public class AzkabanApiUtils2 {
}
System
.
err
.
println
(
"----sessionId="
+
sessionId
);
LOGGER
.
info
(
"----sessionId="
+
sessionId
);
return
sessionId
;
//SessionUtils.getSession().getId();
}
...
...
src/main/java/com/jz/common/utils/FlowParseTool.java
View file @
ccb56a80
...
...
@@ -432,6 +432,10 @@ public class FlowParseTool {
contents
=
new
ArrayList
<>();
FlowNode
flowNode
=
iterator
.
next
().
getValue
();
String
nodeType
=
flowNode
.
getNodeType
();
if
(
"start"
.
equalsIgnoreCase
(
nodeType
))
{
azkabanJobType
=
"command"
;
azkabanJobCommand
=
"command= echo '============================> start'"
;
}
if
(
"shell"
.
equalsIgnoreCase
(
nodeType
))
{
// shell
azkabanJobType
=
"command"
;
...
...
@@ -467,11 +471,16 @@ public class FlowParseTool {
//hdfs
azkabanJobType
=
"command"
;
azkabanJobCommand
=
generateExecutorToolCommand
(
taskId
,
flowNode
.
getNodeName
(),
false
);
}
else
if
(
"stop"
.
equalsIgnoreCase
(
nodeType
))
{
azkabanJobType
=
"command"
;
azkabanJobCommand
=
"command= echo '============================> end'"
;
}
//子流程类型
contents
.
add
(
"type="
+
azkabanJobType
);
if
(!
StringUtils
.
isEmpty
(
azkabanJobCommand
))
{
contents
.
add
(
azkabanJobCommand
);
}
String
dependenciesNodeName
=
flowNode
.
getDependedNodeName
();
if
(
StringUtils
.
isNotBlank
(
dependenciesNodeName
))
{
...
...
@@ -511,7 +520,7 @@ public class FlowParseTool {
* @throws
*/
public
static
String
generateExecutorToolCommand
(
Integer
taskId
,
String
jobId
,
boolean
isSingle
)
{
String
command
=
"command= java -jar
jz-dmp-service
.jar "
+
taskId
+
" "
+
jobId
+
" "
+
isSingle
;
String
command
=
"command= java -jar
/app/bigdata-app/dmp_cmdexecutortool/jz-dmp-cmdexectool
.jar "
+
taskId
+
" "
+
jobId
+
" "
+
isSingle
;
return
command
;
}
...
...
src/main/java/com/jz/dmp/modules/controller/DmpDevelopTaskController.java
View file @
ccb56a80
...
...
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
...
...
@@ -45,6 +46,7 @@ public class DmpDevelopTaskController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findListWithPage"
)
@ApiOperation
(
value
=
"分頁列表查询任务开发"
,
notes
=
"分頁列表查询任务开发"
)
@SysOperationLogAnnotation
(
actionType
=
"分頁列表查询任务开发"
,
descrption
=
"分頁列表查询任务开发"
)
public
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
@RequestBody
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
){
PageInfoResponse
<
DmpDevelopTaskDto
>
pageInfo
=
new
PageInfoResponse
<
DmpDevelopTaskDto
>();
try
{
...
...
@@ -125,6 +127,7 @@ public class DmpDevelopTaskController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/flowSubmit"
)
@ApiOperation
(
value
=
"任务流程发布接口"
,
notes
=
"任务流程发布接口"
)
@ApiImplicitParam
(
name
=
"treeId"
,
value
=
"发布任务树主键"
)
@MethodCallLogPrint
public
BaseResponse
flowSubmit
(
@RequestParam
(
value
=
"treeId"
,
required
=
true
)
Long
treeId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
...
...
src/main/java/com/jz/dmp/modules/controller/bean/DmpOptLogBatch.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpOptLog
;
/**
* @author ybz
*
*/
public
class
DmpOptLogBatch
{
private
List
<
DmpOptLog
>
dmpOptLogs
;
public
List
<
DmpOptLog
>
getDmpOptLogs
()
{
return
dmpOptLogs
;
}
public
void
setDmpOptLogs
(
List
<
DmpOptLog
>
dmpOptLogs
)
{
this
.
dmpOptLogs
=
dmpOptLogs
;
}
}
src/main/java/com/jz/dmp/modules/controller/bean/DmpOptLogDto.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
com.jz.dmp.modules.model.DmpOptLog
;
import
io.swagger.annotations.ApiModel
;
/**操作日志表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"操作日志表Dto"
,
description
=
"操作日志表Dto"
)
public
class
DmpOptLogDto
extends
DmpOptLog
{
}
src/main/java/com/jz/dmp/modules/controller/bean/DmpOptLogRequest.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.Date
;
import
com.jz.common.annotation.FieldAssist
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**操作日志表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"操作日志表参数请求封装"
,
description
=
"操作日志表参数请求封装"
)
public
class
DmpOptLogRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
@FieldAssist
(
orderBy
=
"log.opt_id"
)
private
Integer
optId
;
/**
* 操作人ID
*/
@ApiModelProperty
(
value
=
"操作人ID"
)
@FieldAssist
(
orderBy
=
"log.user_id"
)
private
Integer
userId
;
/**
* 操作人姓名
*/
@ApiModelProperty
(
value
=
"操作人姓名"
)
@FieldAssist
(
orderBy
=
"log.user_name"
)
private
String
userName
;
/**
* 操作时间起
*/
@ApiModelProperty
(
value
=
"操作时间起"
)
private
Date
optTimeStart
;
/**
* 操作时间止
*/
@ApiModelProperty
(
value
=
"操作时间止"
)
private
Date
optTimeEnd
;
/**
* 操作类型
*/
@ApiModelProperty
(
value
=
"操作类型"
)
@FieldAssist
(
orderBy
=
"log.opt_type"
)
private
String
optType
;
/**
* 操作描述
*/
@ApiModelProperty
(
value
=
"操作描述"
)
@FieldAssist
(
orderBy
=
"log.opt_desc"
)
private
String
optDesc
;
/**
* 操作方法
*/
@ApiModelProperty
(
value
=
"操作方法"
)
@FieldAssist
(
orderBy
=
"log.method"
)
private
String
method
;
/**
* 请求参数
*/
@ApiModelProperty
(
value
=
"请求参数"
)
@FieldAssist
(
orderBy
=
"log.request_param"
)
private
String
requestParam
;
/**
* 操作结果
*/
@ApiModelProperty
(
value
=
"操作结果"
)
@FieldAssist
(
orderBy
=
"log.opt_result"
)
private
String
optResult
;
/**
* IP地址
*/
@ApiModelProperty
(
value
=
"IP地址"
)
@FieldAssist
(
orderBy
=
"log.opt_ip"
)
private
String
optIp
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
@FieldAssist
(
orderBy
=
"log.remark"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@FieldAssist
(
orderBy
=
"log.data_status"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
@FieldAssist
(
orderBy
=
"log.create_user_id"
)
private
Integer
createUserId
;
/**
* 创建时间起
*/
@ApiModelProperty
(
value
=
"创建时间起"
)
private
Date
createTimeStart
;
/**
* 创建时间止
*/
@ApiModelProperty
(
value
=
"创建时间止"
)
private
Date
createTimeEnd
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
@FieldAssist
(
orderBy
=
"log.update_user_id"
)
private
Integer
updateUserId
;
/**
* 修改时间起
*/
@ApiModelProperty
(
value
=
"修改时间起"
)
private
Date
updateTimeStart
;
/**
* 修改时间止
*/
@ApiModelProperty
(
value
=
"修改时间止"
)
private
Date
updateTimeEnd
;
public
Integer
getOptId
()
{
return
optId
;
}
public
void
setOptId
(
Integer
optId
)
{
this
.
optId
=
optId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
Date
getOptTimeStart
()
{
return
optTimeStart
;
}
public
void
setOptTimeStart
(
Date
optTimeStart
)
{
this
.
optTimeStart
=
optTimeStart
;
}
public
Date
getOptTimeEnd
()
{
return
optTimeEnd
;
}
public
void
setOptTimeEnd
(
Date
optTimeEnd
)
{
this
.
optTimeEnd
=
optTimeEnd
;
}
public
String
getOptType
()
{
return
optType
;
}
public
void
setOptType
(
String
optType
)
{
this
.
optType
=
optType
;
}
public
String
getOptDesc
()
{
return
optDesc
;
}
public
void
setOptDesc
(
String
optDesc
)
{
this
.
optDesc
=
optDesc
;
}
public
String
getMethod
()
{
return
method
;
}
public
void
setMethod
(
String
method
)
{
this
.
method
=
method
;
}
public
String
getRequestParam
()
{
return
requestParam
;
}
public
void
setRequestParam
(
String
requestParam
)
{
this
.
requestParam
=
requestParam
;
}
public
String
getOptResult
()
{
return
optResult
;
}
public
void
setOptResult
(
String
optResult
)
{
this
.
optResult
=
optResult
;
}
public
String
getOptIp
()
{
return
optIp
;
}
public
void
setOptIp
(
String
optIp
)
{
this
.
optIp
=
optIp
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
public
void
setCreateTimeStart
(
Date
createTimeStart
)
{
this
.
createTimeStart
=
createTimeStart
;
}
public
Date
getCreateTimeEnd
()
{
return
createTimeEnd
;
}
public
void
setCreateTimeEnd
(
Date
createTimeEnd
)
{
this
.
createTimeEnd
=
createTimeEnd
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
public
void
setUpdateTimeStart
(
Date
updateTimeStart
)
{
this
.
updateTimeStart
=
updateTimeStart
;
}
public
Date
getUpdateTimeEnd
()
{
return
updateTimeEnd
;
}
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
}
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpOptLogConverter.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.BeanUtils
;
import
com.jz.dmp.modules.model.DmpOptLog
;
public
class
MyDmpOptLogConverter
{
private
static
MyDmpOptLogConverter
instance
;
private
MyDmpOptLogConverter
()
{};
public
synchronized
static
MyDmpOptLogConverter
INSTANCE
()
{
if
(
instance
==
null
)
{
instance
=
new
MyDmpOptLogConverter
();
}
return
instance
;
}
public
DmpOptLogDto
domain2dto
(
DmpOptLog
dmpOptLog
)
{
DmpOptLogDto
dmpOptLogDto
=
new
DmpOptLogDto
();
BeanUtils
.
copyProperties
(
dmpOptLog
,
dmpOptLogDto
);
return
dmpOptLogDto
;
}
public
List
<
DmpOptLogDto
>
domain2dto
(
List
<
DmpOptLog
>
dmpOptLogs
)
{
List
<
DmpOptLogDto
>
dmpOptLogDtos
=
new
ArrayList
<
DmpOptLogDto
>();
dmpOptLogs
.
stream
().
forEach
(
x
->
{
dmpOptLogDtos
.
add
(
domain2dto
(
x
));
});
return
dmpOptLogDtos
;
}
public
DmpOptLog
dto2domain
(
DmpOptLogDto
dmpOptLogDto
)
{
DmpOptLog
dmpOptLog
=
new
DmpOptLog
();
BeanUtils
.
copyProperties
(
dmpOptLogDto
,
dmpOptLog
);
return
dmpOptLog
;
}
public
List
<
DmpOptLog
>
dto2domain
(
List
<
DmpOptLogDto
>
dmpOptLogDtos
)
{
List
<
DmpOptLog
>
dmpOptLogs
=
new
ArrayList
<
DmpOptLog
>();
dmpOptLogDtos
.
stream
().
forEach
(
x
->
{
dmpOptLogs
.
add
(
domain2dto
(
x
));
});
return
dmpOptLogs
;
}
}
src/main/java/com/jz/dmp/modules/dao/DmpOptLogMapper.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
dao
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.modules.controller.bean.DmpOptLogDto
;
import
com.jz.dmp.modules.model.DmpOptLog
;
/**操作日志表 mapper
* @author ybz
*
*/
public
interface
DmpOptLogMapper
{
/**新增操作日志表
* @param dmpOptLog
* @return
* @throws Exception
*/
public
int
insert
(
DmpOptLog
dmpOptLog
)
throws
Exception
;
/**选择性增加操作日志表
* @param dmpOptLog
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpOptLog
dmpOptLog
)
throws
Exception
;
/**主键修改操作日志表
* @param dmpOptLog
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpOptLog
dmpOptLog
)
throws
Exception
;
/**选择性修改操作日志表
* @param dmpOptLog
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpOptLog
dmpOptLog
)
throws
Exception
;
/**主键查询操作日志表
* @param optId
* @return
* @throws Exception
*/
public
DmpOptLog
selectByPrimaryKey
(
Integer
optId
)
throws
Exception
;
/**主键删除操作日志表
* @param optId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
optId
)
throws
Exception
;
/**主键软删除操作日志表
* @param optId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
optId
)
throws
Exception
;
/**主键删除操作日志表
* @param optId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除操作日志表
* @param optId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询操作日志表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpOptLogDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询操作日志表
* @param optId
* @return
* @throws Exception
*/
public
DmpOptLogDto
findById
(
Integer
optId
)
throws
Exception
;
/**批量新增操作日志表
* @param dmpOptLogs
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpOptLog
>
dmpOptLogs
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/model/DmpOptLog.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
model
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**操作日志表
* @author ybz
*
*/
@ApiModel
(
value
=
"操作日志表"
,
description
=
"操作日志表"
)
public
class
DmpOptLog
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
optId
;
/**
* 操作人ID
*/
@ApiModelProperty
(
value
=
"操作人ID"
)
private
Integer
userId
;
/**
* 操作人姓名
*/
@ApiModelProperty
(
value
=
"操作人姓名"
)
private
String
userName
;
/**
* 操作时间
*/
@ApiModelProperty
(
value
=
"操作时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
optTime
;
/**
* 操作类型
*/
@ApiModelProperty
(
value
=
"操作类型"
)
private
String
optType
;
/**
* 操作描述
*/
@ApiModelProperty
(
value
=
"操作描述"
)
private
String
optDesc
;
/**
* 操作方法
*/
@ApiModelProperty
(
value
=
"操作方法"
)
private
String
method
;
/**
* 请求参数
*/
@ApiModelProperty
(
value
=
"请求参数"
)
private
String
requestParam
;
/**
* 操作结果
*/
@ApiModelProperty
(
value
=
"操作结果"
)
private
String
optResult
;
/**
* IP地址
*/
@ApiModelProperty
(
value
=
"IP地址"
)
private
String
optIp
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
public
Integer
getOptId
()
{
return
optId
;
}
public
void
setOptId
(
Integer
optId
)
{
this
.
optId
=
optId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
Date
getOptTime
()
{
return
optTime
;
}
public
void
setOptTime
(
Date
optTime
)
{
this
.
optTime
=
optTime
;
}
public
String
getOptType
()
{
return
optType
;
}
public
void
setOptType
(
String
optType
)
{
this
.
optType
=
optType
;
}
public
String
getOptDesc
()
{
return
optDesc
;
}
public
void
setOptDesc
(
String
optDesc
)
{
this
.
optDesc
=
optDesc
;
}
public
String
getMethod
()
{
return
method
;
}
public
void
setMethod
(
String
method
)
{
this
.
method
=
method
;
}
public
String
getRequestParam
()
{
return
requestParam
;
}
public
void
setRequestParam
(
String
requestParam
)
{
this
.
requestParam
=
requestParam
;
}
public
String
getOptResult
()
{
return
optResult
;
}
public
void
setOptResult
(
String
optResult
)
{
this
.
optResult
=
optResult
;
}
public
String
getOptIp
()
{
return
optIp
;
}
public
void
setOptIp
(
String
optIp
)
{
this
.
optIp
=
optIp
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/modules/service/DmpOptLogService.java
0 → 100644
View file @
ccb56a80
package
com
.
jz
.
dmp
.
modules
.
service
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.bean.DmpOptLogBatch
;
import
com.jz.dmp.modules.controller.bean.DmpOptLogDto
;
import
com.jz.dmp.modules.controller.bean.DmpOptLogRequest
;
import
com.jz.dmp.modules.model.DmpOptLog
;
/**
* 操作日志表服务接口
* @author ybz
*
*/
public
interface
DmpOptLogService
{
/**条件分頁查询所有操作日志表
* @param dmpOptLogRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpOptLogDto
>
findListWithPage
(
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件查询所有操作日志表
* @param dmpOptLogRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLogDto
>
findList
(
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增操作日志表
* @param dmpOptLog
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLog
>
add
(
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询操作日志表
* @param optId
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLogDto
>
findById
(
Integer
optId
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改操作日志表
* @param dmpOptLog
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLog
>
edit
(
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增或修改操作日志表
* @param dmpOptLog
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLog
>
addOrEdit
(
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除操作日志表
* @param optId
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
Integer
optId
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键软删除操作日志表
* @param optId
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
softDeleteById
(
Integer
optId
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件删除操作日志表
* @param dmpOptLogRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
delete
(
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**条件软删除操作日志表
* @param dmpOptLogRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
softDelete
(
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增操作日志表
* @param dmpOptLogVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpOptLogBatch
>
addBatch
(
DmpOptLogBatch
dmpOptLogBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(根据主键批量删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
deleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(根据主键批量软删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
softDeleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
ccb56a80
...
...
@@ -1331,10 +1331,12 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
updateDevelopTask
.
setPublishVersion
(
queryDmpDevelopTask
.
getVersion
());
dmpDevelopTaskDao
.
update
(
updateDevelopTask
);
}
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
"工作流程保存发布成功"
);
}
else
{
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
setMessage
(
baseResponsePublish
.
getMessage
());
}
return
baseResponse
;
}
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpOptLogServiceImpl.java
0 → 100644
View file @
ccb56a80
This diff is collapsed.
Click to expand it.
src/main/java/com/jz/dmp/modules/service/impl/FlowServiceImpl.java
View file @
ccb56a80
...
...
@@ -5,6 +5,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -45,6 +47,9 @@ import com.jz.dmp.modules.service.projconfig.DmpProjectConfigInfoService;
*/
@Service
public
class
FlowServiceImpl
implements
FlowService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
FlowServiceImpl
.
class
);
@Autowired
private
DmpProjectDao
dmpProjectDao
;
...
...
@@ -102,6 +107,7 @@ public class FlowServiceImpl implements FlowService {
if
(
flowNodeChangeList
==
null
||
flowNodeChangeList
.
size
()
==
0
)
{
baseResponse
.
setCode
(
StatuConstant
.
CODE_DATA_NOTMEET
);
baseResponse
.
setMessage
(
"流程节点数据没有变化,取消发布"
);
logger
.
info
(
"流程节点数据没有变化,取消发布"
);
return
baseResponse
;
}
...
...
@@ -136,7 +142,7 @@ public class FlowServiceImpl implements FlowService {
}
baseResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseResponse
.
set
Cod
e
(
"发布成功"
);
baseResponse
.
set
Messag
e
(
"发布成功"
);
return
baseResponse
;
}
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
ccb56a80
...
...
@@ -143,7 +143,7 @@
VERSION = #{version},
</if>
<if
test=
"publishVersion != null and publishVersion != ''"
>
publish_version = #{publishVersion},
,
publish_version = #{publishVersion},
</if>
<if
test=
"isGziped != null"
>
IS_GZIPED = #{isGziped},
...
...
src/main/resources/mapper/dmp/DmpOptLogMapper.xml
0 → 100644
View file @
ccb56a80
This diff is collapsed.
Click to expand it.
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