From ab2b8ef5df5edf24cf158dbcfc1a43b0629d644e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 07 七月 2020 13:02:14 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/task/AbstractHandler.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/AbstractHandler.java b/src/main/java/com/zy/asrs/task/AbstractHandler.java index 5fd205a..2e8383a 100644 --- a/src/main/java/com/zy/asrs/task/AbstractHandler.java +++ b/src/main/java/com/zy/asrs/task/AbstractHandler.java @@ -1,14 +1,17 @@ package com.zy.asrs.task; -import com.core.exception.CoolException; - /** * Created by vincent on 2020/7/4 */ -public abstract class AbstractHandler { +public abstract class AbstractHandler<T> { + + public final ReturnT<T> SUCCESS = new ReturnT<>(200, null); + public final ReturnT<T> FAIL = new ReturnT<>(500, null); + + protected abstract ReturnT<T> start(); protected void exceptionHandle(String errorMsg){ - throw new CoolException("231"); + throw new AsrsException(errorMsg); } } -- Gitblit v1.9.1