Commit 3f1eca86 authored by liuzicheng's avatar liuzicheng

初始化项目

parent e33e8c5b
package com.jqtx.windows.common.factory; package com.jqtx.windows.common.factory;
import com.jqtx.windows.common.exception.BizException;
import com.jqtx.windows.infrastructure.enums.ExceptionCodeEnum; import com.jqtx.windows.infrastructure.enums.ExceptionCodeEnum;
import com.jqtx.windows.web.response.JsonResult; import com.jqtx.windows.web.response.JsonResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -13,10 +14,13 @@ public abstract class AbstractCommand{ ...@@ -13,10 +14,13 @@ public abstract class AbstractCommand{
public JsonResult doAction(){ public JsonResult doAction(){
try{ try{
return this.execute(); return this.execute();
}catch (BizException e){
log.error("[处理业务异常:{}]",e.getMessage(),e);
return JsonResult.error(e.getErrorEnum());
}catch (Exception e){ }catch (Exception e){
log.error("[处理异常:{}]",e.getMessage(),e); log.error("[处理异常:{}]",e.getMessage(),e);
} finally { }finally {
RuntimeContextHolder.clear(); RuntimeContextHolder.clear();
} }
return JsonResult.error(ExceptionCodeEnum.SYSTEM_ERROR); return JsonResult.error(ExceptionCodeEnum.SYSTEM_ERROR);
} }
......
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