注释完善

pull/22/head
stylefeng 2017-08-25 17:58:30 +08:00
parent 5982e45b1f
commit 1a7b87de3c
2 changed files with 15 additions and 4 deletions

View File

@ -8,10 +8,21 @@ package com.stylefeng.guns.rest.common.exception;
*/
public enum BizExceptionEnum {
AUTH_REQUEST_ERROR(400,"账号密码错误"),
/**
* token
*/
TOKEN_EXPIRED(700, "token过期"),
TOKEN_ERROR(700, "token验证失败"),
/**
*
*/
SIGN_ERROR(700, "签名验证失败"),
TOKEN_EXPIRED(700, "token过期");
/**
*
*/
AUTH_REQUEST_ERROR(400, "账号密码错误");
BizExceptionEnum(int code, String message) {
this.friendlyCode = code;

View File

@ -47,9 +47,9 @@ public class WithSignMessageConverter extends FastJsonHttpMessageConverter4 {
String encrypt = MD5Util.encrypt(json + md5KeyFromToken);
if (encrypt.equals(baseTransferEntity.getSign())) {
System.out.println("签名校验成功");
System.out.println("签名校验成功!");
} else {
System.out.println("签名校验失败");
System.out.println("签名校验失败,数据被改动过!");
throw new BussinessException(BizExceptionEnum.SIGN_ERROR);
}