mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-04 11:37:28 +00:00
update 优化 异常日志输出方式
This commit is contained in:
@@ -10,6 +10,7 @@ import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.util.StringUtils;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.batik.transcoder.TranscoderInput;
|
||||
import org.apache.batik.transcoder.TranscoderOutput;
|
||||
import org.apache.batik.transcoder.image.PNGTranscoder;
|
||||
@@ -59,6 +60,7 @@ import java.util.zip.ZipOutputStream;
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ActModelServiceImpl implements IActModelService {
|
||||
@@ -131,7 +133,7 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
repositoryService.addModelEditorSource(model.getId(), StrUtil.utf8Bytes(xml));
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -230,7 +232,7 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
repositoryService.addModelEditorSourceExtra(model.getId(), result);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -325,7 +327,7 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -370,7 +372,7 @@ public class ActModelServiceImpl implements IActModelService {
|
||||
// 刷出响应流
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -9,6 +9,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -55,6 +56,7 @@ import java.util.zip.ZipInputStream;
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionService {
|
||||
@@ -208,7 +210,7 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
wfNodeConfigService.deleteByDefIds(processDefinitionIds);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -233,7 +235,7 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException("操作失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -262,6 +264,7 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
.migrateProcessInstances(fromProcessDefinitionId);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -291,7 +294,7 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
@@ -490,7 +490,7 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
|
||||
historicProcessInstance.getBusinessKey(), BusinessStatusEnum.INVALID.getStatus(), false);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
|
||||
wfTaskBackNodeService.deleteByInstanceIds(processInstanceIds);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -549,7 +549,7 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
|
||||
wfTaskBackNodeService.deleteByInstanceIds(processInstanceIds);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -599,7 +599,7 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
|
||||
processInstance.getBusinessKey(), BusinessStatusEnum.CANCEL.getStatus(), false);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException("撤销失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
@@ -66,6 +67,7 @@ import static org.dromara.workflow.common.constant.FlowConstant.*;
|
||||
*
|
||||
* @author may
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ActTaskServiceImpl implements IActTaskService {
|
||||
@@ -230,6 +232,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -478,7 +481,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
taskService.complete(newTask.getId());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -548,7 +551,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
taskService.setAssignee(task.getId(), transmitBo.getUserId());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -596,7 +599,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
taskService.complete(newTask.getId());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -646,7 +649,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
taskService.complete(newTask.getId());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -726,6 +729,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
//删除驳回后的流程节点
|
||||
wfTaskBackNodeService.deleteBackTaskNode(processInstanceId, backProcessBo.getTargetActivityId());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
return task.getProcessInstanceId();
|
||||
@@ -746,6 +750,7 @@ public class ActTaskServiceImpl implements IActTaskService {
|
||||
taskService.setAssignee(task.getId(), userId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException("修改失败:" + e.getMessage());
|
||||
}
|
||||
return true;
|
||||
|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
@@ -29,6 +30,7 @@ import static org.dromara.workflow.common.constant.FlowConstant.USER_TASK;
|
||||
* @author may
|
||||
* @date 2024-03-13
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WfTaskBackNodeServiceImpl implements IWfTaskBackNodeService {
|
||||
@@ -109,7 +111,7 @@ public class WfTaskBackNodeServiceImpl implements IWfTaskBackNodeService {
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
throw new ServiceException("删除失败");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user