|
|
|
@ -1,10 +1,7 @@ |
|
|
|
package com.epmet.commons.tools.aspect; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.exception.ErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.exception.ValidateException; |
|
|
|
import com.epmet.commons.tools.exception.*; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.aspectj.lang.ProceedingJoinPoint; |
|
|
|
@ -156,9 +153,18 @@ public abstract class BaseRequestLogAspect { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private Result handleValidateException(ValidateException ex) { |
|
|
|
Result result=new Result(); |
|
|
|
result.setCode(ex.getCode()); |
|
|
|
result.setMsg(ex.getMsg()); |
|
|
|
Result result = null; |
|
|
|
if (Integer.valueOf(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getCode()).equals(ex.getCode())) { |
|
|
|
// 显示给客户的
|
|
|
|
result = new Result(); |
|
|
|
result.setCode(ex.getCode()); |
|
|
|
result.setMsg(ex.getMsg()); |
|
|
|
result.setInternalMsg(ex.getMsg()); |
|
|
|
} else { |
|
|
|
// 不显示给客户的
|
|
|
|
result = new Result().error(); |
|
|
|
result.setInternalMsg(ex.getMsg()); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|