Commit a549be6d authored by alex yao's avatar alex yao

feat:Ai软著

parent 97a50a03
package cn.com.poc.ai_software_copyright.dto; package cn.com.poc.ai_software_copyright.dto;
import java.util.Map;
/** /**
* @author alex.yao * @author alex.yao
* @date 2026/1/5 * @date 2026/1/5
*/ */
public class CallbackDto { public class CallbackDto {
private String taskId; private Object result;
private String status;
private String demand;
private Object ui;
private Object structure;
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDemand() {
return demand;
}
public void setDemand(String demand) {
this.demand = demand;
}
public Object getUi() {
return ui;
}
public void setUi(Object ui) {
this.ui = ui;
}
public Object getStructure() { public Object getResult() {
return structure; return result;
} }
public void setStructure(Object structure) { public void setResult(Object result) {
this.structure = structure; this.result = result;
} }
} }
...@@ -61,5 +61,7 @@ public interface BizSoftwareCopyrightRest extends BaseRest { ...@@ -61,5 +61,7 @@ public interface BizSoftwareCopyrightRest extends BaseRest {
/** /**
* 回调-生成基础文件任务 * 回调-生成基础文件任务
*/ */
void callbackGeneratedBaseDoc(@RequestParam String taskId, @RequestBody CallbackDto callbackDto); void callbackGeneratedBaseDoc(@RequestParam String taskId,
@RequestParam String type,
@RequestBody CallbackDto callbackDto);
} }
\ No newline at end of file
...@@ -111,9 +111,17 @@ public class BizSoftwareCopyrightRestImpl implements BizSoftwareCopyrightRest { ...@@ -111,9 +111,17 @@ public class BizSoftwareCopyrightRestImpl implements BizSoftwareCopyrightRest {
private RedisService redisService; private RedisService redisService;
@Override @Override
public void callbackGeneratedBaseDoc(String taskId, CallbackDto callbackDto) { public void callbackGeneratedBaseDoc(String taskId,
String type,
CallbackDto callbackDto) {
if (redisService.hasKey(taskId)) { if (redisService.hasKey(taskId)) {
redisService.set(taskId, JsonUtils.serialize(callbackDto)); if (type.equals("success")) {
redisService.set(taskId, type);
} else if (type.equals("error")) {
redisService.set(taskId, type);
} else {
redisService.set(taskId + ":" + type, JsonUtils.serialize(callbackDto));
}
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment