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
697ed7a7
Commit
697ed7a7
authored
Mar 13, 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
75ecc423
2640489e
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
787 additions
and
127 deletions
+787
-127
SysOperationLogAnnotation.java
...a/com/jz/common/annotation/SysOperationLogAnnotation.java
+2
-0
SysOperationLogAspect.java
...main/java/com/jz/common/aspect/SysOperationLogAspect.java
+28
-6
DmpDevelopTaskController.java
...m/jz/dmp/modules/controller/DmpDevelopTaskController.java
+1
-1
DmpOptLogController.java
...va/com/jz/dmp/modules/controller/DmpOptLogController.java
+317
-0
DmpOptLogBatch.java
...va/com/jz/dmp/modules/controller/bean/DmpOptLogBatch.java
+0
-1
DmpOptLogRequest.java
.../com/jz/dmp/modules/controller/bean/DmpOptLogRequest.java
+121
-31
MyDmpDevelopTaskConverter.java
...mp/modules/controller/bean/MyDmpDevelopTaskConverter.java
+3
-0
MyDmpMemberConverter.java
.../jz/dmp/modules/controller/bean/MyDmpMemberConverter.java
+64
-0
MyDmpOptLogConverter.java
.../jz/dmp/modules/controller/bean/MyDmpOptLogConverter.java
+1
-1
DmpMemberController.java
...om/jz/dmp/modules/controller/sys/DmpMemberController.java
+19
-0
DmpOptLog.java
src/main/java/com/jz/dmp/modules/model/DmpOptLog.java
+42
-0
DmpOptLogServiceImpl.java
...com/jz/dmp/modules/service/impl/DmpOptLogServiceImpl.java
+16
-3
DmpMemberService.java
...java/com/jz/dmp/modules/service/sys/DmpMemberService.java
+11
-0
DmpMemberServiceImpl.java
...jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
+18
-0
DmpOptLogMapper.xml
src/main/resources/mapper/dmp/DmpOptLogMapper.xml
+144
-84
No files found.
src/main/java/com/jz/common/annotation/SysOperationLogAnnotation.java
View file @
697ed7a7
...
...
@@ -17,4 +17,6 @@ public @interface SysOperationLogAnnotation {
//定义成员
String
descrption
()
default
""
;
//描述
String
actionType
()
default
""
;
//操作的类型,1、添加 2、修改 3、删除 4、查询
String
optModular
()
default
""
;
//操作功能模块
boolean
isProjOpt
()
default
true
;
//是否项目操作
}
src/main/java/com/jz/common/aspect/SysOperationLogAspect.java
View file @
697ed7a7
...
...
@@ -3,7 +3,9 @@ package com.jz.common.aspect;
import
java.lang.reflect.Method
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -22,7 +24,9 @@ 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.DmpMember
;
import
com.jz.dmp.modules.model.DmpOptLog
;
import
com.jz.dmp.modules.model.DmpRole
;
import
com.jz.dmp.modules.service.DmpOptLogService
;
/**系统操作日志
...
...
@@ -57,6 +61,13 @@ public class SysOperationLogAspect {
dmpOptLog
.
setOptTime
(
optTime
);
dmpOptLog
.
setCreateTime
(
optTime
);
// 保存操作用户信息
DmpMember
dmpMember
=
SessionUtils
.
getSecurityUser
();
dmpOptLog
.
setUserId
(
dmpMember
.
getUserId
());
dmpOptLog
.
setUserName
(
dmpMember
.
getUserName
());
dmpOptLog
.
setCreateUserId
(
dmpMember
.
getUserId
());
//从切面织入点处通过反射机制获取织入点处的方法
MethodSignature
signature
=
(
MethodSignature
)
pjp
.
getSignature
();
//获取切入点所在的方法
...
...
@@ -66,8 +77,25 @@ public class SysOperationLogAspect {
if
(
operationLogAnnotation
!=
null
)
{
String
optType
=
operationLogAnnotation
.
actionType
();
String
optDesc
=
operationLogAnnotation
.
descrption
();
String
optModular
=
operationLogAnnotation
.
optModular
();
boolean
isProjOpt
=
operationLogAnnotation
.
isProjOpt
();
dmpOptLog
.
setOptType
(
optType
);
//保存获取的操作
dmpOptLog
.
setOptDesc
(
optDesc
);
dmpOptLog
.
setOptModular
(
optModular
);
if
(
isProjOpt
)
{
dmpOptLog
.
setProjectId
(
dmpMember
.
getCurrentProjectId
());
List
<
DmpRole
>
mprojRoleList
=
dmpMember
.
getMemberProjectRoleList
();
String
userRoles
=
mprojRoleList
.
stream
().
map
(
x
->{
return
x
.
getRoleName
();
}).
collect
(
Collectors
.
joining
(
","
));
dmpOptLog
.
setUserRoles
(
userRoles
);
}
else
{
List
<
DmpRole
>
memberRoleList
=
dmpMember
.
getMemberRoleList
();
String
userRoles
=
memberRoleList
.
stream
().
map
(
x
->{
return
x
.
getRoleName
();
}).
collect
(
Collectors
.
joining
(
","
));
dmpOptLog
.
setUserRoles
(
userRoles
);
}
}
//获取请求的类名
String
className
=
pjp
.
getTarget
().
getClass
().
getName
();
...
...
@@ -89,12 +117,6 @@ public class SysOperationLogAspect {
}
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
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpDevelopTaskController.java
View file @
697ed7a7
...
...
@@ -46,7 +46,7 @@ public class DmpDevelopTaskController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findListWithPage"
)
@ApiOperation
(
value
=
"分頁列表查询任务开发"
,
notes
=
"分頁列表查询任务开发"
)
@SysOperationLogAnnotation
(
actionType
=
"
分頁列表查询任务开发"
,
descrption
=
"分頁列表查询任务开发"
)
@SysOperationLogAnnotation
(
actionType
=
"
列表查询"
,
descrption
=
"分頁列表查询任务开发"
,
optModular
=
"任务开发--查询"
,
isProjOpt
=
true
)
public
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
@RequestBody
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
){
PageInfoResponse
<
DmpDevelopTaskDto
>
pageInfo
=
new
PageInfoResponse
<
DmpDevelopTaskDto
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpOptLogController.java
0 → 100644
View file @
697ed7a7
package
com
.
jz
.
dmp
.
modules
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.StatuConstant
;
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
;
import
com.jz.dmp.modules.service.DmpOptLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 操作日志表Controller
* @author ybz
*
*/
@RestController
@RequestMapping
(
"/dmp/opt/log"
)
@Api
(
tags
=
"操作日志表"
)
public
class
DmpOptLogController
{
@Autowired
private
DmpOptLogService
dmpOptLogService
;
/**列表查询操作日志表
* @param dmpOptLogRequest
* @return
*/
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findListWithPage"
)
@ApiOperation
(
value
=
"分頁列表查询操作日志表"
,
notes
=
"分頁列表查询操作日志表"
)
public
PageInfoResponse
<
DmpOptLogDto
>
findListWithPage
(
@RequestBody
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
){
PageInfoResponse
<
DmpOptLogDto
>
pageInfo
=
new
PageInfoResponse
<
DmpOptLogDto
>();
try
{
pageInfo
=
dmpOptLogService
.
findListWithPage
(
dmpOptLogRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
pageInfo
;
}
/**列表查询操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/findList")
//@ApiOperation(value = "列表查询操作日志表", notes = "列表查询操作日志表")
public
BaseBeanResponse
<
DmpOptLogDto
>
findList
(
@RequestBody
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLogDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLogDto
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
findList
(
dmpOptLogRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"查询失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**主键查询操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.GET, value = "/view")
//@ApiOperation(value = "主键查询操作日志表", notes = "主键查询操作日志表")
//@ApiImplicitParam(name = "optId", value = "操作日志表主键")
public
BaseBeanResponse
<
DmpOptLogDto
>
view
(
@RequestParam
(
name
=
"optId"
,
required
=
true
)
Integer
optId
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLogDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLogDto
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
findById
(
optId
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"请求失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.GET, value = "/deleteById")
//@ApiOperation(value = "删除操作日志表", notes = "删除操作日志表")
//@ApiImplicitParam(name = "optId", value = "操作日志表主键")
public
BaseResponse
deleteById
(
@RequestParam
(
name
=
"optId"
,
required
=
true
)
Integer
optId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
baseResponse
=
dmpOptLogService
.
deleteById
(
optId
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**软删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.GET, value = "/softDeleteById")
//@ApiOperation(value = "软删除操作日志表", notes = "软删除操作日志表")
//@ApiImplicitParam(name = "optId", value = "操作日志表主键")
public
BaseResponse
softDeleteById
(
@RequestParam
(
name
=
"optId"
,
required
=
true
)
Integer
optId
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
baseResponse
=
dmpOptLogService
.
softDeleteById
(
optId
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"软删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.GET, value = "/delete")
//@ApiOperation(value = "删除操作日志表", notes = "删除操作日志表")
//@ApiImplicitParam(name = "ids", value = "操作日志表主键集(逗号隔开)")
public
BaseResponse
delete
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
//参数封装
String
[]
idStrs
=
ids
.
split
(
","
);
List
<
Integer
>
idList
=
Arrays
.
asList
(
idStrs
).
stream
().
map
(
x
->{
return
Integer
.
parseInt
(
x
);
}).
collect
(
Collectors
.
toList
());
baseResponse
=
dmpOptLogService
.
deleteByIds
(
idList
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**软删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.GET, value = "/softDelete")
//@ApiOperation(value = "软删除操作日志表", notes = "软删除操作日志表")
//@ApiImplicitParam(name = "ids", value = "操作日志表主键集(逗号隔开)")
public
BaseResponse
softDelete
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
//参数封装
String
[]
idStrs
=
ids
.
split
(
","
);
List
<
Integer
>
idList
=
Arrays
.
asList
(
idStrs
).
stream
().
map
(
x
->{
return
Integer
.
parseInt
(
x
);
}).
collect
(
Collectors
.
toList
());
baseResponse
=
dmpOptLogService
.
softDeleteByIds
(
idList
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"软删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**条件删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/deleteByPojo")
//@ApiOperation(value = "条件删除操作日志表", notes = "条件删除操作日志表")
public
BaseResponse
deleteByPojo
(
@RequestBody
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
baseResponse
=
dmpOptLogService
.
delete
(
dmpOptLogRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**条件软删除操作日志表
* @param optId
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/softDeleteByPojo")
//@ApiOperation(value = "条件软删除操作日志表", notes = "条件软删除操作日志表")
public
BaseResponse
softDeleteByPojo
(
@RequestBody
DmpOptLogRequest
dmpOptLogRequest
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
baseResponse
=
dmpOptLogService
.
softDelete
(
dmpOptLogRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"软删除失败"
);
baseResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**新增操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/add")
//@ApiOperation(value = "新增操作日志表", notes = "新增操作日志表")
public
BaseBeanResponse
<
DmpOptLog
>
add
(
@RequestBody
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLog
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLog
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
add
(
dmpOptLog
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"新增失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**批量新增操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/addBatch")
//@ApiOperation(value = "批量新增操作日志表", notes = "批量新增操作日志表")
public
BaseBeanResponse
<
DmpOptLogBatch
>
addBatch
(
@RequestBody
DmpOptLogBatch
dmpOptLogBatch
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLogBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLogBatch
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
addBatch
(
dmpOptLogBatch
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"批量新增失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**修改操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/edit")
//@ApiOperation(value = "修改操作日志表", notes = "修改操作日志表")
public
BaseBeanResponse
<
DmpOptLog
>
edit
(
@RequestBody
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLog
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLog
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
edit
(
dmpOptLog
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"修改失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**新增或修改操作日志表
* @param dmpOptLogRequest
* @return
*/
//@MethodCallLogPrint
//@RequestMapping(method = RequestMethod.POST, value = "/addOrEdit")
//@ApiOperation(value = "新增或修改操作日志表", notes = "新增或修改操作日志表")
public
BaseBeanResponse
<
DmpOptLog
>
addOrEdit
(
@RequestBody
DmpOptLog
dmpOptLog
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpOptLog
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpOptLog
>();
try
{
baseBeanResponse
=
dmpOptLogService
.
addOrEdit
(
dmpOptLog
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"新增或修改失败"
);
baseBeanResponse
.
setCode
(
StatuConstant
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/controller/bean/DmpOptLogBatch.java
View file @
697ed7a7
package
com
.
jz
.
dmp
.
modules
.
controller
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpOptLog
;
/**
...
...
src/main/java/com/jz/dmp/modules/controller/bean/DmpOptLogRequest.java
View file @
697ed7a7
...
...
@@ -16,23 +16,37 @@ public class DmpOptLogRequest extends BasePageBean {
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
@FieldAssist
(
orderBy
=
"log.opt_id"
)
@FieldAssist
(
orderBy
=
"
_
log.opt_id"
)
private
Integer
optId
;
/**
* 操作人ID
*/
@ApiModelProperty
(
value
=
"操作人ID"
)
@FieldAssist
(
orderBy
=
"log.user_id"
)
@FieldAssist
(
orderBy
=
"
_
log.user_id"
)
private
Integer
userId
;
/**
* 操作人姓名
*/
@ApiModelProperty
(
value
=
"操作人姓名"
)
@FieldAssist
(
orderBy
=
"log.user_name"
)
@FieldAssist
(
orderBy
=
"
_
log.user_name"
)
private
String
userName
;
/**
*
*/
@ApiModelProperty
(
value
=
""
)
@FieldAssist
(
orderBy
=
"_log.user_roles"
)
private
String
userRoles
;
/**
* 操作时间
*/
@ApiModelProperty
(
value
=
"操作时间"
)
@FieldAssist
(
orderBy
=
"_log.opt_time"
)
private
Date
optTime
;
/**
* 操作时间起
*/
...
...
@@ -45,69 +59,90 @@ public class DmpOptLogRequest extends BasePageBean {
@ApiModelProperty
(
value
=
"操作时间止"
)
private
Date
optTimeEnd
;
/**
* 操作功能模块
*/
@ApiModelProperty
(
value
=
"操作功能模块"
)
@FieldAssist
(
orderBy
=
"_log.opt_modular"
)
private
String
optModular
;
/**
* 操作类型
*/
@ApiModelProperty
(
value
=
"操作类型"
)
@FieldAssist
(
orderBy
=
"log.opt_type"
)
@FieldAssist
(
orderBy
=
"
_
log.opt_type"
)
private
String
optType
;
/**
* 操作描述
*/
@ApiModelProperty
(
value
=
"操作描述"
)
@FieldAssist
(
orderBy
=
"log.opt_desc"
)
@FieldAssist
(
orderBy
=
"
_
log.opt_desc"
)
private
String
optDesc
;
/**
* 操作方法
*/
@ApiModelProperty
(
value
=
"操作方法"
)
@FieldAssist
(
orderBy
=
"log.method"
)
@FieldAssist
(
orderBy
=
"
_
log.method"
)
private
String
method
;
/**
* 请求参数
*/
@ApiModelProperty
(
value
=
"请求参数"
)
@FieldAssist
(
orderBy
=
"log.request_param"
)
@FieldAssist
(
orderBy
=
"
_
log.request_param"
)
private
String
requestParam
;
/**
* 操作结果
*/
@ApiModelProperty
(
value
=
"操作结果"
)
@FieldAssist
(
orderBy
=
"log.opt_result"
)
@FieldAssist
(
orderBy
=
"
_
log.opt_result"
)
private
String
optResult
;
/**
* IP地址
*/
@ApiModelProperty
(
value
=
"IP地址"
)
@FieldAssist
(
orderBy
=
"log.opt_ip"
)
@FieldAssist
(
orderBy
=
"
_
log.opt_ip"
)
private
String
optIp
;
/**
*
*/
@ApiModelProperty
(
value
=
""
)
@FieldAssist
(
orderBy
=
"_log.project_id"
)
private
Integer
projectId
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
@FieldAssist
(
orderBy
=
"log.remark"
)
@FieldAssist
(
orderBy
=
"
_
log.remark"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
@FieldAssist
(
orderBy
=
"log.data_status"
)
@FieldAssist
(
orderBy
=
"
_
log.data_status"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
@FieldAssist
(
orderBy
=
"log.create_user_id"
)
@FieldAssist
(
orderBy
=
"
_
log.create_user_id"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@FieldAssist
(
orderBy
=
"_log.create_time"
)
private
Date
createTime
;
/**
* 创建时间起
*/
...
...
@@ -124,9 +159,16 @@ public class DmpOptLogRequest extends BasePageBean {
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
@FieldAssist
(
orderBy
=
"log.update_user_id"
)
@FieldAssist
(
orderBy
=
"
_
log.update_user_id"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@FieldAssist
(
orderBy
=
"_log.update_time"
)
private
Date
updateTime
;
/**
* 修改时间起
*/
...
...
@@ -163,6 +205,22 @@ public class DmpOptLogRequest extends BasePageBean {
this
.
userName
=
userName
;
}
public
String
getUserRoles
()
{
return
userRoles
;
}
public
void
setUserRoles
(
String
userRoles
)
{
this
.
userRoles
=
userRoles
;
}
public
Date
getOptTime
()
{
return
optTime
;
}
public
void
setOptTime
(
Date
optTime
)
{
this
.
optTime
=
optTime
;
}
public
Date
getOptTimeStart
()
{
return
optTimeStart
;
}
...
...
@@ -179,6 +237,14 @@ public class DmpOptLogRequest extends BasePageBean {
this
.
optTimeEnd
=
optTimeEnd
;
}
public
String
getOptModular
()
{
return
optModular
;
}
public
void
setOptModular
(
String
optModular
)
{
this
.
optModular
=
optModular
;
}
public
String
getOptType
()
{
return
optType
;
}
...
...
@@ -227,6 +293,14 @@ public class DmpOptLogRequest extends BasePageBean {
this
.
optIp
=
optIp
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getRemark
()
{
return
remark
;
}
...
...
@@ -251,6 +325,14 @@ public class DmpOptLogRequest extends BasePageBean {
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
...
...
@@ -275,6 +357,14 @@ public class DmpOptLogRequest extends BasePageBean {
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
...
...
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpDevelopTaskConverter.java
View file @
697ed7a7
...
...
@@ -27,6 +27,9 @@ public class MyDmpDevelopTaskConverter {
}
public
DmpDevelopTaskDto
domain2dto
(
DmpDevelopTask
dmpDevelopTask
)
{
if
(
dmpDevelopTask
==
null
)
{
return
null
;
}
DmpDevelopTaskDto
dmpDevelopTaskDto
=
new
DmpDevelopTaskDto
();
BeanUtils
.
copyProperties
(
dmpDevelopTask
,
dmpDevelopTaskDto
);
...
...
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpMemberConverter.java
0 → 100644
View file @
697ed7a7
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.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.model.DmpMember
;
public
class
MyDmpMemberConverter
{
private
static
MyDmpMemberConverter
instance
;
private
MyDmpMemberConverter
()
{};
public
synchronized
static
MyDmpMemberConverter
INSTANCE
()
{
if
(
instance
==
null
)
{
instance
=
new
MyDmpMemberConverter
();
}
return
instance
;
}
public
DmpMemberDto
domain2dto
(
DmpMember
dmpMember
)
{
if
(
dmpMember
==
null
)
{
return
null
;
}
DmpMemberDto
dmpMemberDto
=
new
DmpMemberDto
();
BeanUtils
.
copyProperties
(
dmpMember
,
dmpMemberDto
);
return
dmpMemberDto
;
}
public
List
<
DmpMemberDto
>
domain2dto
(
List
<
DmpMember
>
dmpMembers
)
{
List
<
DmpMemberDto
>
dmpMemberDtos
=
new
ArrayList
<
DmpMemberDto
>();
dmpMembers
.
stream
().
forEach
(
x
->
{
dmpMemberDtos
.
add
(
domain2dto
(
x
));
});
return
dmpMemberDtos
;
}
public
DmpMember
dto2domain
(
DmpMemberDto
dmpMemberDto
)
{
if
(
dmpMemberDto
==
null
)
{
return
null
;
}
DmpMember
dmpMember
=
new
DmpMember
();
BeanUtils
.
copyProperties
(
dmpMemberDto
,
dmpMember
);
return
dmpMember
;
}
public
List
<
DmpMember
>
dto2domain
(
List
<
DmpMemberDto
>
dmpMemberDtos
)
{
List
<
DmpMember
>
dmpMembers
=
new
ArrayList
<
DmpMember
>();
dmpMemberDtos
.
stream
().
forEach
(
x
->
{
dmpMembers
.
add
(
dto2domain
(
x
));
});
return
dmpMembers
;
}
}
src/main/java/com/jz/dmp/modules/controller/bean/MyDmpOptLogConverter.java
View file @
697ed7a7
...
...
@@ -45,7 +45,7 @@ public class MyDmpOptLogConverter {
public
List
<
DmpOptLog
>
dto2domain
(
List
<
DmpOptLogDto
>
dmpOptLogDtos
)
{
List
<
DmpOptLog
>
dmpOptLogs
=
new
ArrayList
<
DmpOptLog
>();
dmpOptLogDtos
.
stream
().
forEach
(
x
->
{
dmpOptLogs
.
add
(
d
omain2dto
(
x
));
dmpOptLogs
.
add
(
d
to2domain
(
x
));
});
return
dmpOptLogs
;
...
...
src/main/java/com/jz/dmp/modules/controller/sys/DmpMemberController.java
View file @
697ed7a7
...
...
@@ -99,6 +99,25 @@ public class DmpMemberController {
return
baseBeanResponse
;
}
/**获取登录用户信息
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/getLoginUserInfo"
)
@ApiOperation
(
value
=
"获取登录用户信息"
,
notes
=
"获取登录用户信息"
)
public
BaseBeanResponse
<
DmpMemberDto
>
getLoginUserInfo
(
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMemberDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMemberDto
>();
try
{
baseBeanResponse
=
dmpMemberService
.
getLoginUserInfo
(
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"请求失败"
);
baseBeanResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**删除用户表
* @param userId
* @return
...
...
src/main/java/com/jz/dmp/modules/model/DmpOptLog.java
View file @
697ed7a7
...
...
@@ -36,6 +36,12 @@ public class DmpOptLog implements Serializable{
@ApiModelProperty
(
value
=
"操作人姓名"
)
private
String
userName
;
/**
*
*/
@ApiModelProperty
(
value
=
""
)
private
String
userRoles
;
/**
* 操作时间
*/
...
...
@@ -43,6 +49,12 @@ public class DmpOptLog implements Serializable{
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
optTime
;
/**
* 操作功能模块
*/
@ApiModelProperty
(
value
=
"操作功能模块"
)
private
String
optModular
;
/**
* 操作类型
*/
...
...
@@ -79,6 +91,12 @@ public class DmpOptLog implements Serializable{
@ApiModelProperty
(
value
=
"IP地址"
)
private
String
optIp
;
/**
*
*/
@ApiModelProperty
(
value
=
""
)
private
Integer
projectId
;
/**
* 备注
*/
...
...
@@ -141,6 +159,14 @@ public class DmpOptLog implements Serializable{
this
.
userName
=
userName
;
}
public
String
getUserRoles
()
{
return
userRoles
;
}
public
void
setUserRoles
(
String
userRoles
)
{
this
.
userRoles
=
userRoles
;
}
public
Date
getOptTime
()
{
return
optTime
;
}
...
...
@@ -149,6 +175,14 @@ public class DmpOptLog implements Serializable{
this
.
optTime
=
optTime
;
}
public
String
getOptModular
()
{
return
optModular
;
}
public
void
setOptModular
(
String
optModular
)
{
this
.
optModular
=
optModular
;
}
public
String
getOptType
()
{
return
optType
;
}
...
...
@@ -197,6 +231,14 @@ public class DmpOptLog implements Serializable{
this
.
optIp
=
optIp
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getRemark
()
{
return
remark
;
}
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpOptLogServiceImpl.java
View file @
697ed7a7
...
...
@@ -5,9 +5,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -15,7 +13,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -78,6 +75,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if
(
dmpOptLogRequest
.
getOptTimeEnd
()
!=
null
)
{
param
.
put
(
"optTimeEnd"
,
dmpOptLogRequest
.
getOptTimeEnd
());
}
//操作功能模块
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptModular
()))
{
param
.
put
(
"optModular"
,
dmpOptLogRequest
.
getOptModular
());
}
//操作类型
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptType
()))
{
param
.
put
(
"optType"
,
dmpOptLogRequest
.
getOptType
());
...
...
@@ -187,6 +188,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if
(
dmpOptLogRequest
.
getOptTimeEnd
()
!=
null
)
{
param
.
put
(
"optTimeEnd"
,
dmpOptLogRequest
.
getOptTimeEnd
());
}
//操作功能模块
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptModular
()))
{
param
.
put
(
"optModular"
,
dmpOptLogRequest
.
getOptModular
());
}
//操作类型
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptType
()))
{
param
.
put
(
"optType"
,
dmpOptLogRequest
.
getOptType
());
...
...
@@ -444,6 +449,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if
(
dmpOptLogRequest
.
getOptTimeEnd
()
!=
null
)
{
param
.
put
(
"optTimeEnd"
,
dmpOptLogRequest
.
getOptTimeEnd
());
}
//操作功能模块
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptModular
()))
{
param
.
put
(
"optModular"
,
dmpOptLogRequest
.
getOptModular
());
}
//操作类型
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptType
()))
{
param
.
put
(
"optType"
,
dmpOptLogRequest
.
getOptType
());
...
...
@@ -542,6 +551,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if
(
dmpOptLogRequest
.
getOptTimeEnd
()
!=
null
)
{
param
.
put
(
"optTimeEnd"
,
dmpOptLogRequest
.
getOptTimeEnd
());
}
//操作功能模块
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptModular
()))
{
param
.
put
(
"optModular"
,
dmpOptLogRequest
.
getOptModular
());
}
//操作类型
if
(!
StringUtils
.
isEmpty
(
dmpOptLogRequest
.
getOptType
()))
{
param
.
put
(
"optType"
,
dmpOptLogRequest
.
getOptType
());
...
...
src/main/java/com/jz/dmp/modules/service/sys/DmpMemberService.java
View file @
697ed7a7
...
...
@@ -145,4 +145,15 @@ public interface DmpMemberService {
*/
public
BaseResponse
softDeleteByIds
(
List
<
Integer
>
idList
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: getLoginUserInfo
* @Description: TODO(获取当前登录用户信息)
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseBeanResponse<DmpMemberDto> 返回类型
* @throws
*/
public
BaseBeanResponse
<
DmpMemberDto
>
getLoginUserInfo
(
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
View file @
697ed7a7
...
...
@@ -31,6 +31,7 @@ import com.jz.common.constant.ResultCode;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.common.utils.web.SessionUtils
;
import
com.jz.dmp.modules.controller.bean.MyDmpMemberConverter
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest
;
...
...
@@ -543,5 +544,22 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
return
baseResponse
;
}
/**
*获取当前登录用户信息
*/
@Override
public
BaseBeanResponse
<
DmpMemberDto
>
getLoginUserInfo
(
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpMember
dmpMember
=
SessionUtils
.
getSecurityUser
();
DmpMemberDto
dmpMemberDto
=
MyDmpMemberConverter
.
INSTANCE
().
domain2dto
(
dmpMember
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpMemberDto
);
return
baseBeanResponse
;
}
}
src/main/resources/mapper/dmp/DmpOptLogMapper.xml
View file @
697ed7a7
...
...
@@ -5,13 +5,16 @@
<result
column=
"opt_id"
property=
"optId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_name"
property=
"userName"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_roles"
property=
"userRoles"
jdbcType=
"VARCHAR"
/>
<result
column=
"opt_time"
property=
"optTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"opt_modular"
property=
"optModular"
jdbcType=
"VARCHAR"
/>
<result
column=
"opt_type"
property=
"optType"
jdbcType=
"VARCHAR"
/>
<result
column=
"opt_desc"
property=
"optDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"method"
property=
"method"
jdbcType=
"VARCHAR"
/>
<result
column=
"request_param"
property=
"requestParam"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"opt_result"
property=
"optResult"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"opt_ip"
property=
"optIp"
jdbcType=
"VARCHAR"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"INTEGER"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
...
...
@@ -25,10 +28,10 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
log.opt_id, log.user_id, log.user_name, log.opt_time, log.opt_typ
e,
log.opt_desc, log.method, log.request_param, log.opt_result, log.opt_ip
,
log.remark, log.data_status, log.create_user_id, log.create_time, log.update_user_id
,
log.update_time
_log.opt_id, _log.user_id, _log.user_name, _log.user_roles, _log.opt_tim
e,
_log.opt_modular, _log.opt_type, _log.opt_desc, _log.method, _log.request_param
,
_log.opt_result, _log.opt_ip, _log.project_id, _log.remark, _log.data_status
,
_log.create_user_id, _log.create_time, _log.update_user_id, _
log.update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
...
...
@@ -40,9 +43,9 @@
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_opt_log log
where log.opt_id = #{optId,jdbcType=INTEGER}
AND log.data_status='1'
from dmp_opt_log
_
log
where
_
log.opt_id = #{optId,jdbcType=INTEGER}
AND
_
log.data_status='1'
</select>
<!-- 根据主键删除操作日志表 -->
...
...
@@ -65,61 +68,70 @@
delete from dmp_opt_log
<where>
<if
test=
"optId != null"
>
AND log.opt_id = #{optId,jdbcType=INTEGER}
AND
_
log.opt_id = #{optId,jdbcType=INTEGER}
</if>
<if
test=
"userId != null"
>
AND log.user_id = #{userId,jdbcType=INTEGER}
AND
_
log.user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"userName != null"
>
AND log.user_name = #{userName,jdbcType=VARCHAR}
AND _log.user_name = #{userName,jdbcType=VARCHAR}
</if>
<if
test=
"userRoles != null"
>
AND _log.user_roles = #{userRoles,jdbcType=VARCHAR}
</if>
<if
test=
"optTimeStart != null"
>
AND log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
AND
_
log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"optTimeEnd != null"
>
AND log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
AND _log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"optModular != null"
>
AND _log.opt_modular = #{optModular,jdbcType=VARCHAR}
</if>
<if
test=
"optType != null"
>
AND log.opt_type = #{optType,jdbcType=VARCHAR}
AND
_
log.opt_type = #{optType,jdbcType=VARCHAR}
</if>
<if
test=
"optDesc != null"
>
AND log.opt_desc = #{optDesc,jdbcType=VARCHAR}
AND
_
log.opt_desc = #{optDesc,jdbcType=VARCHAR}
</if>
<if
test=
"method != null"
>
AND log.method = #{method,jdbcType=VARCHAR}
AND
_
log.method = #{method,jdbcType=VARCHAR}
</if>
<if
test=
"requestParam != null"
>
AND log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
AND
_
log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optResult != null"
>
AND log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
AND
_
log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optIp != null"
>
AND log.opt_ip = #{optIp,jdbcType=VARCHAR}
AND _log.opt_ip = #{optIp,jdbcType=VARCHAR}
</if>
<if
test=
"projectId != null"
>
AND _log.project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND log.remark = #{remark,jdbcType=VARCHAR}
AND
_
log.remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND log.data_status = #{dataStatus,jdbcType=CHAR}
AND
_
log.data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND log.create_user_id = #{createUserId,jdbcType=INTEGER}
AND
_
log.create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
AND
_
log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND log.update_user_id = #{updateUserId,jdbcType=INTEGER}
AND
_
log.update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
AND
_
log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
...
...
@@ -133,61 +145,70 @@
</set>
<where>
<if
test=
"optId != null"
>
AND log.opt_id = #{optId,jdbcType=INTEGER}
AND
_
log.opt_id = #{optId,jdbcType=INTEGER}
</if>
<if
test=
"userId != null"
>
AND log.user_id = #{userId,jdbcType=INTEGER}
AND
_
log.user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"userName != null"
>
AND log.user_name = #{userName,jdbcType=VARCHAR}
AND _log.user_name = #{userName,jdbcType=VARCHAR}
</if>
<if
test=
"userRoles != null"
>
AND _log.user_roles = #{userRoles,jdbcType=VARCHAR}
</if>
<if
test=
"optTimeStart != null"
>
AND log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
AND
_
log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"optTimeEnd != null"
>
AND log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
AND _log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"optModular != null"
>
AND _log.opt_modular = #{optModular,jdbcType=VARCHAR}
</if>
<if
test=
"optType != null"
>
AND log.opt_type = #{optType,jdbcType=VARCHAR}
AND
_
log.opt_type = #{optType,jdbcType=VARCHAR}
</if>
<if
test=
"optDesc != null"
>
AND log.opt_desc = #{optDesc,jdbcType=VARCHAR}
AND
_
log.opt_desc = #{optDesc,jdbcType=VARCHAR}
</if>
<if
test=
"method != null"
>
AND log.method = #{method,jdbcType=VARCHAR}
AND
_
log.method = #{method,jdbcType=VARCHAR}
</if>
<if
test=
"requestParam != null"
>
AND log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
AND
_
log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optResult != null"
>
AND log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
AND
_
log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optIp != null"
>
AND log.opt_ip = #{optIp,jdbcType=VARCHAR}
AND _log.opt_ip = #{optIp,jdbcType=VARCHAR}
</if>
<if
test=
"projectId != null"
>
AND _log.project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND log.remark = #{remark,jdbcType=VARCHAR}
AND
_
log.remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND log.data_status = #{dataStatus,jdbcType=CHAR}
AND
_
log.data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND log.create_user_id = #{createUserId,jdbcType=INTEGER}
AND
_
log.create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
AND
_
log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND log.update_user_id = #{updateUserId,jdbcType=INTEGER}
AND
_
log.update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
AND
_
log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
...
...
@@ -196,34 +217,34 @@
<!-- 插入操作日志表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpOptLog"
>
insert into dmp_opt_log (
opt_id, user_id, user_name,
opt_time, opt_typ
e,
opt_
desc, method, request_param, opt_result, opt_ip
,
remark, data_status, create_user_id, create_time, update_user_id
,
update_time
opt_id, user_id, user_name,
user_roles, opt_tim
e,
opt_
modular, opt_type, opt_desc, method, request_param
,
opt_result, opt_ip, project_id, remark, data_status
,
create_user_id, create_time, update_user_id,
update_time
)
values (
#{optId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{
optTime,jdbcType=TIMESTAMP}, #{optType,jdbcType=VARCHAR
},
#{opt
Desc,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{requestParam,jdbcType=LONGVARCHAR}, #{optResult,jdbcType=LONGVARCHAR}, #{optIp,jdbcType=
VARCHAR},
#{
remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGE
R},
#{updateTime,jdbcType=TIMESTAMP}
#{optId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{
userRoles,jdbcType=VARCHAR}, #{optTime,jdbcType=TIMESTAMP
},
#{opt
Modular,jdbcType=VARCHAR}, #{optType,jdbcType=VARCHAR}, #{optDesc,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{requestParam,jdbcType=LONG
VARCHAR},
#{
optResult,jdbcType=LONGVARCHAR}, #{optIp,jdbcType=VARCHAR}, #{projectId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHA
R},
#{
createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{
updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增操作日志表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpOptLog"
>
insert into dmp_opt_log (
opt_id, user_id, user_name,
opt_time, opt_typ
e,
opt_
desc, method, request_param, opt_result, opt_ip
,
remark, data_status, create_user_id, create_time, update_user_id
,
update_time
opt_id, user_id, user_name,
user_roles, opt_tim
e,
opt_
modular, opt_type, opt_desc, method, request_param
,
opt_result, opt_ip, project_id, remark, data_status
,
create_user_id, create_time, update_user_id,
update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.optId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER}, #{item.userName,jdbcType=VARCHAR}, #{item.
optTime,jdbcType=TIMESTAMP}, #{item.optType,jdbcType=VARCHAR
},
#{item.opt
Desc,jdbcType=VARCHAR}, #{item.method,jdbcType=VARCHAR}, #{item.requestParam,jdbcType=LONGVARCHAR}, #{item.optResult,jdbcType=LONGVARCHAR}, #{item.optIp,jdbcType=
VARCHAR},
#{item.
remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGE
R},
#{item.updateTime,jdbcType=TIMESTAMP}
#{item.optId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER}, #{item.userName,jdbcType=VARCHAR}, #{item.
userRoles,jdbcType=VARCHAR}, #{item.optTime,jdbcType=TIMESTAMP
},
#{item.opt
Modular,jdbcType=VARCHAR}, #{item.optType,jdbcType=VARCHAR}, #{item.optDesc,jdbcType=VARCHAR}, #{item.method,jdbcType=VARCHAR}, #{item.requestParam,jdbcType=LONG
VARCHAR},
#{item.
optResult,jdbcType=LONGVARCHAR}, #{item.optIp,jdbcType=VARCHAR}, #{item.projectId,jdbcType=INTEGER}, #{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHA
R},
#{item.
createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.
updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
...
...
@@ -241,9 +262,15 @@
<if
test=
"userName != null"
>
user_name,
</if>
<if
test=
"userRoles != null"
>
user_roles,
</if>
<if
test=
"optTime != null"
>
opt_time,
</if>
<if
test=
"optModular != null"
>
opt_modular,
</if>
<if
test=
"optType != null"
>
opt_type,
</if>
...
...
@@ -262,6 +289,9 @@
<if
test=
"optIp != null"
>
opt_ip,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
...
...
@@ -291,9 +321,15 @@
<if
test=
"userName != null"
>
#{userName,jdbcType=VARCHAR},
</if>
<if
test=
"userRoles != null"
>
#{userRoles,jdbcType=VARCHAR},
</if>
<if
test=
"optTime != null"
>
#{optTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"optModular != null"
>
#{optModular,jdbcType=VARCHAR},
</if>
<if
test=
"optType != null"
>
#{optType,jdbcType=VARCHAR},
</if>
...
...
@@ -312,6 +348,9 @@
<if
test=
"optIp != null"
>
#{optIp,jdbcType=VARCHAR},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
...
...
@@ -339,13 +378,16 @@
opt_id = #{optId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
user_roles = #{userRoles,jdbcType=VARCHAR},
opt_time = #{optTime,jdbcType=TIMESTAMP},
opt_modular = #{optModular,jdbcType=VARCHAR},
opt_type = #{optType,jdbcType=VARCHAR},
opt_desc = #{optDesc,jdbcType=VARCHAR},
method = #{method,jdbcType=VARCHAR},
request_param = #{requestParam,jdbcType=LONGVARCHAR},
opt_result = #{optResult,jdbcType=LONGVARCHAR},
opt_ip = #{optIp,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
...
...
@@ -368,9 +410,15 @@
<if
test=
"userName != null"
>
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if
test=
"userRoles != null"
>
user_roles = #{userRoles,jdbcType=VARCHAR},
</if>
<if
test=
"optTime != null"
>
opt_time = #{optTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"optModular != null"
>
opt_modular = #{optModular,jdbcType=VARCHAR},
</if>
<if
test=
"optType != null"
>
opt_type = #{optType,jdbcType=VARCHAR},
</if>
...
...
@@ -389,6 +437,9 @@
<if
test=
"optIp != null"
>
opt_ip = #{optIp,jdbcType=VARCHAR},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
...
...
@@ -415,64 +466,73 @@
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_opt_log log
FROM dmp_opt_log
_
log
<where>
<if
test=
"optId != null"
>
AND log.opt_id = #{optId,jdbcType=INTEGER}
AND
_
log.opt_id = #{optId,jdbcType=INTEGER}
</if>
<if
test=
"userId != null"
>
AND log.user_id = #{userId,jdbcType=INTEGER}
AND
_
log.user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"userName != null"
>
AND log.user_name = #{userName,jdbcType=VARCHAR}
AND _log.user_name = #{userName,jdbcType=VARCHAR}
</if>
<if
test=
"userRoles != null"
>
AND _log.user_roles = #{userRoles,jdbcType=VARCHAR}
</if>
<if
test=
"optTimeStart != null"
>
AND log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
AND
_
log.opt_time >= #{optTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"optTimeEnd != null"
>
AND log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
AND _log.opt_time
<![CDATA[ <= ]]>
#{optTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"optModular != null"
>
AND _log.opt_modular = #{optModular,jdbcType=VARCHAR}
</if>
<if
test=
"optType != null"
>
AND log.opt_type = #{optType,jdbcType=VARCHAR}
AND
_
log.opt_type = #{optType,jdbcType=VARCHAR}
</if>
<if
test=
"optDesc != null"
>
AND log.opt_desc = #{optDesc,jdbcType=VARCHAR}
AND
_
log.opt_desc = #{optDesc,jdbcType=VARCHAR}
</if>
<if
test=
"method != null"
>
AND log.method = #{method,jdbcType=VARCHAR}
AND
_
log.method = #{method,jdbcType=VARCHAR}
</if>
<if
test=
"requestParam != null"
>
AND log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
AND
_
log.request_param = #{requestParam,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optResult != null"
>
AND log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
AND
_
log.opt_result = #{optResult,jdbcType=LONGVARCHAR}
</if>
<if
test=
"optIp != null"
>
AND log.opt_ip = #{optIp,jdbcType=VARCHAR}
AND _log.opt_ip = #{optIp,jdbcType=VARCHAR}
</if>
<if
test=
"projectId != null"
>
AND _log.project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND log.remark = #{remark,jdbcType=VARCHAR}
AND
_
log.remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND log.data_status = #{dataStatus,jdbcType=CHAR}
AND
_
log.data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND log.create_user_id = #{createUserId,jdbcType=INTEGER}
AND
_
log.create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
AND
_
log.create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND log.update_user_id = #{updateUserId,jdbcType=INTEGER}
AND
_
log.update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
AND
_
log.update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
AND
_
log.update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</where>
</select>
...
...
@@ -481,9 +541,9 @@
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_opt_log log
where log.opt_id = #{optId,jdbcType=INTEGER}
AND log.data_status='1'
from dmp_opt_log
_
log
where
_
log.opt_id = #{optId,jdbcType=INTEGER}
AND
_
log.data_status='1'
</select>
<!-- 根据主键批量删除操作日志表 -->
...
...
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