Ver Fonte

git-svn-id: https://192.168.57.71/svn/jsgkj@596 931142cf-59ea-a443-aa0e-51397b428577

xt_yuanxd há 8 anos atrás
pai
commit
ca39ee891e

+ 4 - 0
gkaqv2/trunk/modules/common/pom.xml

@@ -86,5 +86,9 @@
 			<groupId>org.springframework</groupId>
 			<artifactId>spring-jdbc</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>com.yuanxd.tools</groupId>
+			<artifactId>x-tools-utils</artifactId>
+		</dependency>
 	</dependencies>
 </project>

+ 39 - 0
gkaqv2/trunk/modules/common/src/main/java/com/xt/js/gkaq/common/BaseCtl.java

@@ -0,0 +1,39 @@
+package com.xt.js.gkaq.common;
+
+import com.yuanxd.tools.utils.WebJsonResult;
+
+/**
+ * 控制器层基类
+ * 
+ * @author 袁晓冬
+ *
+ */
+public abstract class BaseCtl {
+    /** 新增记录ID标识 */
+    public static final String BLANK_UUID = "00";
+
+    /**
+     * 返回执行成功对象
+     * 
+     * @return
+     */
+    protected WebJsonResult success() {
+        WebJsonResult jsonResult = new WebJsonResult();
+        jsonResult.setSuccess(true);
+        return jsonResult;
+    }
+
+    /**
+     * 返回执行失败对象
+     * 
+     * @param msg
+     *            失败信息
+     * @return
+     */
+    protected WebJsonResult error(String msg) {
+        WebJsonResult jsonResult = new WebJsonResult();
+        jsonResult.setSuccess(false);
+        jsonResult.setMessage(msg);
+        return jsonResult;
+    }
+}