diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverMapper.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d1e625324da1545a06d94126e7d20315084fd8f1 --- /dev/null +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverMapper.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.process.crossover; + +import neatlogic.framework.crossover.ICrossoverService; +import neatlogic.framework.process.dto.ProcessTaskAsyncCreateVo; + +public interface IProcessTaskAsyncCreateCrossoverMapper extends ICrossoverService { + + int insertProcessTaskAsyncCreate(ProcessTaskAsyncCreateVo processTaskAsyncCreateVo); +} diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java new file mode 100644 index 0000000000000000000000000000000000000000..4afe0ee9ee1f47811c45cf96f329eb09525e6afe --- /dev/null +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.process.crossover; + +import neatlogic.framework.crossover.ICrossoverService; +import neatlogic.framework.process.dto.ProcessTaskAsyncCreateVo; + +public interface IProcessTaskAsyncCreateCrossoverService extends ICrossoverService { + + /** + * 添加新的工单信息到阻塞队列 + * @param processTaskAsyncCreateVo + */ + Long addNewProcessTaskAsyncCreate(ProcessTaskAsyncCreateVo processTaskAsyncCreateVo); +} diff --git a/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java b/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java new file mode 100644 index 0000000000000000000000000000000000000000..98a6fc723bff58fc24c3f979f59747fbebf6792f --- /dev/null +++ b/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.process.dto; + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.annotation.JSONField; +import neatlogic.framework.common.dto.BaseEditorVo; +import neatlogic.framework.util.SnowflakeUtil; + +public class ProcessTaskAsyncCreateVo extends BaseEditorVo { + private Long id; + private Long processTaskId; + private String title; + private String status; + private String error; + private Integer serverId; + private JSONObject config; + @JSONField(serialize = false) + private String configStr; + + private String tenantUuid; + + public ProcessTaskAsyncCreateVo() {} + + public ProcessTaskAsyncCreateVo(JSONObject config) { + this.config = config; + } + + public Long getId() { + if (id == null) { + id = SnowflakeUtil.uniqueLong(); + } + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProcessTaskId() { + return processTaskId; + } + + public void setProcessTaskId(Long processTaskId) { + this.processTaskId = processTaskId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public Integer getServerId() { + return serverId; + } + + public void setServerId(Integer serverId) { + this.serverId = serverId; + } + + public JSONObject getConfig() { + if (config == null && configStr != null) { + config = JSONObject.parseObject(configStr); + } + return config; + } + + public void setConfig(JSONObject config) { + this.config = config; + } + + public String getConfigStr() { + if (configStr == null && config != null) { + configStr = config.toJSONString(); + } + return configStr; + } + + public void setConfigStr(String configStr) { + this.configStr = configStr; + } + + @Override + public String getTenantUuid() { + return tenantUuid; + } + + public void setTenantUuid(String tenantUuid) { + this.tenantUuid = tenantUuid; + } +}