|
@@ -3,6 +3,7 @@ package com.bosshand.virgo.api.workark.controller;
|
|
|
import com.bosshand.virgo.api.workark.model.DifyCompletion;
|
|
|
import com.bosshand.virgo.api.workark.model.DifyType;
|
|
|
import com.bosshand.virgo.api.workark.model.DifyWorkFlow;
|
|
|
+import com.bosshand.virgo.api.workark.model.HtmlCode;
|
|
|
import com.bosshand.virgo.api.workark.service.DifyService;
|
|
|
import com.bosshand.virgo.core.response.Response;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -40,6 +41,32 @@ public class DifyController {
|
|
|
return Response.ok(difyService.getListType());
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("保存HtmlCode")
|
|
|
+ @RequestMapping(value = "/htmlCode", method = RequestMethod.POST)
|
|
|
+ public Response insertHtmlCode(@RequestBody HtmlCode htmlCode) {
|
|
|
+ difyService.saveHtmlCode(htmlCode);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("更新HtmlCode")
|
|
|
+ @RequestMapping(value = "/htmlCode/update", method = RequestMethod.PUT)
|
|
|
+ public Response updateHtmlCode(@RequestBody HtmlCode htmlCode) {
|
|
|
+ difyService.updateHtmlCode(htmlCode);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("查询HtmlCode")
|
|
|
+ @RequestMapping(value = "/htmlCode/query", method = RequestMethod.POST)
|
|
|
+ public Response getListHtmlCode(@RequestBody HtmlCode htmlCode) {
|
|
|
+ return Response.ok(difyService.getListHtmlCode(htmlCode));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("HtmlCode详情")
|
|
|
+ @RequestMapping(value = "/htmlCode/{id}", method = RequestMethod.GET)
|
|
|
+ public Response getHtmlCode(@PathVariable long id) {
|
|
|
+ return Response.ok(difyService.getHtmlCode(id));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("执行workflow")
|
|
|
@RequestMapping(value = "/workflow/run/{difyTypeId}", method = RequestMethod.POST)
|
|
|
public Response workFlowRun(@PathVariable long difyTypeId, @RequestBody Map<String, Object> inputs) {
|