| | |
| | | package com.yeshi.fanli.exception.taobao;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * 淘客API异常
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class TaoKeApiException extends Exception {
|
| | | // 淘宝APPkey的请求限制
|
| | | public static final int CODE_APPKEY_LIMIT = 1;
|
| | | // 无可用app
|
| | | public static final int CODE_NO_USE = 2;
|
| | | // api请求错误
|
| | | public static final int CODE_API_ERROR = 3;
|
| | | // 其他错误
|
| | | public static final int CODE_OTHER = 4;
|
| | | |
| | | // 商品支持创建红包
|
| | | public static final int CODE_TLJ_FORBIDDEN = 101;
|
| | | // 官方账户余额不足
|
| | | public static final int CODE_TLJ_NO_MONEY = 102;
|
| | | |
| | |
|
| | | private int code;
|
| | | private String msg;
|
| | |
|
| | | private Map<String, String> params;
|
| | |
|
| | | public Map<String, String> getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(Map<String, String> params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public int getCode() {
|
| | | return code;
|
| | | }
|
| | |
|
| | | public void setCode(int code) {
|
| | | this.code = code;
|
| | | }
|
| | |
|
| | | public String getMsg() {
|
| | | return msg;
|
| | | }
|
| | |
|
| | | public void setMsg(String msg) {
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | public TaoKeApiException() {
|
| | |
|
| | | }
|
| | |
|
| | | public TaoKeApiException(int code, String msg) {
|
| | | this.code = code;
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | public TaoKeApiException(int code, String msg, Map<String, String> params) {
|
| | | this.code = code;
|
| | | this.msg = msg;
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String getMessage() {
|
| | | return String.format("错误码为:%s 错误信息为:%s", code + "", msg);
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.exception.taobao; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 淘客API异常 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | public class TaoKeApiException extends Exception { |
| | | // 淘宝APPkey的请求限制 |
| | | public static final int CODE_APPKEY_LIMIT = 1; |
| | | // 无可用app |
| | | public static final int CODE_NO_USE = 2; |
| | | // api请求错误 |
| | | public static final int CODE_API_ERROR = 3; |
| | | // 其他错误 |
| | | public static final int CODE_OTHER = 4; |
| | | |
| | | |
| | | |
| | | |
| | | private int code; |
| | | private String msg; |
| | | |
| | | private Map<String, String> params; |
| | | |
| | | public Map<String, String> getParams() { |
| | | return params; |
| | | } |
| | | |
| | | public void setParams(Map<String, String> params) { |
| | | this.params = params; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public TaoKeApiException() { |
| | | |
| | | } |
| | | |
| | | public TaoKeApiException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public TaoKeApiException(int code, String msg, Map<String, String> params) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | this.params = params; |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return String.format("错误码为:%s 错误信息为:%s", code + "", msg); |
| | | } |
| | | |
| | | } |