|
@@ -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;
|
|
|
+ }
|
|
|
+}
|