Commit 716063ae authored by qinxunjia's avatar qinxunjia

修改返回值

parent 3e4de28d
......@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@SuppressWarnings("Duplicates")
@RestController
@RequestMapping()
public class DmHubApi {
......@@ -75,6 +76,4 @@ public class DmHubApi {
log.info("**********单条发送出参*******:{}", JSONObject.toJSONString(response));
return response;
}
}
......@@ -9,7 +9,6 @@ public class DmHubSendResponse implements Serializable {
private static final long serialVersionUID = 1L;
private String code;
private String msg;
public DmHubSendResponse() {
......@@ -17,12 +16,10 @@ public class DmHubSendResponse implements Serializable {
public DmHubSendResponse(String code, String msg) {
this.code = code;
this.msg = msg;
}
public DmHubSendResponse(ResponseCode responseCode) {
this.code = responseCode.getCode();
this.msg = responseCode.getMsg();
}
public String getCode() {
......@@ -33,19 +30,11 @@ public class DmHubSendResponse implements Serializable {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
@Override
public String toString() {
return "DmHubSendResponse{" +
"code='" + code + '\'' +
", msg='" + msg + '\'' +
'}';
}
}
......@@ -10,23 +10,19 @@ public class DmHubTemplateResponse implements Serializable {
private String code;
private String msg;
public DmHubTemplateResponse() {
}
public DmHubTemplateResponse(String code, String msg) {
this.code = code;
this.msg = msg;
}
public DmHubTemplateResponse(ResponseCode responseCode) {
this.code = responseCode.getCode();
this.msg = responseCode.getMsg();
}
public String getCode() {
return code;
}
......@@ -34,12 +30,4 @@ public class DmHubTemplateResponse implements Serializable {
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
......@@ -2,7 +2,7 @@ package com.bgy.sms.config;
public enum ResponseCode {
// 系统判断错误
SUCCESS("200", "处理成功"),
SUCCESS("SUCCESS", "处理成功"),
UNKNOWN_TEMPLATE_TYPE("500", "未知模板类型"),
TEMPLATE_ALREADY_EXISTED("500", "DM Hub模板ID冲突"),
SYSTEM_ERROR("99", "系统异常:"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment