Merge branch 'master' into docker_package
# Conflicts: # renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java
This commit is contained in:
commit
9d6df94f63
|
@ -9,6 +9,8 @@ import java.io.Serializable;
|
|||
*/
|
||||
@Data
|
||||
public class AuditingBaseDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 流程中是否存在拒绝?
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* Model Rest
|
||||
|
@ -56,9 +57,9 @@ public class ModelSaveRestResource implements ModelDataJsonConstants {
|
|||
|
||||
repositoryService.saveModel(model);
|
||||
|
||||
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes("utf-8"));
|
||||
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes("utf-8"));
|
||||
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes(StandardCharsets.UTF_8));
|
||||
TranscoderInput input = new TranscoderInput(svgStream);
|
||||
|
||||
PNGTranscoder transcoder = new PNGTranscoder();
|
||||
|
|
|
@ -204,9 +204,9 @@ public class ActHistoryService {
|
|||
query.processDefinitionId((String) params.get("processDefinitionId"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("ended"))) {
|
||||
if ("true".equals((String) params.get("ended"))) {
|
||||
if ("true".equals(params.get("ended"))) {
|
||||
query.finished();
|
||||
} else if ("false".equals((String) params.get("ended"))) {
|
||||
} else if ("false".equals(params.get("ended"))) {
|
||||
query.unfinished();
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ public class ActHistoryService {
|
|||
if (!list.isEmpty()) {
|
||||
this.converHistoricProcessInstance(list, listInstance);
|
||||
}
|
||||
return new PageData<ProcessInstanceDTO>(listInstance, (int) query.count());
|
||||
return new PageData<>(listInstance, (int) query.count());
|
||||
}
|
||||
|
||||
private void converHistoricProcessInstance(List<HistoricProcessInstance> list, List<ProcessInstanceDTO> listInstance) {
|
||||
|
@ -324,9 +324,7 @@ public class ActHistoryService {
|
|||
dto.setResourceId(null);
|
||||
dto.setDemandCommentFlag(tDemandCommentDTO.getDelFlag());
|
||||
Optional<TDemandCommentEntityDelFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandCommentEntityDelFlag.getByFlag(tDemandCommentDTO.getDelFlag()));
|
||||
if (tDemandCommentEntityDelFlag.isPresent()) {
|
||||
dto.setDemandCommentFlagTip(tDemandCommentEntityDelFlag.get().getTip());
|
||||
}
|
||||
tDemandCommentEntityDelFlag.ifPresent(demandCommentEntityDelFlag -> dto.setDemandCommentFlagTip(demandCommentEntityDelFlag.getTip()));
|
||||
dto.setApplyNumber(tDemandCommentDTO.getApplyNumber());
|
||||
} else {
|
||||
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey()));
|
||||
|
@ -335,9 +333,7 @@ public class ActHistoryService {
|
|||
dto.setResourceId(null);
|
||||
dto.setDemandFlag(tDemandDataDTO.getFlag());
|
||||
Optional<TDemandDataEntityFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandDataEntityFlag.getByFlag(tDemandDataDTO.getFlag()));
|
||||
if (tDemandCommentEntityDelFlag.isPresent()) {
|
||||
dto.setDemandFlagTip(tDemandCommentEntityDelFlag.get().getTip());
|
||||
}
|
||||
tDemandCommentEntityDelFlag.ifPresent(tDemandDataEntityFlag -> dto.setDemandFlagTip(tDemandDataEntityFlag.getTip()));
|
||||
dto.setApplyNumber(tDemandDataDTO.getApplyNumber());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public class ActModelService {
|
|||
ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes);
|
||||
Deployment deployment = repositoryService.createDeployment().name(model.getName()).addInputStream(processName, in).deploy();
|
||||
List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
|
||||
if (list.size() == 0) {
|
||||
if (list.isEmpty()) {
|
||||
throw new RenException(ErrorCode.ACT_DEPLOY_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -156,7 +156,7 @@ public class ActModelService {
|
|||
List<String> names = repositoryService.getDeploymentResourceNames(deploymentId);
|
||||
String imageName = null;
|
||||
for (String name : names) {
|
||||
if (name.indexOf(".png") >= 0) {
|
||||
if (name.contains(".png")) {
|
||||
imageName = name;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class ActProcessService {
|
|||
if("zip".equalsIgnoreCase(extension) || "bar".equalsIgnoreCase(extension)) {
|
||||
ZipInputStream zip = new ZipInputStream(file.getInputStream());
|
||||
repositoryService.createDeployment().addZipInputStream(zip).deploy();
|
||||
}else if(fileName.indexOf("bpmn20.xml") != -1){
|
||||
}else if(fileName.contains("bpmn20.xml")){
|
||||
repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy();
|
||||
}else if("bpmn".equalsIgnoreCase(extension)){
|
||||
repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy();
|
||||
|
@ -197,9 +197,7 @@ public class ActProcessService {
|
|||
* @param resourceName 资源名称
|
||||
*/
|
||||
public InputStream getResourceAsStream(String deploymentId, String resourceName) {
|
||||
InputStream resourceAsStream = repositoryService.getResourceAsStream(deploymentId, resourceName);
|
||||
|
||||
return resourceAsStream;
|
||||
return repositoryService.getResourceAsStream(deploymentId, resourceName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -73,8 +73,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
private static final Logger logger = LoggerFactory.getLogger(ActTaskService.class);
|
||||
private static final ObjectMapper oMapper = new ObjectMapper();
|
||||
|
||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
||||
private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
|
||||
|
||||
public static String Task_HANDLE_STATE = "handleState"; //任务节点处理状态key
|
||||
public static String Task_HANDLE_STATE_AGREE = "agree"; //同意
|
||||
|
@ -130,7 +130,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskQuery.taskAssignee(userId);
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
||||
taskQuery.taskNameLike("%" + (String) params.get("taskName") + "%");
|
||||
taskQuery.taskNameLike("%" + params.get("taskName") + "%");
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||
taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
|
||||
|
@ -188,18 +188,16 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
return completableFuture;
|
||||
}).collect(Collectors.toList());
|
||||
CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[completableFutureList.size()])).join();
|
||||
Page<TaskDTO> page = new Page(curPage, limit);
|
||||
Page<TaskDTO> page = new Page<>(curPage, limit);
|
||||
if (taskDtoList.isEmpty()) {
|
||||
page.setRecords(null);
|
||||
page.setTotal(0);
|
||||
} else {
|
||||
ArrayList<TaskDTO> recordLists = new ArrayList<>();
|
||||
recordLists.addAll(taskDtoList.stream()
|
||||
ArrayList<TaskDTO> recordLists = new ArrayList<>(taskDtoList.stream()
|
||||
.distinct()
|
||||
.sorted(Comparator.comparing(TaskDTO::getCreateTime).reversed())
|
||||
.limit(limit)
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
.collect(Collectors.toList()));
|
||||
page.setRecords(recordLists);
|
||||
page.setTotal(count.stream().mapToLong(Long::longValue).sum());
|
||||
}
|
||||
|
@ -477,10 +475,10 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
|
||||
public void deleteTaskVariable(String taskId, String variableName, String scope) {
|
||||
if (StringUtils.isNotEmpty(scope)) {
|
||||
if ("global".equals(scope.toLowerCase())) {
|
||||
if ("global".equalsIgnoreCase(scope)) {
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
runtimeService.removeVariable(task.getExecutionId(), variableName);
|
||||
} else if ("local".equals(scope.toLowerCase())) {
|
||||
} else if ("local".equalsIgnoreCase(scope)) {
|
||||
taskService.removeVariable(taskId, variableName);
|
||||
}
|
||||
} else {
|
||||
|
@ -496,7 +494,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void doBackPreviousTask(String taskId, String comment) {
|
||||
Map<String, Object> variables = null;
|
||||
Map<String, Object> variables;
|
||||
HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
|
||||
if (this.isMultiInstance(taskId)) {
|
||||
throw new RenException(ErrorCode.BACK_PROCESS_PARALLEL_ERROR);
|
||||
|
@ -510,11 +508,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (canBackActivitys.isEmpty()) {
|
||||
throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST);
|
||||
}
|
||||
List<PvmTransition> originPvmTransitionList = new ArrayList<PvmTransition>();
|
||||
List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions();
|
||||
for (PvmTransition pvmTransition : pvmTransitionList) {
|
||||
originPvmTransitionList.add(pvmTransition);
|
||||
}
|
||||
List<PvmTransition> originPvmTransitionList = new ArrayList<>(pvmTransitionList);
|
||||
pvmTransitionList.clear();
|
||||
List<HistoricActivityInstance> historicActivityInstances = historyService
|
||||
.createHistoricActivityInstanceQuery().activityType("userTask")
|
||||
|
@ -629,12 +624,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskService.complete(taskId);
|
||||
} else {
|
||||
ActivityImpl currActivity = findActivitiImpl(taskId, null);
|
||||
List<PvmTransition> oriPvmTransitionList = new ArrayList<PvmTransition>();
|
||||
List<PvmTransition> pvmTransitionList = currActivity
|
||||
.getOutgoingTransitions();
|
||||
for (PvmTransition pvmTransition : pvmTransitionList) {
|
||||
oriPvmTransitionList.add(pvmTransition);
|
||||
}
|
||||
List<PvmTransition> oriPvmTransitionList = new ArrayList<>(pvmTransitionList);
|
||||
pvmTransitionList.clear();
|
||||
TransitionImpl newTransition = currActivity.createOutgoingTransition();
|
||||
ActivityImpl pointActivity = findActivitiImpl(taskId, endActivity.getId());
|
||||
|
@ -651,9 +643,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
pointActivity.getIncomingTransitions().remove(newTransition);
|
||||
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
|
||||
pvmTransitionListC.clear();
|
||||
for (PvmTransition pvmTransition : oriPvmTransitionList) {
|
||||
pvmTransitionListC.add(pvmTransition);
|
||||
}
|
||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -663,7 +653,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (isMultiInstanceByInstanceId(instanceId, userId)) {
|
||||
throw new RenException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
|
||||
}
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).list().stream().sorted(
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).active().list().stream().sorted(
|
||||
Comparator.comparing(x -> {
|
||||
Task index = (Task) x;
|
||||
return index.getCreateTime();
|
||||
|
@ -674,7 +664,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
return;
|
||||
}
|
||||
List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).taskAssignee(userId)
|
||||
.taskDefinitionKey(task.getTaskDefinitionKey()).list();
|
||||
.taskDefinitionKey(task.getTaskDefinitionKey()).active().list();
|
||||
if (tasks.size() > 1) {
|
||||
throw new RenException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
|
||||
}
|
||||
|
@ -690,12 +680,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskService.complete(task.getId());
|
||||
} else {
|
||||
ActivityImpl currActivity = findActivitiImplByInstanceId(instanceId, null);
|
||||
List<PvmTransition> oriPvmTransitionList = new ArrayList<PvmTransition>();
|
||||
List<PvmTransition> pvmTransitionList = currActivity
|
||||
.getOutgoingTransitions();
|
||||
for (PvmTransition pvmTransition : pvmTransitionList) {
|
||||
oriPvmTransitionList.add(pvmTransition);
|
||||
}
|
||||
List<PvmTransition> oriPvmTransitionList = new ArrayList<>(pvmTransitionList);
|
||||
pvmTransitionList.clear();
|
||||
TransitionImpl newTransition = currActivity.createOutgoingTransition();
|
||||
ActivityImpl pointActivity = findActivitiImplByInstanceId(instanceId, endActivity.getId());
|
||||
|
@ -713,9 +700,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
pointActivity.getIncomingTransitions().remove(newTransition);
|
||||
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
|
||||
pvmTransitionListC.clear();
|
||||
for (PvmTransition pvmTransition : oriPvmTransitionList) {
|
||||
pvmTransitionListC.add(pvmTransition);
|
||||
}
|
||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -732,7 +717,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (StringUtils.isEmpty(activityId)) {
|
||||
activityId = task.getTaskDefinitionKey();
|
||||
}
|
||||
if ("END".equals(activityId.toUpperCase())) {
|
||||
if ("END".equalsIgnoreCase(activityId)) {
|
||||
for (ActivityImpl activityImpl : processDefinition.getActivities()) {
|
||||
String type = (String) activityImpl.getProperty("type");
|
||||
if ("endEvent".equals(type)) {
|
||||
|
@ -740,8 +725,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
ActivityImpl activityImpl = processDefinition.findActivity(activityId);
|
||||
return activityImpl;
|
||||
return processDefinition.findActivity(activityId);
|
||||
}
|
||||
|
||||
private ActivityImpl findActivitiImplByInstanceId(String instanceId, String activityId) {
|
||||
|
@ -756,7 +740,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (StringUtils.isEmpty(activityId)) {
|
||||
activityId = task.getTaskDefinitionKey();
|
||||
}
|
||||
if ("END".equals(activityId.toUpperCase())) {
|
||||
if ("END".equalsIgnoreCase(activityId)) {
|
||||
for (ActivityImpl activityImpl : processDefinition.getActivities()) {
|
||||
String type = (String) activityImpl.getProperty("type");
|
||||
if ("endEvent".equals(type)) {
|
||||
|
@ -764,8 +748,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
ActivityImpl activityImpl = processDefinition.findActivity(activityId);
|
||||
return activityImpl;
|
||||
return processDefinition.findActivity(activityId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -805,7 +788,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (this.isMultiInstance(taskId)) {
|
||||
throw new RenException(ErrorCode.REJECT_PROCESS_PARALLEL_ERROR);
|
||||
}
|
||||
Map variables = null;
|
||||
Map variables;
|
||||
HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
|
||||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(currTask.getProcessInstanceId()).singleResult();
|
||||
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
|
||||
|
@ -819,18 +802,15 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
throw new RenException(ErrorCode.REJECT_PROCESS_HANDLEING_ERROR);
|
||||
}
|
||||
ActivityImpl currActivity = processDefinitionEntity.findActivity(currTask.getTaskDefinitionKey());
|
||||
List<PvmTransition> originPvmTransitionList = new ArrayList<>();
|
||||
List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions();
|
||||
for (PvmTransition pvmTransition : pvmTransitionList) {
|
||||
originPvmTransitionList.add(pvmTransition);
|
||||
}
|
||||
List<PvmTransition> originPvmTransitionList = new ArrayList<>(pvmTransitionList);
|
||||
pvmTransitionList.clear();
|
||||
List<HistoricActivityInstance> historicActivityInstances = historyService
|
||||
.createHistoricActivityInstanceQuery().activityType("userTask")
|
||||
.processInstanceId(processInstance.getId())
|
||||
.finished().orderByHistoricActivityInstanceEndTime().asc().list();
|
||||
TransitionImpl transitionImpl = null;
|
||||
if (historicActivityInstances.size() > 0) {
|
||||
TransitionImpl transitionImpl;
|
||||
if (!historicActivityInstances.isEmpty()) {
|
||||
ActivityImpl lastActivity = processDefinitionEntity.findActivity(historicActivityInstances.get(0).getActivityId());
|
||||
transitionImpl = currActivity.createOutgoingTransition();
|
||||
transitionImpl.setDestination(lastActivity);
|
||||
|
@ -849,9 +829,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
}
|
||||
currActivity.getOutgoingTransitions().remove(transitionImpl);
|
||||
|
||||
for (PvmTransition pvmTransition : originPvmTransitionList) {
|
||||
pvmTransitionList.add(pvmTransition);
|
||||
}
|
||||
pvmTransitionList.addAll(originPvmTransitionList);
|
||||
}
|
||||
|
||||
public void completeTaskByVariables(TaskDTO taskDTO) {
|
||||
|
|
|
@ -19,8 +19,7 @@ public class ProcessBizRouteServiceImpl extends BaseServiceImpl<ProcessBizRoute
|
|||
@Override
|
||||
public ProcessBizRouteDTO getProcDefBizRoute(String id) {
|
||||
ProcessBizRouteEntity entity = baseDao.getProcDefBizRoute(id);
|
||||
ProcessBizRouteDTO dto = ConvertUtils.sourceToTarget(entity, ProcessBizRouteDTO.class);
|
||||
return dto;
|
||||
return ConvertUtils.sourceToTarget(entity, ProcessBizRouteDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.renren.modules.demanData.listener;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
@ -40,7 +41,7 @@ import java.util.Optional;
|
|||
*/
|
||||
@Component
|
||||
public class DemandDataListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate {
|
||||
private static Logger logger = LoggerFactory.getLogger(DemandDataListener.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(DemandDataListener.class);
|
||||
private static final ObjectMapper oMapper = new ObjectMapper();
|
||||
|
||||
@Value("${big_date.name}")
|
||||
|
@ -69,9 +70,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
logger.error("----------------------进入能力需求受理者结束节点---------------------------");
|
||||
execution.getProcessBusinessKey();
|
||||
final String eventName = execution.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_END:
|
||||
break;
|
||||
if (EVENTNAME_END.equals(eventName)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,9 +83,9 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
@ActivitiNoticeOperation(value = "需求部门审批", process = "能力需求申请")
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
logger.error("----------------------进入能力需求受理者1节点---------------------------");
|
||||
logger.error("事件类型:" + delegateTask.getEventName());
|
||||
logger.error("事件类型:{}", delegateTask.getEventName());
|
||||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
logger.error("roleDTOId:{}", roleDTO.getId());
|
||||
final String eventName = delegateTask.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_CREATE: // 进入节点
|
||||
|
@ -96,7 +95,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
complete(delegateTask);
|
||||
break;
|
||||
default:
|
||||
logger.error("未处理该事件:" + eventName);
|
||||
logger.error("未处理该事件:{}", eventName);
|
||||
}
|
||||
logger.error("----------------------结束能力需求受理者1节点---------------------------");
|
||||
}
|
||||
|
@ -131,7 +130,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
|
||||
|
||||
if (demandDataDTO != null && demandDataDTO.getApplyUserDeptId() != null) {
|
||||
logger.error(JSONObject.toJSONString(demandDataDTO));
|
||||
logger.error(JSON.toJSONString(demandDataDTO));
|
||||
SysDeptDTO deptDTO =
|
||||
sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId()));
|
||||
SysUserDTO userDTO = null;
|
||||
|
@ -139,27 +138,27 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人
|
||||
}
|
||||
if (userDTO != null) {
|
||||
logger.error("审批人id:" + userDTO.getId());
|
||||
logger.error("审批人id:{}", userDTO.getId());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
assignee = userDTO.getId().toString();
|
||||
} else {
|
||||
logger.error("未查到该部门对应的 " + roleName);
|
||||
logger.error("未查到该部门对应的{} ", roleName);
|
||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||
assignee = "1516728698224427010";
|
||||
}
|
||||
} else { // 填入大数据审批人
|
||||
logger.error("大数据局名称:" + bigDateDeptName);
|
||||
logger.error("大数据局名称:{}", bigDateDeptName);
|
||||
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
logger.error("roleDTOId:{}", roleDTO.getId());
|
||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
||||
|
||||
if (userDTO != null) {
|
||||
logger.error("大数据审批人id:" + userDTO.getId());
|
||||
logger.error("大数据审批人id:{}", userDTO.getId());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
assignee = userDTO.getId().toString();
|
||||
} else {
|
||||
taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
|
||||
logger.error("未查到大数据部门对应 " + roleName);
|
||||
logger.error("未查到大数据部门对应 {}", roleName);
|
||||
assignee = "1516728698224427010";
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +185,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
|
||||
|
||||
if (demandDataDTO != null) {
|
||||
logger.error(JSONObject.toJSONString(demandDataDTO));
|
||||
logger.error(JSON.toJSONString(demandDataDTO));
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||
if (demandDataDTO.getReject() != null && demandDataDTO.getReject() == Boolean.TRUE) { // 拒绝
|
||||
demandDataDTO.setFlag(TDemandDataEntityFlag.REJECT.getFlag());
|
||||
|
@ -214,7 +213,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
demandDataDTO.setApprovalOpinions(comment.isPresent() ? comment.get().getFullMessage() : "");
|
||||
logger.error("---------------------------更新状态为已通过---------------------------------");
|
||||
}
|
||||
logger.error("demandDataDTO:" + demandDataDTO);
|
||||
logger.error("demandDataDTO:{}", demandDataDTO);
|
||||
Map<String, Object> combineResultMap = new HashMap<>();
|
||||
|
||||
Map<String, Object> variables = oMapper.convertValue(demandDataDTO, Map.class);
|
||||
|
|
|
@ -9,7 +9,6 @@ import io.renren.modules.demanData.entity.TDemandDataEntity;
|
|||
import io.renren.modules.demanData.entity.TDemandDataEntityFlag;
|
||||
import io.renren.modules.demanData.service.TDemandDataService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.sys.dao.SysDeptDao;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -49,6 +48,8 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
|||
case Constant.SEARCHKEY:
|
||||
wrapper.like("demand_subject", params.get(Constant.SEARCHKEY));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
if (!params.containsKey("creator")) {
|
||||
|
@ -78,9 +79,7 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
|||
deptList = deptService.getSubDeptIdList(deptId);
|
||||
}
|
||||
List<Map> list = baseDao.selectFlagCountByDepts(deptList);
|
||||
list.forEach(temp -> {
|
||||
temp.put("flag", TDemandDataEntityFlag.getByFlag(Integer.parseInt(temp.get("flag").toString())).getTip());
|
||||
});
|
||||
list.forEach(temp -> temp.put("flag", TDemandDataEntityFlag.getByFlag(Integer.parseInt(temp.get("flag").toString())).getTip()));
|
||||
resultMap.put("total", list);
|
||||
return resultMap;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.Map;
|
|||
*/
|
||||
@Component
|
||||
public class CommentListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate {
|
||||
private static Logger logger = LoggerFactory.getLogger(CommentListener.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(CommentListener.class);
|
||||
|
||||
@Value("${big_date.name}")
|
||||
private String bigDateDeptName; // 大数据局名称
|
||||
|
@ -60,10 +60,8 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
|
|||
logger.error("----------------------进入审批结束节点---------------------------");
|
||||
delegateExecution.getProcessBusinessKey();
|
||||
final String eventName = delegateExecution.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_END:
|
||||
endTake(delegateExecution.getVariables());
|
||||
break;
|
||||
if (EVENTNAME_END.equals(eventName)) {
|
||||
endTake(delegateExecution.getVariables());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -84,11 +82,11 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
|
|||
if (tDemandCommentDTO.getReject() != null && tDemandCommentDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点
|
||||
tDemandCommentDTO.setDelFlag(1);
|
||||
tDemandCommentService.update(tDemandCommentDTO);
|
||||
logger.error("评论审核不通过不通过!申请id:" + tDemandCommentDTO.getId());
|
||||
logger.error("评论审核不通过不通过!申请id:{}", tDemandCommentDTO.getId());
|
||||
} else {
|
||||
tDemandCommentDTO.setDelFlag(0);
|
||||
tDemandCommentService.update(tDemandCommentDTO);
|
||||
logger.error("审批通过!评论id:" + tDemandCommentDTO.getId());
|
||||
logger.error("审批通过!评论id:{}", tDemandCommentDTO.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,14 +99,12 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
|
|||
@Override
|
||||
@ActivitiNoticeOperation(value = "评论审核", process = "评论审核流程")
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
logger.error("事件类型:" + delegateTask.getEventName());
|
||||
logger.error("事件类型: {}", delegateTask.getEventName());
|
||||
final String eventName = delegateTask.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_CREATE:
|
||||
createEvent(delegateTask);
|
||||
break;
|
||||
default:
|
||||
logger.error("未处理该事件:" + eventName);
|
||||
if (EVENTNAME_CREATE.equals(eventName)) {
|
||||
createEvent(delegateTask);
|
||||
} else {
|
||||
logger.error("未处理该事件:{}", eventName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,20 +125,20 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
|
|||
*/
|
||||
private void createEvent(DelegateTask delegateTask) {
|
||||
String assignee;
|
||||
logger.error("大数据局名称:" + bigDateDeptName);
|
||||
logger.error("大数据局名称:{}", bigDateDeptName);
|
||||
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
|
||||
logger.error("deptDTOId:" + deptDTO.getId());
|
||||
logger.error("deptDTOId:{}", deptDTO.getId());
|
||||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
logger.error("roleDTOId:{}", roleDTO.getId());
|
||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
||||
|
||||
if (userDTO != null) {
|
||||
logger.error("审批人id:" + userDTO.getId());
|
||||
logger.error("审批人id:{}", userDTO.getId());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
assignee = userDTO.getId().toString();
|
||||
} else {
|
||||
delegateTask.setAssignee("1516728698224427010");
|
||||
logger.error("未查到该部门对应 " + roleName);
|
||||
logger.error("未查到该部门对应 {}", roleName);
|
||||
assignee = "1516728698224427010";
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,9 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
|
||||
private static Logger logger = LoggerFactory.getLogger(TDemandCommentServiceImpl.class);
|
||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
||||
|
||||
private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
|
||||
@Autowired
|
||||
private TDemandDataService tDemandDataService;
|
||||
@Autowired
|
||||
|
@ -67,7 +68,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
|||
{
|
||||
put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString());
|
||||
}
|
||||
}).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()) // 需求主题
|
||||
}).stream().map(TDemandDataDTO::getId).collect(Collectors.toList()).toArray()) // 需求主题
|
||||
.or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容
|
||||
}
|
||||
break;
|
||||
|
@ -97,7 +98,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
|||
if (tDemandCommentDTO.getDelFlag() == 0) {
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
Optional<TDemandDataDTO> tDemandDataDTO = Optional.ofNullable(tDemandDataService.get(tDemandCommentDTO.getTargetId()));
|
||||
Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator() : null));
|
||||
Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.map(TDemandDataDTO::getCreator).orElse(null)));
|
||||
String content = "【评论】" + (sysUserDTO.isPresent() ? sysUserDTO.get().getRealName() : "") + " 您发起的需求 " + tDemandDataDTO.orElse(new TDemandDataDTO()).getDemandSubject()
|
||||
+ " 有新的评论";
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
|
@ -105,7 +106,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
|||
dto.setTitle("需求评论系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator().toString() : "");
|
||||
dto.setReceiverTypeIds(tDemandDataDTO.map(demandDataDTO -> demandDataDTO.getCreator().toString()).orElse(""));
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
|
|
|
@ -34,7 +34,6 @@ public class DevelopmentGuideController {
|
|||
developmentGuideService.getDevelopmentFile(request, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
new Result<>().error(500, "文件获取失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,12 +45,12 @@ public class DevelopmentGuideController {
|
|||
@ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", dataType = "String", required = true),
|
||||
@ApiImplicitParam(name = "type", value = "能力类型", paramType = "query", dataType = "String", required = true),
|
||||
})
|
||||
public Result uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
public Result<String> uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
try {
|
||||
String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request);
|
||||
return new Result().ok(s);
|
||||
return new Result<String>().ok(s);
|
||||
}catch (Exception e) {
|
||||
return new Result().error(e.getMessage());
|
||||
return new Result<String>().error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
|
||||
@Value("${resource.devModelFilePath}")
|
||||
private String devModelFilePath;
|
||||
@Value("${resource.root_url}")
|
||||
private String root_url;
|
||||
|
||||
@Value("${server.servlet.context-path}")
|
||||
private String context_path;
|
||||
private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class);
|
||||
|
||||
|
||||
|
@ -33,14 +29,14 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
public void getDevelopmentFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
logger.info("----------------------------------获取开发指南--------------------------------------------------");
|
||||
String type = request.getParameter("type");
|
||||
String resourceId = request.getParameter("resourceId").toString();
|
||||
logger.info("读取文件类型及能力ID:" + type + ";" + resourceId);
|
||||
String resourceId = request.getParameter("resourceId");
|
||||
logger.info("读取文件类型及能力ID:{};{}", type , resourceId);
|
||||
String url = devModelFilePath + File.separator + type + File.separator + resourceId + ".md";
|
||||
String filePath = devModelFilePath + File.separator + type;
|
||||
File file = new File(url);
|
||||
//开发指南未保存过获取默认模板文件
|
||||
logger.info("文件夹路径---------------------->>>" + filePath);
|
||||
logger.info("文件--------------------------->>>" + url);
|
||||
logger.info("文件夹路径--->{}", filePath);
|
||||
logger.info("文件--->{}", url);
|
||||
|
||||
if (new File(filePath).exists()) {
|
||||
if (! file.exists()) {
|
||||
|
@ -73,7 +69,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
logger.info("----------------------------------开始上传开发指南--------------------------------------------------");
|
||||
String type = request.getParameter("type");
|
||||
String fileName = request.getParameter("fileName");
|
||||
logger.info("读取文件类型及文件名:" + type + ";" + fileName);
|
||||
logger.info("读取文件类型及文件名:{};{}", type , fileName);
|
||||
File folder = new File(devModelFilePath + File.separator + type + File.separator + fileName);
|
||||
File path = new File(devModelFilePath + File.separator + type + File.separator);
|
||||
//文件保存过删除后重新保存
|
||||
|
@ -92,7 +88,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
|
|||
return type + File.separator + fileName;
|
||||
} catch (IOException e) {
|
||||
logger.info("----------------------------------文件上传失败--------------------------------------");
|
||||
logger.info("异常描述" + e.getMessage());
|
||||
logger.info("异常描述{}", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
|||
//导入的包列表
|
||||
Set<String> imports = fieldTypeService.getPackageListByTableId(tableInfo.getId());
|
||||
//过滤为空的数据
|
||||
imports = imports.stream().filter(i -> StringUtils.isNotBlank(i)).collect(Collectors.toSet());
|
||||
imports = imports.stream().filter(StringUtils::isNotBlank).collect(Collectors.toSet());
|
||||
dataModel.put("imports", imports);
|
||||
|
||||
//基类
|
||||
|
|
|
@ -26,7 +26,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* test
|
||||
*
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package io.renren.modules.fuse.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.constant.Constant;
|
||||
import io.renren.common.page.PageData;
|
||||
|
|
|
@ -93,6 +93,8 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
|
|||
case "updateDate":
|
||||
wrapper.eq(StringUtils.isNotBlank(params.get("updateDate").toString()), "update_date", params.get("updateDate").toString());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
return wrapper;
|
||||
|
@ -161,7 +163,7 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
|
|||
Map<String, Object> dataMap = (Map<String, Object>) factory.get().getDataResource(dto);
|
||||
if (dataMap != null) {
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) dataMap.get("data");
|
||||
list.stream().forEach(map -> {
|
||||
list.forEach(map -> {
|
||||
if (map.containsKey("zyname")) {
|
||||
result.put(map.get("guid").toString(), map);
|
||||
} else {
|
||||
|
|
|
@ -188,7 +188,7 @@ public class MonitorController {
|
|||
}
|
||||
}
|
||||
|
||||
if (results.size() > 0) {
|
||||
if (!results.isEmpty()) {
|
||||
LambdaQueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<ResourceEntity>().lambda();
|
||||
queryWrapper
|
||||
.select(ResourceEntity::getId,
|
||||
|
@ -258,7 +258,7 @@ public class MonitorController {
|
|||
}
|
||||
}
|
||||
|
||||
if (results.size() > 0) {
|
||||
if (!results.isEmpty()) {
|
||||
LambdaQueryWrapper<SysDeptEntity> queryWrapper = new QueryWrapper<SysDeptEntity>().lambda();
|
||||
queryWrapper.select(SysDeptEntity::getName,SysDeptEntity::getId)
|
||||
.in(SysDeptEntity::getId, abilityIds);
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
package io.renren.modules.gateway.service;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class MonitorServiceV2 {
|
||||
|
|
|
@ -12,7 +12,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -24,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 异常日志
|
||||
*
|
||||
|
|
|
@ -12,7 +12,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -24,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 登录日志
|
||||
*
|
||||
|
|
|
@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 操作日志
|
||||
*
|
||||
|
|
|
@ -74,9 +74,7 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(SysLogOperationEntity entity) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
insert(entity);
|
||||
});
|
||||
CompletableFuture.runAsync(() -> insert(entity));
|
||||
}
|
||||
|
||||
}
|
|
@ -38,7 +38,7 @@ public class ClearLogTask implements ITask {
|
|||
logger.info("---------------------开始清理日志表数据---------------------");
|
||||
int offset = -Integer.parseInt(params);
|
||||
DateTime offsetDay = DateUtil.offsetDay(new Date(), offset);
|
||||
logger.info("日志保留开始日期-------->" + offsetDay);
|
||||
logger.info("日志保留开始日期-------->{}", offsetDay);
|
||||
sysLogOperationDao.clearLog(offsetDay);
|
||||
sysLogErrorDao.clearLog(offsetDay);
|
||||
logger.info("---------------------结束清理日志表数据---------------------");
|
||||
|
|
Loading…
Reference in New Issue