From 158b7cca21ea13b06fb4b3c129a2b6b481ae1764 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 29 Apr 2024 16:14:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E4=BA=BA=20=E4=BB=A3=E6=8A=A5=E4=BA=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联#[1143434969055232]后端-上报人 代报人逻辑优化 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1143434969055232 --- .../ProcessTaskCreatePublicServiceImpl.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/neatlogic/module/process/service/ProcessTaskCreatePublicServiceImpl.java b/src/main/java/neatlogic/module/process/service/ProcessTaskCreatePublicServiceImpl.java index 32bf11956..68985c77c 100644 --- a/src/main/java/neatlogic/module/process/service/ProcessTaskCreatePublicServiceImpl.java +++ b/src/main/java/neatlogic/module/process/service/ProcessTaskCreatePublicServiceImpl.java @@ -3,9 +3,13 @@ package neatlogic.module.process.service; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.asynchronization.thread.NeatLogicThread; +import neatlogic.framework.asynchronization.threadlocal.UserContext; import neatlogic.framework.asynchronization.threadpool.CachedThreadPool; import neatlogic.framework.common.constvalue.GroupSearch; +import neatlogic.framework.common.constvalue.SystemUser; import neatlogic.framework.dao.mapper.UserMapper; +import neatlogic.framework.dto.AuthenticationInfoVo; +import neatlogic.framework.dto.JwtVo; import neatlogic.framework.dto.UserVo; import neatlogic.framework.exception.user.UserNotFoundException; import neatlogic.framework.file.dao.mapper.FileMapper; @@ -350,12 +354,17 @@ public class ProcessTaskCreatePublicServiceImpl implements ProcessTaskCreatePubl throw new UserNotFoundException(reporter); } paramObj.put("reporter", reporterUserVo.getUuid()); -// reporterUserVo = userMapper.getUserByUuid(reporterUserVo.getUuid()); + reporterUserVo = userMapper.getUserByUuid(reporterUserVo.getUuid()); } -// AuthenticationInfoVo authenticationInfoVo = authenticationInfoService.getAuthenticationInfo(userVo.getUuid()); -// JwtVo jwtVo = UserContext.get().getJwtVo(); -// UserContext.get().init(reporterUserVo, authenticationInfoVo, SystemUser.SYSTEM.getTimezone()).setJwtVo(jwtVo); + AuthenticationInfoVo authenticationInfoVo = authenticationInfoService.getAuthenticationInfo(userVo.getUuid()); + JwtVo jwtVo = UserContext.get().getJwtVo(); + UserContext.get().init(reporterUserVo, authenticationInfoVo, SystemUser.SYSTEM.getTimezone()).setJwtVo(jwtVo); + } else { + AuthenticationInfoVo authenticationInfoVo = authenticationInfoService.getAuthenticationInfo(userVo.getUuid()); + JwtVo jwtVo = UserContext.get().getJwtVo(); + UserContext.get().init(userVo, authenticationInfoVo, SystemUser.SYSTEM.getTimezone()).setJwtVo(jwtVo); } + Long processTaskId = null; Integer isAsync = paramObj.getInteger("isAsync"); if (Objects.equals(isAsync, 1)) { -- Gitee