From 80b6cbfc9c861469146318d0b3dd5f8b8b525b8a Mon Sep 17 00:00:00 2001 From: xiejun <xiejun@vci-tech.com> Date: 星期五, 01 十一月 2024 15:11:19 +0800 Subject: [PATCH] Revert "集成获取mdm分发通用数据格式接口集成" --- Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/api/ResultCode.java | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/api/ResultCode.java b/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/api/ResultCode.java new file mode 100644 index 0000000..894fa39 --- /dev/null +++ b/Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/api/ResultCode.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 搴勯獮 (smallchill@163.com) + */ +package org.springblade.core.tool.api; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import javax.servlet.http.HttpServletResponse; + +/** + * 涓氬姟浠g爜鏋氫妇 + * + * @author Chill + */ +@Getter +@AllArgsConstructor +public enum ResultCode implements IResultCode { + + /** + * 鎿嶄綔鎴愬姛 + */ + SUCCESS(HttpServletResponse.SC_OK, "鎿嶄綔鎴愬姛"), + + /** + * 涓氬姟寮傚父 + */ + FAILURE(HttpServletResponse.SC_BAD_REQUEST, "涓氬姟寮傚父"), + + /** + * 璇锋眰鏈巿鏉� + */ + UN_AUTHORIZED(HttpServletResponse.SC_UNAUTHORIZED, "璇锋眰鏈巿鏉�"), + + /** + * 瀹㈡埛绔姹傛湭鎺堟潈 + */ + CLIENT_UN_AUTHORIZED(HttpServletResponse.SC_UNAUTHORIZED, "瀹㈡埛绔姹傛湭鎺堟潈"), + + /** + * 404 娌℃壘鍒拌姹� + */ + NOT_FOUND(HttpServletResponse.SC_NOT_FOUND, "404 娌℃壘鍒拌姹�"), + + /** + * 娑堟伅涓嶈兘璇诲彇 + */ + MSG_NOT_READABLE(HttpServletResponse.SC_BAD_REQUEST, "娑堟伅涓嶈兘璇诲彇"), + + /** + * 涓嶆敮鎸佸綋鍓嶈姹傛柟娉� + */ + METHOD_NOT_SUPPORTED(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "涓嶆敮鎸佸綋鍓嶈姹傛柟娉�"), + + /** + * 涓嶆敮鎸佸綋鍓嶅獟浣撶被鍨� + */ + MEDIA_TYPE_NOT_SUPPORTED(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE, "涓嶆敮鎸佸綋鍓嶅獟浣撶被鍨�"), + + /** + * 璇锋眰琚嫆缁� + */ + REQ_REJECT(HttpServletResponse.SC_FORBIDDEN, "璇锋眰琚嫆缁�"), + + /** + * 鏈嶅姟鍣ㄥ紓甯� + */ + INTERNAL_SERVER_ERROR(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "鏈嶅姟鍣ㄥ紓甯�"), + + /** + * 缂哄皯蹇呰鐨勮姹傚弬鏁� + */ + PARAM_MISS(HttpServletResponse.SC_BAD_REQUEST, "缂哄皯蹇呰鐨勮姹傚弬鏁�"), + + /** + * 璇锋眰鍙傛暟绫诲瀷閿欒 + */ + PARAM_TYPE_ERROR(HttpServletResponse.SC_BAD_REQUEST, "璇锋眰鍙傛暟绫诲瀷閿欒"), + + /** + * 璇锋眰鍙傛暟缁戝畾閿欒 + */ + PARAM_BIND_ERROR(HttpServletResponse.SC_BAD_REQUEST, "璇锋眰鍙傛暟缁戝畾閿欒"), + + /** + * 鍙傛暟鏍¢獙澶辫触 + */ + PARAM_VALID_ERROR(HttpServletResponse.SC_BAD_REQUEST, "鍙傛暟鏍¢獙澶辫触"), + ; + + /** + * code缂栫爜 + */ + final int code; + /** + * 涓枃淇℃伅鎻忚堪 + */ + final String message; + +} -- Gitblit v1.9.3