Compare commits
5 Commits
d0cca3951c
...
4ac7dfecd3
Author | SHA1 | Date |
---|---|---|
wangliwen | 4ac7dfecd3 | |
wangliwen | cda11901c7 | |
wangliwen | 8ade504226 | |
dinggang | 5e536dc812 | |
wangliwen | 8f640f66e6 |
|
@ -322,6 +322,7 @@ public class ActivitiNoticeAspect {
|
||||||
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||||
logger.error("审核人:" + assignee.getId());
|
logger.error("审核人:" + assignee.getId());
|
||||||
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
||||||
|
logger.info("通知内容:" + content);
|
||||||
SysNoticeDTO dto = new SysNoticeDTO();
|
SysNoticeDTO dto = new SysNoticeDTO();
|
||||||
dto.setType(2);
|
dto.setType(2);
|
||||||
dto.setTitle("流程流转系统通知");
|
dto.setTitle("流程流转系统通知");
|
||||||
|
|
|
@ -42,24 +42,23 @@ public class LogOperationAspect {
|
||||||
try {
|
try {
|
||||||
//执行方法
|
//执行方法
|
||||||
Object result = point.proceed();
|
Object result = point.proceed();
|
||||||
|
|
||||||
//执行时长(毫秒)
|
//执行时长(毫秒)
|
||||||
long time = System.currentTimeMillis() - beginTime;
|
long time = System.currentTimeMillis() - beginTime;
|
||||||
//保存日志
|
//保存日志
|
||||||
saveLog(point, time, OperationStatusEnum.SUCCESS.value());
|
saveLog(point, time, OperationStatusEnum.SUCCESS.value(), result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
//执行时长(毫秒)
|
//执行时长(毫秒)
|
||||||
long time = System.currentTimeMillis() - beginTime;
|
long time = System.currentTimeMillis() - beginTime;
|
||||||
//保存日志
|
//保存日志
|
||||||
saveLog(point, time, OperationStatusEnum.FAIL.value());
|
saveLog(point, time, OperationStatusEnum.FAIL.value(), null);
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveLog(ProceedingJoinPoint joinPoint, long time, Integer status) throws Exception {
|
private void saveLog(ProceedingJoinPoint joinPoint, long time, Integer status, Object result) throws Exception {
|
||||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||||
Method method = joinPoint.getTarget().getClass().getDeclaredMethod(signature.getName(), signature.getParameterTypes());
|
Method method = joinPoint.getTarget().getClass().getDeclaredMethod(signature.getName(), signature.getParameterTypes());
|
||||||
LogOperation annotation = method.getAnnotation(LogOperation.class);
|
LogOperation annotation = method.getAnnotation(LogOperation.class);
|
||||||
|
@ -78,6 +77,7 @@ public class LogOperationAspect {
|
||||||
|
|
||||||
log.setStatus(status);
|
log.setStatus(status);
|
||||||
log.setRequestTime((int)time);
|
log.setRequestTime((int)time);
|
||||||
|
log.setResultData(JSON.toJSONString(result));
|
||||||
|
|
||||||
//请求相关信息
|
//请求相关信息
|
||||||
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
|
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
|
||||||
|
|
|
@ -63,6 +63,9 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (!params.containsKey("creator")) {
|
||||||
|
wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "del_flag", 0);
|
||||||
|
}
|
||||||
wrapper.orderByDesc("create_date");
|
wrapper.orderByDesc("create_date");
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -44,7 +43,11 @@ public class SysLogOperationController {
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String") ,
|
||||||
@ApiImplicitParam(name = "status", value = "状态 0:失败 1:成功", paramType = "query", dataType="int")
|
@ApiImplicitParam(name = "status", value = "状态 0:失败 1:成功", paramType = "query", dataType="int"),
|
||||||
|
@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")
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:log:operation")
|
// @RequiresPermissions("sys:log:operation")
|
||||||
public Result<PageData<SysLogOperationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysLogOperationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||||
|
@ -53,6 +56,19 @@ public class SysLogOperationController {
|
||||||
return new Result<PageData<SysLogOperationDTO>>().ok(page);
|
return new Result<PageData<SysLogOperationDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/deleteByIds")
|
||||||
|
@ApiOperation("/删除操作记录")
|
||||||
|
@LogOperation("/删除操作记录")
|
||||||
|
public Result deleteByIds(List<Long> ids) {
|
||||||
|
try {
|
||||||
|
sysLogOperationService.deleteBatchIds(ids);
|
||||||
|
return new Result().ok(null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return new Result().error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("export")
|
@GetMapping("export")
|
||||||
@ApiOperation("导出")
|
@ApiOperation("导出")
|
||||||
@LogOperation("导出")
|
@LogOperation("导出")
|
||||||
|
|
|
@ -52,4 +52,8 @@ public class SysLogOperationEntity extends BaseEntity {
|
||||||
* 用户名
|
* 用户名
|
||||||
*/
|
*/
|
||||||
private String creatorName;
|
private String creatorName;
|
||||||
|
/**
|
||||||
|
* 返回结果
|
||||||
|
*/
|
||||||
|
private String resultData;
|
||||||
}
|
}
|
|
@ -45,9 +45,16 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
|
||||||
|
|
||||||
private QueryWrapper<SysLogOperationEntity> getWrapper(Map<String, Object> params) {
|
private QueryWrapper<SysLogOperationEntity> getWrapper(Map<String, Object> params) {
|
||||||
String status = (String) params.get("status");
|
String status = (String) params.get("status");
|
||||||
|
String creatorName = (String) params.get("creatorName");
|
||||||
|
String operation = (String) params.get("operation");
|
||||||
|
String startDate = (String) params.get("startDate");
|
||||||
|
String endDate = (String) params.get("endDate");
|
||||||
|
|
||||||
QueryWrapper<SysLogOperationEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<SysLogOperationEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq(StringUtils.isNotBlank(status), "status", status);
|
wrapper.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;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public void save(SysNoticeDTO dto) {
|
public void save(SysNoticeDTO dto) {
|
||||||
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
||||||
if (StringUtils.isEmpty(entity.getFrom())) {
|
if (StringUtils.isEmpty(entity.getFrom())) {
|
||||||
|
|
|
@ -105,6 +105,7 @@ public class ResourceController {
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@ApiOperation("分页查询资源信息")
|
@ApiOperation("分页查询资源信息")
|
||||||
|
@LogOperation("分页查询资源信息")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
|
@ -416,6 +417,8 @@ public class ResourceController {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("/hls/getHls")
|
@GetMapping("/hls/getHls")
|
||||||
|
@ApiOperation("获取hls地址")
|
||||||
|
@LogOperation("获取hls地址")
|
||||||
public Result<String> getHls(String key) {
|
public Result<String> getHls(String key) {
|
||||||
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
|
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
|
||||||
if (factory.isPresent()) {
|
if (factory.isPresent()) {
|
||||||
|
|
|
@ -87,7 +87,6 @@ public class ResourceEntity extends BaseEntity {
|
||||||
* 删除标志:0:正常;1:已删除;9其他
|
* 删除标志:0:正常;1:已删除;9其他
|
||||||
*/
|
*/
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人
|
* 修改人
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -282,7 +282,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return resourceDTO1;
|
return resourceDTO1;
|
||||||
}).collect(Collectors.toList()));
|
}).collect(Collectors.toList()));
|
||||||
} else {
|
} else {
|
||||||
resultPage.setRecords(null);
|
resultPage.setRecords(new ArrayList<>());
|
||||||
resultPage.setTotal(0);
|
resultPage.setTotal(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.renren.modules.security.controller;
|
package io.renren.modules.security.controller;
|
||||||
|
|
||||||
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
import io.renren.common.exception.ErrorCode;
|
import io.renren.common.exception.ErrorCode;
|
||||||
import io.renren.common.exception.RenException;
|
import io.renren.common.exception.RenException;
|
||||||
|
@ -74,6 +75,7 @@ public class LoginController {
|
||||||
|
|
||||||
@GetMapping("login")
|
@GetMapping("login")
|
||||||
@ApiOperation(value = "登录")
|
@ApiOperation(value = "登录")
|
||||||
|
@LogOperation("登录")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "username", value = "登录名称", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "username", value = "登录名称", paramType = "query", required = true, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "password", value = "密码", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "password", value = "密码", paramType = "query", required = true, dataType = "String"),
|
||||||
|
@ -150,6 +152,7 @@ public class LoginController {
|
||||||
|
|
||||||
@PostMapping("logout")
|
@PostMapping("logout")
|
||||||
@ApiOperation(value = "退出")
|
@ApiOperation(value = "退出")
|
||||||
|
@LogOperation("/退出")
|
||||||
public Result logout(HttpServletRequest request, HttpServletResponse response) {
|
public Result logout(HttpServletRequest request, HttpServletResponse response) {
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE sys_log_operation ADD COLUMN result_data text NULL COMMENT '返回结果';
|
|
@ -4,4 +4,4 @@ tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCamera
|
||||||
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
||||||
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
|
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
|
||||||
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
|
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
|
||||||
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43
|
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43
|
|
@ -19,11 +19,12 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="commentCount" resultType="java.lang.Long">
|
<select id="commentCount" resultType="java.lang.Long">
|
||||||
SELECT
|
SELECT
|
||||||
COUNT( id )
|
COUNT( id )
|
||||||
FROM
|
FROM
|
||||||
t_demand_comment
|
t_demand_comment
|
||||||
WHERE
|
WHERE
|
||||||
target_id = #{dataId};
|
del_flag = 0
|
||||||
|
AND target_id = #{dataId};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -86,4 +86,13 @@ public class Result<T> implements Serializable {
|
||||||
public void setData(T data) {
|
public void setData(T data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Result{" +
|
||||||
|
"code=" + code +
|
||||||
|
", msg='" + msg + '\'' +
|
||||||
|
", data=" + data +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue