Commit 3b0b39c9 authored by zhouzihao's avatar zhouzihao

fix-对报错微弱的优化

parent 595f1867
Pipeline #97 failed with stages
in 25 seconds
......@@ -7,6 +7,8 @@ import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.collectionMachine.EmailDealer;
import com.vandyo.sentry.core.config.CheckMetaConfig;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -39,7 +41,7 @@ public class Tmp {
@Scheduled(fixedRate = 1000*30)
public void test() {
// log.info("we run it {} times", ++times);
try {
Case case1 = null;
// 上线前使用这段代码
// 登录
......@@ -71,11 +73,18 @@ public class Tmp {
// banner接口
Case case2 = null;
case2 = new EmptyCase(sId,uid);
case2 = new EmptyCase(sId, uid);
case2 = new BannerListDecorator(case2);
// 获取商品列表
case2 = new MallGoodsDecorator(case2);
case2.check();
}catch (CaseException e){
Res res = new Res();
res.setKey(e.getKey());
res.setStatus(e.getStatus());
res.setSuccess(false);
CollectionMachine.post(res);
}
log.info("over!");
}
......
......@@ -4,7 +4,9 @@ import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -22,7 +24,7 @@ public class BannerListDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......@@ -32,6 +34,7 @@ public class BannerListDecorator extends CaseDecorator {
Map<String, String> paramMap = new HashMap<>();
paramMap.put("uid", oldRes.getUId());
paramMap.put("type", "1");
try {
HttpResponse response = HttpRequest.post(Signature.host + bannerListUrl)
.body(JSONUtil.parseFromMap(paramMap).toString())
.execute();
......@@ -46,6 +49,13 @@ public class BannerListDecorator extends CaseDecorator {
newRes.setSuccess(false);
}
return newRes;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(bannerListUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(bannerListUrl,ErrStatus.ErrUnknown);
}
}
} else {
oldRes.setIgnore(true);
return oldRes;
......
......@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -28,7 +29,7 @@ public class CarDetectDecorator extends CaseDecorator {
* @return
*/
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String,String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......@@ -44,22 +45,29 @@ public class CarDetectDecorator extends CaseDecorator {
Map<String,String> paramMap = new HashMap<>();
paramMap.put("cid",cid);
paramMap.put("uid",oldRes.getUId());
try {
HttpResponse response = HttpRequest.get(
Signature.host + carDetectUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(paramMap,oldRes.getSId()))
+ Signature.getUrlParamsByMap(Signature.sign(paramMap, oldRes.getSId()))
).execute();
if (response.isOk()){
if (response.isOk()) {
JSONObject jsonObject = JSONUtil.parseObj(response.body());
//todo 检测 返回值可用性
newRes.setData(carMap);
newRes.setSuccess(true);
}else {
} else {
newRes.setKey(carDetectUrl);
newRes.setStatus(Signature.matchStatus(response.getStatus()));
newRes.setSuccess(false);
}
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(carDetectUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(carDetectUrl,ErrStatus.ErrUnknown);
}
}
}
return newRes;
}else {
......
......@@ -7,6 +7,7 @@ import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -25,7 +26,7 @@ public class CarInfoDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String,String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......@@ -41,22 +42,29 @@ public class CarInfoDecorator extends CaseDecorator {
Map<String,String> paramMap = new HashMap<>();
paramMap.put("cid",cid);
paramMap.put("uid",oldRes.getUId());
try {
HttpResponse response = HttpRequest.get(
Signature.host + carInfoUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(paramMap,oldRes.getSId()))
+ Signature.getUrlParamsByMap(Signature.sign(paramMap, oldRes.getSId()))
).execute();
if (response.isOk()){
if (response.isOk()) {
JSONObject jsonObject = JSONUtil.parseObj(response.body());
//todo 检测 返回值可用性
newRes.setData(carMap);
newRes.setSuccess(true);
}else {
} else {
newRes.setKey(carInfoUrl);
newRes.setStatus(Signature.matchStatus(response.getStatus()));
newRes.setSuccess(false);
}
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(carInfoUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(carInfoUrl,ErrStatus.ErrUnknown);
}
}
}
CollectionMachine.post(newRes);
return newRes;
......
......@@ -8,6 +8,7 @@ import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -23,38 +24,47 @@ public class CarListDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String,String> data = new HashMap<>();
data.put("uid",oldRes.getUId());
HttpResponse response = HttpRequest.get(Signature.host+carListUrl+"?"
+Signature.getUrlParamsByMap(Signature.sign(data,oldRes.getSId())))
try {
HttpResponse response = HttpRequest.get(Signature.host + carListUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(data, oldRes.getSId())))
.execute();
Res<Map<String, String>> newRes = new Res<>();
newRes.setSId(oldRes.getSId());
newRes.setUId(oldRes.getUId());
if (response.isOk()){
if (response.isOk()) {
JSONObject json = JSONUtil.parseObj(response.body());
JSONArray list = json.getJSONArray("result");
if(Objects.isNull(list) || list.size() < 1){
if (Objects.isNull(list) || list.size() < 1) {
newRes.setSuccess(false);
newRes.setStatus(ErrStatus.ErrUnexpected);
}else {
Map<String,String> carMap = new HashMap<>();
} else {
Map<String, String> carMap = new HashMap<>();
JSONObject car = (JSONObject) list.get(0);
carMap.put("cid",car.getStr("cid"));
carMap.put("cid", car.getStr("cid"));
newRes.setData(carMap);
newRes.setSuccess(true);
}
}else {
} else {
newRes.setKey(carListUrl);
newRes.setStatus(Signature.matchStatus(response.getStatus()));
newRes.setSuccess(false);
}
CollectionMachine.post(newRes);
return newRes;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(carListUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(carListUrl,ErrStatus.ErrUnknown);
}
}
} else {
oldRes.setIgnore(true);
return oldRes;
......
......@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,7 +25,7 @@ public class CarLocausPointListDecorator extends CaseDecorator{
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......
......@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,7 +25,7 @@ public class CarLocusEventDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......
......@@ -7,6 +7,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -25,7 +26,7 @@ public class CarLocusPageDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......
......@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,7 +25,7 @@ public class CarLocusStatisticsDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......
......@@ -7,6 +7,7 @@ import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -25,7 +26,7 @@ public class CarStatusDecorator extends CaseDecorator{
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String,String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......@@ -42,22 +43,29 @@ public class CarStatusDecorator extends CaseDecorator{
paramMap.put("cid",cid);
paramMap.put("uid",oldRes.getUId());
paramMap.put("start",String.valueOf(System.currentTimeMillis()/1000));
try {
HttpResponse response = HttpRequest.get(
Signature.host + carStatusUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(paramMap,oldRes.getSId()))
+ Signature.getUrlParamsByMap(Signature.sign(paramMap, oldRes.getSId()))
).execute();
if (response.isOk()){
if (response.isOk()) {
JSONObject jsonObject = JSONUtil.parseObj(response.body());
//todo 检测 返回值可用性
newRes.setData(carMap);
newRes.setSuccess(true);
}else {
} else {
newRes.setKey(carStatusUrl);
newRes.setStatus(Signature.matchStatus(response.getStatus()));
newRes.setSuccess(false);
}
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(carStatusUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(carStatusUrl,ErrStatus.ErrUnknown);
}
}
}
CollectionMachine.post(newRes);
return newRes;
......
package com.vandyo.sentry.core.cases;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import java.util.Map;
public abstract class Case {
public abstract Res<Map<String,String>> check();
public abstract Res<Map<String,String>> check() throws CaseException;
}
package com.vandyo.sentry.core.cases;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import java.util.Map;
......@@ -12,7 +13,7 @@ public abstract class CaseDecorator extends Case {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
// fixme: 依赖上一个请求的数据都要对上一个是否成功进行不同的处理
// ?? 如果没有需要的值怎么处理业务逻辑呢??比如车列表内没有车?(这样要保证测试数据都有)
return this.aCase.check();
......
......@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,7 +25,7 @@ public class DayReportDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String,String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> carMap = oldRes.getData();
......@@ -46,21 +47,27 @@ public class DayReportDecorator extends CaseDecorator {
signMap.put("Data",JSONUtil.parseFromMap(paramMap).toString());
Map<String,String> signedMap = Signature.sign(signMap,oldRes.getSId());
signedMap.remove("Data");
HttpResponse response = HttpRequest.post(Signature.host+dayReportUrl+"?"+Signature.getUrlParamsByMap(signedMap))
try {
HttpResponse response = HttpRequest.post(Signature.host + dayReportUrl + "?" + Signature.getUrlParamsByMap(signedMap))
.body(JSONUtil.parseFromMap(paramMap).toString())
.execute();
if (response.isOk()){
if (response.isOk()) {
JSONObject jsonObject = JSONUtil.parseObj(response.body());
//todo 检测 返回值可用性
newRes.setData(carMap);
newRes.setSuccess(true);
}else {
} else {
newRes.setKey(dayReportUrl);
newRes.setStatus(Signature.matchStatus(response.getStatus()));
newRes.setSuccess(false);
}
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(dayReportUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(dayReportUrl,ErrStatus.ErrUnknown);
}
}
}
return newRes;
}else {
......
......@@ -5,7 +5,9 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,12 +26,13 @@ public class LoginCase extends Case {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Map<String, String> data = new HashMap<>();
// data.put("mobile", "18623414467");
data.put("mobile", mobile);
// data.put("password", "5f83f54fb34e2eed0439d37d80f5b1a3");
data.put("password", pwd);
try {
HttpResponse response = HttpRequest.post(Signature.host + loginUrl)
.body(JSONUtil.parseFromMap(data).toString()).execute();
Res<Map<String, String>> res = new Res<>();
......@@ -48,5 +51,12 @@ public class LoginCase extends Case {
}
CollectionMachine.post(res);
return res;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(loginUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(loginUrl,ErrStatus.ErrUnknown);
}
}
}
}
......@@ -5,7 +5,9 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -23,11 +25,12 @@ public class LogoutDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> data = new HashMap<>();
data.put("uid", oldRes.getUId());
try {
HttpResponse response = HttpRequest.get(Signature.host + logoutUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(data, oldRes.getSId())))
.execute();
......@@ -42,6 +45,13 @@ public class LogoutDecorator extends CaseDecorator {
}
CollectionMachine.post(newRes);
return newRes;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(logoutUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(logoutUrl,ErrStatus.ErrUnknown);
}
}
} else {
oldRes.setIgnore(true);
return oldRes;
......
......@@ -5,7 +5,9 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -23,9 +25,10 @@ public class MallGoodsDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException{
super.check();
Map<String, String> data = new HashMap<>();
try {
HttpResponse response = HttpRequest.post(Signature.host + mallGoodsUrl)
.body("{}")
.execute();
......@@ -40,5 +43,12 @@ public class MallGoodsDecorator extends CaseDecorator {
}
CollectionMachine.post(newRes);
return newRes;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(mallGoodsUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(mallGoodsUrl,ErrStatus.ErrUnknown);
}
}
}
}
......@@ -5,7 +5,9 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -23,12 +25,14 @@ public class MsgGetDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> data = new HashMap<>();
data.put("uid", oldRes.getUId());
data.put("size", String.valueOf(1));
try {
HttpResponse response = HttpRequest.get(Signature.msgHost + msgGetUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(data, oldRes.getSId())))
.execute();
......@@ -46,6 +50,13 @@ public class MsgGetDecorator extends CaseDecorator {
}
CollectionMachine.post(newRes);
return newRes;
}catch (Exception e){
if (e.getMessage().toLowerCase().contains("timeout")){
throw new CaseException(msgGetUrl, ErrStatus.ErrTimeout);
}else {
throw new CaseException(msgGetUrl,ErrStatus.ErrUnknown);
}
}
} else {
oldRes.setIgnore(true);
return oldRes;
......
......@@ -5,7 +5,9 @@ import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.vandyo.sentry.core.collectionMachine.CollectionMachine;
import com.vandyo.sentry.core.dto.ErrStatus;
import com.vandyo.sentry.core.dto.Res;
import com.vandyo.sentry.core.exceptions.CaseException;
import com.vandyo.sentry.core.tools.Signature;
import java.util.HashMap;
......@@ -24,11 +26,12 @@ public class UserInfoDecorator extends CaseDecorator {
}
@Override
public Res<Map<String, String>> check() {
public Res<Map<String, String>> check() throws CaseException {
Res<Map<String, String>> oldRes = super.check();
if (oldRes.getSuccess()) {
Map<String, String> data = new HashMap<>();
data.put("uid", oldRes.getUId());
try {
HttpResponse response = HttpRequest.get(Signature.host + UserInfoUrl + "?"
+ Signature.getUrlParamsByMap(Signature.sign(data, oldRes.getSId())))
.execute();
......@@ -46,6 +49,13 @@ public class UserInfoDecorator extends CaseDecorator {
}
CollectionMachine.post(newRes);
return newRes;
} catch (Exception e) {
if (e.getMessage().toLowerCase().contains("timeout")) {
throw new CaseException(UserInfoUrl, ErrStatus.ErrTimeout);
} else {
throw new CaseException(UserInfoUrl, ErrStatus.ErrUnknown);
}
}
} else {
oldRes.setIgnore(true);
return oldRes;
......
package com.vandyo.sentry.core.exceptions;
import com.vandyo.sentry.core.dto.ErrStatus;
public class CaseException extends Exception {
private String key;
private ErrStatus status;
public CaseException(String key, ErrStatus status) {
this.key = key;
this.status = status;
}
public CaseException(String message, String key, ErrStatus status) {
super(message);
this.key = key;
this.status = status;
}
public CaseException(String message, Throwable cause, String key, ErrStatus status) {
super(message, cause);
this.key = key;
this.status = status;
}
public CaseException(Throwable cause, String key, ErrStatus status) {
super(cause);
this.key = key;
this.status = status;
}
public CaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String key, ErrStatus status) {
super(message, cause, enableSuppression, writableStackTrace);
this.key = key;
this.status = status;
}
public String getKey() {
return key;
}
public ErrStatus getStatus() {
return status;
}
}
......@@ -13,9 +13,9 @@ public class Signature {
private static final Logger log = LoggerFactory.getLogger(Tmp.class);
// need be change to product env
// public static final String host = "http://10.100.12.42:8080";
public static final String host = "http://api.vandyo.com:80";
public static final String host = "http://api.vandyo.com:80111";
// public static final String msgHost = "http://10.100.12.42:8089";
public static final String msgHost = "http://msg.vandyo.com:80";
public static final String msgHost = "http://msg.vandyo.com:8011";
/**
* 生成签名
......
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