浏览代码

新增html预览,完善部署逻辑

周浩 9 年之前
父节点
当前提交
49345aefce

+ 4 - 5
hsweb-web-service-interface/src/main/java/org/hsweb/web/service/form/DynamicFormService.java

@@ -1,7 +1,6 @@
 package org.hsweb.web.service.form;
 
-import org.hsweb.web.bean.common.PagerResult;
-import org.hsweb.web.bean.common.QueryParam;
+import org.hsweb.web.bean.common.*;
 import org.hsweb.web.bean.po.form.Form;
 
 import java.util.List;
@@ -22,11 +21,11 @@ public interface DynamicFormService {
 
     int total(String name, QueryParam param) throws Exception;
 
-    int insert(String name, Map<String, Object> data) throws Exception;
+    int insert(String name, InsertParam<Map<String, Object>> data) throws Exception;
 
-    int delete(String name, Map<String, Object> data) throws Exception;
+    int delete(String name,DeleteParam param) throws Exception;
 
-    int update(String name, Map<String, Object> data) throws Exception;
+    int update(String name, UpdateParam<Map<String, Object>> param) throws Exception;
 
     <T> T selectByPk(String name, Object pk) throws Exception;
 }

+ 14 - 3
hsweb-web-service-interface/src/main/java/org/hsweb/web/service/form/FormService.java

@@ -61,11 +61,22 @@ public interface FormService extends GenericService<Form, String> {
     void unDeploy(String formId) throws Exception;
 
     /**
-     * 创建当前已部署表单对应的html,用于前端渲染
+     * 创建当前已部署表单对应的html,用于前端渲染.
+     * 要创建的表单必须已经发布
      *
-     * @param formId 要创建html的表单ID或名称
+     * @param name 要创建html的表单名称
      * @return html字符串
      * @throws Exception
      */
-    String createHtml(String formId) throws Exception;
+    String createDeployHtml(String name) throws Exception;
+
+    /**
+     *  创建表单的html预览。
+     * @param id 表单ID
+     * @return html 字符串
+     * @throws Exception
+     */
+    String createViewHtml(String id) throws Exception;
+
+
 }