1.dev配置mysql空闲回收时间为1分钟
2.操作日志新增操作数据表字段,日志注解增加操作数据表属性,修改涉及到数据修改接口的日志注解 3.ucs编码生成工具类 4.涉及到流程的增加申请单号字段
This commit is contained in:
parent
15cc666261
commit
4dda8aaf1b
|
@ -16,4 +16,5 @@ import java.lang.annotation.Target;
|
|||
public @interface LogOperation {
|
||||
|
||||
String value() default "";
|
||||
String operationTable() default "";
|
||||
}
|
||||
|
|
|
@ -67,6 +67,8 @@ public class LogOperationAspect {
|
|||
if(annotation != null){
|
||||
//注解上的描述
|
||||
log.setOperation(annotation.value());
|
||||
//操作数据库表
|
||||
log.setOperationTable(annotation.operationTable());
|
||||
}
|
||||
|
||||
//登录用户信息
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.common.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.utils.Result;
|
||||
|
|
|
@ -64,6 +64,9 @@ public class TDemandDataDTO extends AuditingBaseDTO implements Serializable {
|
|||
@ApiModelProperty(value = "评论数目")
|
||||
private Long commentCount = 0l;
|
||||
|
||||
@ApiModelProperty(value = "申请单号")
|
||||
private String applyNumber;
|
||||
|
||||
public TDemandDataDTO() {
|
||||
this.flag = TDemandDataEntityFlag.INIT.getFlag();
|
||||
this.visits = 0l;
|
||||
|
|
|
@ -82,4 +82,8 @@ public class TDemandDataEntity extends BaseEntity {
|
|||
* 实例ID
|
||||
*/
|
||||
private String instanceId;
|
||||
/**
|
||||
* 申请单号
|
||||
*/
|
||||
private String applyNumber;
|
||||
}
|
|
@ -49,4 +49,7 @@ public class TDemandCommentDTO extends AuditingBaseDTO implements Serializable {
|
|||
@ApiModelProperty(value = "评论所属需求主题")
|
||||
private TDemandDataDTO demandDataDTO;
|
||||
|
||||
@ApiModelProperty(value = "申请单号")
|
||||
private String applyNumber;
|
||||
|
||||
}
|
|
@ -58,4 +58,8 @@ public class TDemandCommentEntity extends BaseEntity {
|
|||
* 删除标志:0:正常;1:已删除;2:待审核;3:审核中;9其他
|
||||
*/
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 申请单号
|
||||
*/
|
||||
private String applyNumber;
|
||||
}
|
|
@ -47,7 +47,8 @@ public class SysLogOperationController {
|
|||
@ApiImplicitParam(name = "creatorName", value = "操作人", paramType = "query", dataType="String"),
|
||||
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType="String"),
|
||||
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType="String"),
|
||||
@ApiImplicitParam(name = "operation", value = "操作名称", paramType = "query", dataType="String")
|
||||
@ApiImplicitParam(name = "operation", value = "操作名称", paramType = "query", dataType="String"),
|
||||
@ApiImplicitParam(name = "operationType", value = "操作类型", paramType = "query", dataType="String")
|
||||
})
|
||||
// @RequiresPermissions("sys:log:operation")
|
||||
public Result<PageData<SysLogOperationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
|
|
|
@ -50,4 +50,9 @@ public class SysLogOperationDTO implements Serializable {
|
|||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@ApiModelProperty(value = "返回结果")
|
||||
private String resultData;
|
||||
|
||||
@ApiModelProperty(value = "操作数据库表")
|
||||
private String operationTable;
|
||||
}
|
|
@ -56,4 +56,8 @@ public class SysLogOperationEntity extends BaseEntity {
|
|||
* 返回结果
|
||||
*/
|
||||
private String resultData;
|
||||
/**
|
||||
* 操作数据库表
|
||||
*/
|
||||
private String operationTable;
|
||||
}
|
|
@ -49,14 +49,25 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
|
|||
String operation = (String) params.get("operation");
|
||||
String startDate = (String) params.get("startDate");
|
||||
String endDate = (String) params.get("endDate");
|
||||
|
||||
QueryWrapper<SysLogOperationEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StringUtils.isNotBlank(status), "status", status)
|
||||
String operationType = (String) params.get("operationType");
|
||||
QueryWrapper<SysLogOperationEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(StringUtils.isNotBlank(status), "status", status)
|
||||
.eq(StringUtils.isNotBlank(creatorName), "creator_name", creatorName)
|
||||
.like(StringUtils.isNotBlank(operation), "operation", operation)
|
||||
.between(StringUtils.isNotBlank(startDate), "", startDate, endDate);
|
||||
|
||||
return wrapper;
|
||||
.between(StringUtils.isNotBlank(startDate), "create_date", startDate, endDate);
|
||||
if ("all".equals(operationType)) {
|
||||
queryWrapper.ne("request_uri", "/renren-admin/resource/updateVisits");
|
||||
queryWrapper.and(wrapper ->
|
||||
wrapper.like("request_uri", "/renren-admin/resource%/insert")
|
||||
.or()
|
||||
.like("request_uri", "/renren-admin/resource%/update")
|
||||
.or()
|
||||
.like("request_uri", "/renren-admin/resource%/delete"));
|
||||
} else {
|
||||
queryWrapper.ne("request_uri", "/renren-admin/resource/updateVisits");
|
||||
queryWrapper.like(StringUtils.isNotBlank(operationType),"request_uri", operationType);
|
||||
}
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,4 +78,7 @@ public class TAbilityApplicationDTO extends AuditingBaseDTO implements Serializa
|
|||
@ApiModelProperty(value = "资源所属部门信息")
|
||||
private SysDeptDTO resourceOwnerDept;
|
||||
|
||||
@ApiModelProperty(value = "申请单号")
|
||||
private String applyNumber;
|
||||
|
||||
}
|
|
@ -58,28 +58,22 @@ public class TAbilityApplicationEntity implements Serializable {
|
|||
* 申请附件
|
||||
*/
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 实例ID
|
||||
*/
|
||||
private String instanceId;
|
||||
|
||||
|
||||
/**
|
||||
* 资源id
|
||||
*/
|
||||
private String resourceId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 审核状态:审核中,通过,不通过
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 删除标记:0:正常使用;1:已删除;9:其他
|
||||
*/
|
||||
|
@ -89,53 +83,46 @@ public class TAbilityApplicationEntity implements Serializable {
|
|||
* 附件
|
||||
*/
|
||||
private String enclosure;
|
||||
|
||||
/**
|
||||
* 流程通过后api网关注册的认证code,用于三方接口调用
|
||||
*/
|
||||
private String gatewayCode;
|
||||
|
||||
/**
|
||||
* 摄像头列表
|
||||
*/
|
||||
private String cameraList;
|
||||
|
||||
/**
|
||||
* 能力申请标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
|
||||
/**
|
||||
* 应用系统
|
||||
*/
|
||||
private String applicationSystem;
|
||||
|
||||
/**
|
||||
* 应用场景
|
||||
*/
|
||||
@TableField(value = "`application_scene`", typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> applicationScene;
|
||||
|
||||
/**
|
||||
* 应用背景
|
||||
*/
|
||||
private String applicationBackground;
|
||||
|
||||
/**
|
||||
* 能力应用期望效果
|
||||
*/
|
||||
private String effectWish;
|
||||
|
||||
/**
|
||||
* 申请单标识(同一次的申请标识)
|
||||
*/
|
||||
private String applyFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 资源所属部门信息
|
||||
*/
|
||||
@TableField(value = "`resource_owner_dept`", typeHandler = FastjsonTypeHandler.class)
|
||||
private SysDeptDTO resourceOwnerDept;
|
||||
/**
|
||||
* 申请单号
|
||||
*/
|
||||
private String applyNumber;
|
||||
}
|
|
@ -116,7 +116,7 @@ public class ResourceController {
|
|||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询资源信息")
|
||||
@LogOperation("分页查询资源信息")
|
||||
@LogOperation(value = "分页查询资源信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
|
@ -135,7 +135,7 @@ public class ResourceController {
|
|||
|
||||
@PostMapping("/pageWithAttrs")
|
||||
@ApiOperation("分页查询资源信息2")
|
||||
// @LogOperation("分页查询资源信息2")
|
||||
@LogOperation("分页查询资源信息2")
|
||||
public Result pageWithAttrs(@RequestBody JSONObject jsonObject) {
|
||||
ResourceDTO resourceDTO = JSON.toJavaObject(jsonObject, ResourceDTO.class);
|
||||
return new Result<>().ok(resourceService.pageWithAttrs(jsonObject, resourceService.selectDTOPageSpecilTotal(resourceDTO)));
|
||||
|
@ -223,7 +223,7 @@ public class ResourceController {
|
|||
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
@LogOperation(value = "保存", operationTable = "tb_data_resource;tb_data_attr;")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "source", value = "请求来源", paramType = "string", dataType = "string")
|
||||
})
|
||||
|
@ -286,7 +286,7 @@ public class ResourceController {
|
|||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@LogOperation(value = "修改", operationTable = "tb_data_resource;tb_data_attr;")
|
||||
//@RequiresPermissions("resource:resource:update")
|
||||
public Result update(@RequestBody ResourceDTO dto) {
|
||||
//效验数据
|
||||
|
@ -299,7 +299,7 @@ public class ResourceController {
|
|||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
@LogOperation(value = "删除", operationTable = "tb_data_resource;tb_data_attr;")
|
||||
//@RequiresPermissions("resource:resource:delete")
|
||||
public Result delete(@RequestBody JSONObject jsonObject) {
|
||||
resourceService.deleteWithAttrs(jsonObject);
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ResourceBrowseController {
|
|||
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("保存浏览记录")
|
||||
@LogOperation("保存浏览记录")
|
||||
@LogOperation(value = "保存浏览记录", operationTable = "tb_resource_browse;tb_data_resource;")
|
||||
//@RequiresPermissions("resourceBrowse:resourcebrowse:save")
|
||||
public Result save(@RequestBody ResourceBrowseDTO dto) {
|
||||
//效验数据
|
||||
|
@ -111,7 +111,7 @@ public class ResourceBrowseController {
|
|||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("批量删除浏览记录")
|
||||
@LogOperation("批量删除浏览记录")
|
||||
@LogOperation(value = "批量删除浏览记录", operationTable = "tb_resource_browse;")
|
||||
//@RequiresPermissions("resourceBrowse:resourcebrowse:delete")
|
||||
public Result delete(@RequestBody Long[] ids) {
|
||||
//效验数据
|
||||
|
|
|
@ -66,7 +66,7 @@ public class ResourceCarController {
|
|||
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("添加申购车")
|
||||
@LogOperation("添加申购车")
|
||||
@LogOperation(value = "添加申购车", operationTable = "tb_resource_car;")
|
||||
//@RequiresPermissions("resourceCar:resourcecar:save")
|
||||
public Result save(@RequestBody ResourceCarDTO dto){
|
||||
//效验数据
|
||||
|
@ -80,8 +80,8 @@ public class ResourceCarController {
|
|||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除申购")
|
||||
@LogOperation("删除申购")
|
||||
@ApiOperation("删除申购记录")
|
||||
@LogOperation(value = "删除申购记录", operationTable = "tb_resource_car;")
|
||||
//@RequiresPermissions("resourceCar:resourcecar:delete")
|
||||
public Result delete(@RequestBody JSONObject jsonObject){
|
||||
resourceCarService.deleteByIds(jsonObject);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ResourceCollectionController {
|
|||
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("新增收藏")
|
||||
@LogOperation("新增收藏")
|
||||
@LogOperation(value = "新增收藏", operationTable = "tb_resource_collection;tb_data_resource;")
|
||||
//@RequiresPermissions("resourceCollection:resourcecollection:save")
|
||||
public Result save(@RequestBody List<ResourceCollectionEntity> list){
|
||||
//效验数据
|
||||
|
@ -74,7 +74,7 @@ public class ResourceCollectionController {
|
|||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
@LogOperation(value = "修改", operationTable = "tb_resource_collection;")
|
||||
//@RequiresPermissions("resourceCollection:resourcecollection:update")
|
||||
public Result update(@RequestBody ResourceCollectionDTO dto){
|
||||
//效验数据
|
||||
|
@ -87,7 +87,7 @@ public class ResourceCollectionController {
|
|||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("取消收藏")
|
||||
@LogOperation("取消收藏")
|
||||
@LogOperation(value = "取消收藏", operationTable = "tb_resource_collection;tb_data_resource;")
|
||||
//@RequiresPermissions("resourceCollection:resourcecollection:delete")
|
||||
public Result delete(@RequestBody Long[] resourceIds){
|
||||
//效验数据
|
||||
|
|
|
@ -100,7 +100,7 @@ public class ResourceCollectionServiceImpl extends CrudServiceImpl<ResourceColle
|
|||
jdbcTemplate.update(sql);
|
||||
|
||||
} else {
|
||||
collectionEntities.stream().forEach(index -> {
|
||||
collectionEntities.forEach(index -> {
|
||||
index.setUpdateDate(new Date());
|
||||
resourceCollectionDao.updateById(index);
|
||||
});
|
||||
|
|
|
@ -47,6 +47,9 @@ public class TResourceMountApplyDTO extends AuditingBaseDTO implements Serializa
|
|||
@ApiModelProperty(value = "资源id")
|
||||
private Long resourceId;
|
||||
|
||||
@ApiModelProperty(value = "申请单号")
|
||||
private String applyNumber;
|
||||
|
||||
public ResourceDTO getResourceDTO() {
|
||||
if (this.resourceDTO != null) {
|
||||
return this.resourceDTO;
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.io.Serializable;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "资源下架申请表单")
|
||||
public class TResourceUndercarriageApplyDTO extends AuditingBaseDTO implements Serializable {
|
||||
|
|
|
@ -68,4 +68,9 @@ public class TResourceMountApplyEntity extends BaseEntity {
|
|||
|
||||
@TableField(value = "resource_dto", typeHandler = FastjsonTypeHandler.class)
|
||||
private ResourceDTO resourceDTO;
|
||||
|
||||
/**
|
||||
* 申请单号
|
||||
*/
|
||||
private String applyNumber;
|
||||
}
|
|
@ -66,8 +66,8 @@ public class ResourceScoreController {
|
|||
}
|
||||
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("新增能力评分")
|
||||
@LogOperation("新增能力评分")
|
||||
@ApiOperation("新增能力评价")
|
||||
@LogOperation(value = "新增能力评价", operationTable = "tb_resource_score;")
|
||||
//@RequiresPermissions("resourceScore:resourcescore:save")
|
||||
public Result save(@RequestBody ResourceScoreDTO dto){
|
||||
//效验数据
|
||||
|
@ -81,8 +81,8 @@ public class ResourceScoreController {
|
|||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改能力评分")
|
||||
@LogOperation("修改能力评分")
|
||||
@ApiOperation("修改能力评价")
|
||||
@LogOperation(value = "修改能力评价", operationTable = "tb_resource_score")
|
||||
//@RequiresPermissions("resourceScore:resourcescore:update")
|
||||
public Result update(@RequestBody ResourceScoreDTO dto){
|
||||
//效验数据
|
||||
|
@ -92,8 +92,8 @@ public class ResourceScoreController {
|
|||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除能力评分")
|
||||
@LogOperation("删除能力评分")
|
||||
@ApiOperation("删除能力评价")
|
||||
@LogOperation(value = "删除能力评价", operationTable = "tb_resource_score")
|
||||
//@RequiresPermissions("resourceScore:resourcescore:delete")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
|
|
|
@ -68,6 +68,7 @@ public class WorkDynamicsServiceImpl extends CrudServiceImpl<WorkDynamicsDao, Wo
|
|||
List<Long> userIdList=sysUserList.stream().map(user->user.getId()).collect(Collectors.toList());
|
||||
QueryWrapper<WorkDynamicsEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("del_flag", 0);
|
||||
wrapper.orderByDesc("create_date");
|
||||
if(userIdList.size()>0){
|
||||
wrapper.in("creator", userIdList);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ spring:
|
|||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
min-evictable-idle-time-millis: 60000
|
||||
#Oracle需要打开注释
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
|
|
|
@ -90,7 +90,7 @@ mybatis-plus:
|
|||
cache-enabled: false
|
||||
call-setters-on-nulls: true
|
||||
jdbc-type-for-null: 'null'
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
#系统上线日期,用于统计能力浏览记录
|
||||
system:
|
||||
|
|
Loading…
Reference in New Issue