Compare commits

...

3 Commits

Author SHA1 Message Date
疯狂的狮子Li
abfa995a32 update 优化 监听器兼容所有demo案例 2024-10-17 18:12:26 +08:00
疯狂的狮子Li
51cfbef887 update 优化 操作日志记录DELETE请求参数 2024-10-17 17:34:33 +08:00
疯狂的狮子Li
7171ed1508 update 优化 snailjob客户端ip配置说明 2024-10-17 17:25:02 +08:00
4 changed files with 15 additions and 7 deletions

View File

@@ -25,6 +25,8 @@ snail-job:
namespace: ${spring.profiles.active}
# 随主应用端口飘逸
port: 2${server.port}
# 客户端ip指定
host:
--- # 数据源配置
spring:

View File

@@ -28,6 +28,8 @@ snail-job:
namespace: ${spring.profiles.active}
# 随主应用端口飘逸
port: 2${server.port}
# 客户端ip指定
host:
--- # 数据源配置
spring:

View File

@@ -159,8 +159,7 @@ public class LogAspect {
private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames) throws Exception {
Map<String, String> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
String requestMethod = operLog.getRequestMethod();
if (MapUtil.isEmpty(paramsMap)
&& HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) {
if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) {
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
} else {

View File

@@ -142,11 +142,16 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
*
* @param processTaskEvent 参数
*/
@EventListener(condition = "#processTaskEvent.key=='leave1' && #processTaskEvent.taskDefinitionKey=='Activity_14633hx'")
@EventListener(condition = "#processTaskEvent.key.startsWith('leave')")
public void processTaskHandler(ProcessTaskEvent processTaskEvent) {
log.info("当前任务执行了{}", processTaskEvent.toString());
TestLeave testLeave = baseMapper.selectById(Long.valueOf(processTaskEvent.getBusinessKey()));
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
baseMapper.updateById(testLeave);
// 所有demo案例的申请人节点id
String[] ids = {"Activity_14633hx", "Activity_19b1i4j", "Activity_0uscrk3",
"Activity_0uscrk3", "Activity_0x6b71j", "Activity_0zy3g6j", "Activity_06a55t0"};
if (StringUtils.equalsAny(processTaskEvent.getTaskDefinitionKey(), ids)) {
log.info("当前任务执行了{}", processTaskEvent.toString());
TestLeave testLeave = baseMapper.selectById(Long.valueOf(processTaskEvent.getBusinessKey()));
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
baseMapper.updateById(testLeave);
}
}
}