From 28dce07428e9908b80d61b55d6d6e6512bacaaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 16 Oct 2025 19:53:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(core):=E9=87=8D=E6=9E=84=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E5=8F=82=E6=95=B0=E7=B1=BB=E5=B9=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 BaseParam 中对 CommonUtil 的依赖,直接实现 getOne 方法- 删除多个已废弃或未使用的工具类和控制器文件 - 清理无用的常量类定义 - 移除重复的业务异常和缓存实体类定义 - 优化 BaseController 中的租户 ID 获取逻辑 - 删除阿里云发送工具类及相关支付配置工具类 - 清理 WebSocket 相关 AI 控制器代码 --- .../com/gxwebsoft/common/core/Constants.class | Bin 0 -> 1076 bytes .../common/core/annotation/QueryField.class | Bin 0 -> 609 bytes .../common/core/annotation/QueryType.class | Bin 0 -> 1814 bytes .../common/core/web/SimpleBaseController.java | 52 ++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 src/main/java/com/gxwebsoft/common/core/Constants.class create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/QueryField.class create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/QueryType.class create mode 100644 src/main/java/com/gxwebsoft/common/core/web/SimpleBaseController.java diff --git a/src/main/java/com/gxwebsoft/common/core/Constants.class b/src/main/java/com/gxwebsoft/common/core/Constants.class new file mode 100644 index 0000000000000000000000000000000000000000..0a42052c01eeee768980025acd355741d6397662 GIT binary patch literal 1076 zcmZ9L+fUPA7{=d^`C0Z^Ie6KYbnDhp#JT}RZLr5hEC&?arC#w!wIKob%S zQA2_;CVGoPOh_=uy?=+R+dpA^x&wUdrp@nrp7+?VzyEFgBBI+g;HL_ztfi_ts-_x7 zO_SYXF+U6rC0Gc)pyeusc zG!5HP4aa8GAd9hhL`g`)iJ%k`8L=><`jTNxol0w!=z$nD7oDOkOLE@q2@LL?6eF>F zj9MZ)?Zq5RHzo#r)WWFFU7Y{3x$Mp@WZrzj5WDgr(nsyvrp%Ys?2oS~8jlKbWk{04 z55-WaC|gAIE+HR%5T)I<&+hW;?8;W|!;1UyWo~JKQCq<(MwM_-P`EU28MT&c`AkRA zNA}x#=GENarJtG2cSx*A!(ucc-X9Ii#SCa}_hCM?n^9vSD6_tn-I{fmF>2eOfaVeC z^&muI#Z|YKALlciX4H=2xtW>F>_%>O-hKbQ)J3BtheSCc#Da-2ArcpT)Q1nQ+9~X# zAce#o?Hr@3am^EpjSh)|7akQx5P2RSPDneCO-p~FI=X2fM`4~(K^8`eu1na2no4Q5 zop8)28chCzNqI1eBv*0q1~t{vEYu2`;~J)q=!OYzR3$35E%s-QY>J;x2;MrzvDJ%205ZQy;Je?RyDr+0u4ar$9! zC#N3)A1l+lIQ=;E6J`2IPCo^`hvQ!G8II3_`#BDPFK~Pje3|1bn3Q>cJD%6Dk7WzpZw_E^IuPyR0{wOd!NK)D;Gu}4j%`R+>IfaA=#z;-7MjSA>d zC91C}cb*9BPCag_6FnLGWZ2Zf>~mLBK%tp9x0)@teJQX%o7^G8T%HZrYy3jFi?s5_ zOtd=>H@()i+YsE=A}@=7LV*WrW1i6hqhf+GCl;|ZNmztste}8O#zhr1jyt?tWrF<# OL0Cf_>lq?!VDlRn9I%c6 literal 0 HcmV?d00001 diff --git a/src/main/java/com/gxwebsoft/common/core/annotation/QueryType.class b/src/main/java/com/gxwebsoft/common/core/annotation/QueryType.class new file mode 100644 index 0000000000000000000000000000000000000000..b3b9b844c573f0465ba8332a355e1b83e59876d1 GIT binary patch literal 1814 zcmb7^|56iI6vw}tUwgCMkOh$fQc;RE0VPndN)ssx0aCZ2uz@zBjhnbIVZz14nk zPR!3G&MPyjjFOdIcqY#@inf~b0>CgS=(7#!|ZOi z-8Ha)Z**LjNF$>mT&dMPSHnOeX&pF^om9>7_EQ_>1Gmyl8(74*I+i4E;WoAXQ$W^h z9a0^Som$J?*wb(=(Xo5E<{TZRI}E$osCxV9&L^k@oPR|ki&bh!rs`Fjiy8(yQyuTj zC3ghE26bjdASxgQ;sX5wX9b1?&Iz0sxF|3oa9Lnd;Htokz?|Aql(>ss)ikd5NW)wr z*>&5fz?1Ev<@!VFSlp_5ZoYL`b{hq!Tq9@Ye=1LQdp>jp?drbgG+PZy8B8R1=%!{W zwd3yG?r5v(VW!*si)p%6cD>c8xT{rFb??W~omS_&G)p~Or1|e#8dg&bkkTx&(h#!J z^s&;|vC_P;(x9=@e6i9Z>p((E%*}a&k{fZoYNn8zsHhYQHlTl*doIKUM=p?B`DwDLP{;16W*3`=;86}-bb-b2s< NKcGATRPd11{SS&Sa_s;B literal 0 HcmV?d00001 diff --git a/src/main/java/com/gxwebsoft/common/core/web/SimpleBaseController.java b/src/main/java/com/gxwebsoft/common/core/web/SimpleBaseController.java new file mode 100644 index 0000000..40ad05d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/SimpleBaseController.java @@ -0,0 +1,52 @@ +package com.gxwebsoft.common.core.web; + +import org.springframework.web.bind.annotation.RestController; + +/** + * 简化版控制器基类,用于代码生成 + * Created by WebSoft on 2019-10-29 15:55 + */ +@RestController +public class SimpleBaseController { + + /** + * 响应成功结果 + * + * @param data 数据内容 + * @param 数据类型 + * @return 响应结果 + */ + protected ApiResult success(T data) { + return new ApiResult(0, "操作成功", data); + } + + /** + * 响应成功结果 + * + * @return 响应结果 + */ + protected ApiResult success(String message) { + return new ApiResult(0, message, null); + } + + /** + * 响应失败结果 + * + * @param message 错误信息 + * @return 响应结果 + */ + protected ApiResult fail(String message) { + return new ApiResult(1, message, null); + } + + /** + * 响应失败结果 + * + * @param code 错误码 + * @param message 错误信息 + * @return 响应结果 + */ + protected ApiResult fail(int code, String message) { + return new ApiResult(code, message, null); + } +} \ No newline at end of file