Przeglądaj źródła

优化接口方法

zh.sqy 9 lat temu
rodzic
commit
561e68b267

+ 3 - 4
hsweb-web-service-interface/src/main/java/org/hsweb/web/service/GenericService.java

@@ -1,7 +1,7 @@
 package org.hsweb.web.service;
 
-import org.hsweb.web.bean.param.PagerResult;
-import org.hsweb.web.bean.param.QueryParam;
+import org.hsweb.web.bean.common.PagerResult;
+import org.hsweb.web.bean.common.QueryParam;
 
 import java.util.List;
 
@@ -36,12 +36,11 @@ public interface GenericService<Po, Pk> {
     /**
      * 修改记录信息
      *
-     * @param pk   要修改对象的主键
      * @param data 要修改的对象
      * @return 影响记录数
      * @throws Exception 异常信息
      */
-    int update(Pk pk, Po data) throws Exception;
+    int update(Po data) throws Exception;
 
     /**
      * 批量修改记录

+ 3 - 3
hsweb-web-service-interface/src/main/java/org/hsweb/web/service/config/ConfigService.java

@@ -17,7 +17,7 @@ public interface ConfigService extends GenericService<Config, String> {
      * @return 配置内容
      * @throws Exception 异常信息
      */
-    String getContent(String name);
+    String getContent(String name) throws Exception;
 
     /**
      * 根据配置名称,获取配置内容,并解析为Properties格式
@@ -26,7 +26,7 @@ public interface ConfigService extends GenericService<Config, String> {
      * @return 配置内容
      * @throws Exception 异常信息
      */
-    Properties get(String name);
+    Properties get(String name) throws Exception;
 
     /**
      * 获取配置中指定key的值
@@ -36,7 +36,7 @@ public interface ConfigService extends GenericService<Config, String> {
      * @return 指定的key对应的value
      * @throws Exception
      */
-    String get(String name, String key);
+    String get(String name, String key) throws Exception;
 
     /**
      * 获取配置中指定key的值,并指定一个默认值,如果对应的key未获取到,则返回默认值