From 7fc67fd0630f7169aa0e617f45e4f2761e5b8e10 Mon Sep 17 00:00:00 2001 From: Bosn Ma Date: Mon, 16 Dec 2013 10:51:42 +0800 Subject: [PATCH] dev --- README.md | 8 +++---- src/com/taobao/rigel/rap/common/RapError.java | 23 +++++++++++++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f4e1c3b..0bc82a9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ Rigel Automation Platform === - @version v0.6.0 - @author Bosn Ma - @weibo http://weibo.com/bosn - @mail bosn@outlook.com + @version v0.7.0 + @author Bosn(霍雍), wangjeaf(思竹) + @weibo http://weibo.com/bosn, http://github.com/wangjeaf + @mail bosn@outlook.com, wangjeaf@gmail.com `RAP` 是一个WEB接口管理系统,可通过结构化的接口文档生成测试数据。 diff --git a/src/com/taobao/rigel/rap/common/RapError.java b/src/com/taobao/rigel/rap/common/RapError.java index 9682ddb..20abdd5 100644 --- a/src/com/taobao/rigel/rap/common/RapError.java +++ b/src/com/taobao/rigel/rap/common/RapError.java @@ -17,9 +17,28 @@ public RapError(int code, String msg) { } private int code = 200; + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + private String msg = ""; private String result = ""; + public String getResult() { + if (result == null || result.isEmpty()) { + return "\"\""; + } + return result; + } + + public void setResult(String result) { + this.result = result; + } + public String getMsg() { return msg; } @@ -29,8 +48,8 @@ public void setMsg(String msg) { } public String toString() { - return "{\"code\":" + this.code + ", \"msg\":\"" + msg + "\", \"result\":" - + this.result + "}"; + return "{\"code\":" + getCode() + ", \"msg\":\"" + getMsg() + "\", \"result\":" + + getResult() + "}"; } }