From 227e80b4c8bb2b7f1911b883c6fd0c9e81ba77e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=85=95=E4=B8=8B?= <484014559@qq.com> Date: Wed, 7 Aug 2024 12:30:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E3=80=81=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-admin-vue3/.env | 4 +- yudao-admin-vue3/public/favicon-old.ico | Bin 0 -> 4286 bytes yudao-admin-vue3/public/favicon.ico | Bin 4286 -> 4401 bytes .../src/api/system/operatewarning/index.ts | 47 ++++ yudao-admin-vue3/src/assets/imgs/logo-old.png | Bin 0 -> 2801 bytes yudao-admin-vue3/src/assets/imgs/logo.png | Bin 2801 -> 4401 bytes yudao-admin-vue3/src/assets/imgs/zy-logo.jpg | Bin 0 -> 4401 bytes yudao-admin-vue3/src/main.ts | 67 ++++- yudao-admin-vue3/src/views/Home/Index.vue | 162 +++++------ yudao-admin-vue3/src/views/Login/Login.vue | 2 +- .../src/views/Login/components/LoginForm.vue | 12 +- .../operatewarning/OperateWarningForm.vue | 128 +++++++++ .../src/views/system/operatewarning/index.vue | 265 ++++++++++++++++++ .../core/context/TenantContextHolder.java | 12 +- .../delivery/AppDeliverExpressController.java | 11 + .../app/order/AppTradeOrderController.java | 30 ++ .../delivery/DeliveryExpressService.java | 3 + .../delivery/DeliveryExpressServiceImpl.java | 59 ++++ .../order/TradeOrderUpdateServiceImpl.java | 28 ++ .../system/enums/ErrorCodeConstants.java | 2 + .../OperateWarningController.java | 95 +++++++ .../vo/OperateWarningPageReqVO.java | 46 +++ .../vo/OperateWarningRespVO.java | 55 ++++ .../vo/OperateWarningSaveReqVO.java | 39 +++ .../operatewarning/OperateWarningDO.java | 63 +++++ .../operatewarning/OperateWarningMapper.java | 34 +++ .../yudao/module/system/job/WarningJob.java | 146 ++++++++-- .../yudao/module/system/job/vo/CommTwoVo.java | 11 + .../yudao/module/system/job/vo/CommVo.java | 9 + .../module/system/job/vo/WarningJobVo.java | 14 + .../operatewarning/OperateWarningService.java | 55 ++++ .../OperateWarningServiceImpl.java | 74 +++++ .../src/main/resources/application-local.yaml | 3 +- 33 files changed, 1359 insertions(+), 117 deletions(-) create mode 100644 yudao-admin-vue3/public/favicon-old.ico create mode 100644 yudao-admin-vue3/src/api/system/operatewarning/index.ts create mode 100644 yudao-admin-vue3/src/assets/imgs/logo-old.png create mode 100644 yudao-admin-vue3/src/assets/imgs/zy-logo.jpg create mode 100644 yudao-admin-vue3/src/views/system/operatewarning/OperateWarningForm.vue create mode 100644 yudao-admin-vue3/src/views/system/operatewarning/index.vue create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/OperateWarningController.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningPageReqVO.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningRespVO.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningSaveReqVO.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/operatewarning/OperateWarningDO.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/operatewarning/OperateWarningMapper.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommTwoVo.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommVo.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/WarningJobVo.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningService.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningServiceImpl.java diff --git a/yudao-admin-vue3/.env b/yudao-admin-vue3/.env index 4b0f5bf..c18e52e 100644 --- a/yudao-admin-vue3/.env +++ b/yudao-admin-vue3/.env @@ -1,5 +1,5 @@ # 标题 -VITE_APP_TITLE=芋道管理系统 +VITE_APP_TITLE=众悦e家管理系统 # 项目本地运行端口号 VITE_PORT=80 @@ -20,6 +20,6 @@ VITE_APP_DOCALERT_ENABLE=true VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc # 默认账户密码 -VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码 +VITE_APP_DEFAULT_LOGIN_TENANT = 众悦e家 VITE_APP_DEFAULT_LOGIN_USERNAME = admin VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123 diff --git a/yudao-admin-vue3/public/favicon-old.ico b/yudao-admin-vue3/public/favicon-old.ico new file mode 100644 index 0000000000000000000000000000000000000000..5a7de08267811feb034bb0c54ab38ca417731aab GIT binary patch literal 4286 zcmcJTdr*|u8OGm?f3Tad7j|KHxq~xpVq;A@HfgF7QY~O)Go9%q6O&2POq*#slbPnf zwzf$$rcG^ZYDE+@N@~3q7I49+L1DRyKt#F7{U!nn%U;+^j39aYobU7VmKqZ!%ltTJ zSayHU`<%1G3`F1^k7e(&;Z`VJu(?k;=T7X%N)jqMq!dMyZeDC3iF!z6rw+67kxV&jDKh*=XMMH7BzC%0ZZgW^F*GR;m`LJ8Nxh;MnV_2 zo#Aeu7~L8}V>!_RD+rBki)NV^cA^7!L1e&FY)JDI!(TGDXW-mnR@`bh?a0EnGI=P9 zy>>$Z2m|CjGIt$Z+!8}0*)asCbu>FBggr}a!3yv^PwX`@<_>sE4e5ZqN9V>rmTRUF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FX%!C-Qg-g2Nw4TGLa#a|M&na z8A`8a_#|~g>R_v;>eddvKnJhy{!TWvy`7|kyQ1Zf^VxYMQp~8#D(_{d@N%#l^n?dP zJ>eOEc0bbbz}_Ep9p1mVhmnEN1LG{D9z=$tSMNjqf-V*rZoG@=pcx%l%Ab3d&aIih z8eE{+mp&i+1G+xk}WiODJh<6N)JDmfKzAKZd|2|w0ncYeRMI&V=sBLj;JI14`X znA}4Vday6K$fZk1`Dluh#aSF*>g2+Oy}Ud24Cm@=8E1fdP!-j*CXKqY;$HSP>1S?o zig|DLDt@t+^XG}oKAp^97_-1JPiEbH%mN~Xwb-w{LX;}_oG4M?Bhm>5iNXX9qIrUK L_}7DgzT)vecywrn literal 0 HcmV?d00001 diff --git a/yudao-admin-vue3/public/favicon.ico b/yudao-admin-vue3/public/favicon.ico index 5a7de08267811feb034bb0c54ab38ca417731aab..cb16081ee8d8f9cdd15d83884b5027180473e693 100644 GIT binary patch literal 4401 zcmV-15zg+3P)?Kr{R*gUcYs-LE30=3Y zsx(qfs$^if* ztL_5|qsCdZ)Gl}=LKv%C@pZ_L>$g*mro?!E0#2dwIEBKJ!F!W75KTp>)9`g!7jq^v zR<|Z|HzS`@E~C<144v*Z3Pl)>sOT3Q!;CKV>**sD&%7bY68aM5#E z(73aY!ShKYW-?=SD~=YMZYvlMxj5+Iy($f}hMj$!vSOTo8^`#BaK>s)c5X#O5r{l3kk>Win$` z3$^SsW~{M}?*9IkYpK4z{<+-CwLk|=Ov6sm3!_3{HoHRMW8sMD+rFAT>g-Hne7+?78ide>&4s^y2d~DZb~uZ(nv7K~wG^Uknsr`> zvp7piflL(p`c6rk<>?SqGLBjmUkFyYu6{jx_`2(sFQ;PzS$u;`{tvf{&N>Z1ZK)h$ z3c*;_LNi4oTAw6AP{{yNMy-s`=N)LiHhb6}P%fy0!G||YoY|)3aGiy-ILmIVY^hL5 zA^VhbqXerUs={MY1TZlX=RS#0QAhqt%kVyb^+EWloT*${07 z<3RLF!i3x#W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Q1Zf^VxYMQp~8#D(_{d@N%#l^n?dP zJ>eOEc0bbbz}_Ep9p1mVhmnEN1LG{D9z=$tSMNjqf-V*rZoG@=pcx%l%Ab3d&aIih z8eE{+mp&i+1G+xk}WiODJh<6N)JDmfKzAKZd|2|w0ncYeRMI&V=sBLj;JI14`X znA}4Vday6K$fZk1`Dluh#aSF*>g2+Oy}Ud24Cm@=8E1fdP!-j*CXKqY;$HSP>1S?o zig|DLDt@t+^XG}oKAp^97_-1JPiEbH%mN~Xwb-w{LX;}_oG4M?Bhm>5iNXX9qIrUK L_}7DgzT)vecywrn diff --git a/yudao-admin-vue3/src/api/system/operatewarning/index.ts b/yudao-admin-vue3/src/api/system/operatewarning/index.ts new file mode 100644 index 0000000..41b2532 --- /dev/null +++ b/yudao-admin-vue3/src/api/system/operatewarning/index.ts @@ -0,0 +1,47 @@ +import request from '@/config/axios' + +// 告警记录 VO +export interface OperateWarningVO { + id: number // 告警编号 + alarmPolicy: string // 告警策略 + monitoringObject: string // 监控对象 + triggeringCondition: string // 触发条件 + alarmFrequency: string // 告警频率 + notificationChannel: string // 通知渠道 + duration: string // 持续时间 + alarmLevel: string // 告警级别 + alarmStatus: number // 告警状态 +} + +// 告警记录 API +export const OperateWarningApi = { + // 查询告警记录分页 + getOperateWarningPage: async (params: any) => { + return await request.get({ url: `/system/operate-warning/page`, params }) + }, + + // 查询告警记录详情 + getOperateWarning: async (id: number) => { + return await request.get({ url: `/system/operate-warning/get?id=` + id }) + }, + + // 新增告警记录 + createOperateWarning: async (data: OperateWarningVO) => { + return await request.post({ url: `/system/operate-warning/create`, data }) + }, + + // 修改告警记录 + updateOperateWarning: async (data: OperateWarningVO) => { + return await request.put({ url: `/system/operate-warning/update`, data }) + }, + + // 删除告警记录 + deleteOperateWarning: async (id: number) => { + return await request.delete({ url: `/system/operate-warning/delete?id=` + id }) + }, + + // 导出告警记录 Excel + exportOperateWarning: async (params) => { + return await request.download({ url: `/system/operate-warning/export-excel`, params }) + } +} \ No newline at end of file diff --git a/yudao-admin-vue3/src/assets/imgs/logo-old.png b/yudao-admin-vue3/src/assets/imgs/logo-old.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1043f21e57ead95f41354f0f1b7d1166c07ebd GIT binary patch literal 2801 zcmVnrv1e78#*(UE<&8o^M%`WKWi8RNU9x8xIf@5EC97AK25|x~s5yR75o( z9o*XDz_-CH8W_^c)V;8@N-iqEvbh=+87UYQ=-}ftDJ>ftCg0fI+0fLztgx1flgh!z zv7)A}oufV{C8?gMP(4A&!_81MEylaTxTvhQq^Kty9jBR|U`tO!Ehal8Afu0uzm$8W zcVJaRM=c;En~|Kkk9Lhn_viH2};Ryj2A>FdqP(agurZdqGtNIY9TIY2Tq zJS;9YDjw+R#_*~rYsz{$O_w~&aA!g+{;aB{GNYp8r?WmsBeQB+V!Ohz_3Bq1+P zJuWXMDXEp0n~jo`go=-Xh_iHsiG74)UuauINlZ69H!(I#B_KR17SYDZ%)i6Mw6>y} zq=k2TeRX+$Xl`#_V{uMDLOnfULpVe@DN;Ej4Fd({>kA-q< zcxYy6d|*|DU{PgONGCBzWmhp>GA1=7CBVYL->SL9tFn2Gr>v2ouaTCugpkaAi>HNl zLp@SiNKRf%FTszUo^66gS#+0qbEsW%N=R6VXHG*lNw&Vvp|a0meVtWri8oMeZ8|GT zKN7e7mvI092sTMXK~zY`MU@3x8(9>F??i}=ggEgKZwL`2NCPYcg0{H3TXDDI&{Aj% z)OG7y*WGQmzV5sKXwQW9*>{pjGCA-4a_*g(ASP2YcS(MwT}vvn6t;?{)uWA9zdvVB zwhoog8L9Qgt8d@Pg&Km*#%P%EMA6J>G}2BIO0wHhc*}k8fa7xG)q4_|@nrc)ne0g8 z)yB(`G=va4WYEwG!6pc$k{qeLWt*G*Fp&GE@q52RHZbx_axp|+JL=d(Yyd+DV~Vmx zw1UGRN;cWqInowy>lp5P+25Eak!{|%Q71ck?d`QAj)yo1Z06IO6?6__`l7*Rv$I4# zjjb(yc&Keoc)9=HxsrzV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nldt`lB=BZ*Tc^gr7aW008_S>IVe#4}ZHb00000NkvXXu0mjf;DtOI literal 0 HcmV?d00001 diff --git a/yudao-admin-vue3/src/main.ts b/yudao-admin-vue3/src/main.ts index a0284a5..fb0d1d8 100644 --- a/yudao-admin-vue3/src/main.ts +++ b/yudao-admin-vue3/src/main.ts @@ -111,22 +111,81 @@ watchEffect(() => { // const jsonObject = JSON.parse(content); // const sValue = ref(jsonObject); // console.log("content:", JSON.parse(jsonObject)); + //磁盘告警 if(content === '"diskPull"'){ const open = () => { - ElMessageBox.alert('This is a message', 'Title', { + ElMessageBox.alert('磁盘存储已达溢值,请联系管理员查看原因', '磁盘告警', { // if you want to disable its autofocus // autofocus: false, - confirmButtonText: 'OK', + confirmButtonText: '确定', callback: (action: Action) => { ElMessage({ - type: 'info', - message: `action: ${action}`, + type: 'warning', + message: `关闭成功`, + // message: `action: ${action}`, }) }, }) } open(); } + //进程cpu利用率告警 + if(content === '"processPull"'){ + const open = () => { + ElMessageBox.alert('进程cpu利用率已达溢值,请联系管理员查看原因', '进程cpu利用率告警', { + // if you want to disable its autofocus + // autofocus: false, + confirmButtonText: '确定', + callback: (action: Action) => { + ElMessage({ + type: 'warning', + message: `关闭成功`, + // message: `action: ${action}`, + }) + }, + }) + } + open(); + } + + //系统cpu利用率告警 + if(content === '"systemPull"'){ + const open = () => { + ElMessageBox.alert('系统cpu利用率已达溢值,请联系管理员查看原因', '系统cpu利用率告警', { + // if you want to disable its autofocus + // autofocus: false, + confirmButtonText: '确定', + callback: (action: Action) => { + ElMessage({ + type: 'warning', + message: `关闭成功`, + // message: `action: ${action}`, + }) + }, + }) + } + open(); + } + + //系统内存告警 + if(content === '"HeapPull"'){ + const open = () => { + ElMessageBox.alert('系统内存已达溢值,请联系管理员查看原因', '系统内存告警', { + // if you want to disable its autofocus + // autofocus: false, + confirmButtonText: '确定', + callback: (action: Action) => { + ElMessage({ + type: 'warning', + message: `关闭成功`, + // message: `action: ${action}`, + }) + }, + }) + } + open(); + } + if (!type) { message.error('未知的消息类型:' + data.value) return diff --git a/yudao-admin-vue3/src/views/Home/Index.vue b/yudao-admin-vue3/src/views/Home/Index.vue index ea8789f..ee6b1ea 100644 --- a/yudao-admin-vue3/src/views/Home/Index.vue +++ b/yudao-admin-vue3/src/views/Home/Index.vue @@ -18,7 +18,7 @@ - + @@ -60,7 +60,7 @@ @@ -99,7 +99,7 @@ - + @@ -144,7 +144,7 @@ @@ -218,50 +218,50 @@ const getCount = async () => { let projects = reactive([]) const getProject = async () => { const data = [ - { - name: 'ruoyi-vue-pro', - icon: 'akar-icons:github-fill', - message: 'https://github.com/YunaiV/ruoyi-vue-pro', - personal: 'Spring Boot 单体架构', - time: new Date() - }, - { - name: 'yudao-ui-admin-vue3', - icon: 'logos:vue', - message: 'https://github.com/yudaocode/yudao-ui-admin-vue3', - personal: 'Vue3 + element-plus', - time: new Date() - }, - { - name: 'yudao-ui-admin-vben', - icon: 'logos:vue', - message: 'https://github.com/yudaocode/yudao-ui-admin-vben', - personal: 'Vue3 + vben(antd)', - time: new Date() - }, - { - name: 'yudao-cloud', - icon: 'akar-icons:github', - message: 'https://github.com/YunaiV/yudao-cloud', - personal: 'Spring Cloud 微服务架构', - time: new Date() - }, - { - name: 'yudao-ui-mall-uniapp', - icon: 'logos:vue', - message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp', - personal: 'Vue3 + uniapp', - time: new Date() - }, - { - name: 'yudao-ui-admin-vue2', - icon: 'logos:vue', - message: 'https://github.com/yudaocode/yudao-ui-admin-vue2', - personal: 'Vue2 + element-ui', - time: new Date() - } + // { + // name: 'ruoyi-vue-pro', + // icon: 'akar-icons:github-fill', + // message: 'https://github.com/YunaiV/ruoyi-vue-pro', + // personal: 'Spring Boot 单体架构', + // time: new Date() + // }, + // { + // name: 'yudao-ui-admin-vue3', + // icon: 'logos:vue', + // message: 'https://github.com/yudaocode/yudao-ui-admin-vue3', + // personal: 'Vue3 + element-plus', + // time: new Date() + // }, + // { + // name: 'yudao-ui-admin-vben', + // icon: 'logos:vue', + // message: 'https://github.com/yudaocode/yudao-ui-admin-vben', + // personal: 'Vue3 + vben(antd)', + // time: new Date() + // }, + // { + // name: 'yudao-cloud', + // icon: 'akar-icons:github', + // message: 'https://github.com/YunaiV/yudao-cloud', + // personal: 'Spring Cloud 微服务架构', + // time: new Date() + // }, + // { + // name: 'yudao-ui-mall-uniapp', + // icon: 'logos:vue', + // message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp', + // personal: 'Vue3 + uniapp', + // time: new Date() + // }, + // { + // name: 'yudao-ui-admin-vue2', + // icon: 'logos:vue', + // message: 'https://github.com/yudaocode/yudao-ui-admin-vue2', + // personal: 'Vue2 + element-ui', + // time: new Date() + // } ] - projects = Object.assign(projects, data) + // projects = Object.assign(projects, data) } // 获取通知公告 @@ -301,38 +301,38 @@ let shortcut = reactive([]) const getShortcut = async () => { const data = [ - { - name: 'Github', - icon: 'akar-icons:github-fill', - url: 'github.io' - }, - { - name: 'Vue', - icon: 'logos:vue', - url: 'vuejs.org' - }, - { - name: 'Vite', - icon: 'vscode-icons:file-type-vite', - url: 'https://vitejs.dev/' - }, - { - name: 'Angular', - icon: 'logos:angular-icon', - url: 'github.io' - }, - { - name: 'React', - icon: 'logos:react', - url: 'github.io' - }, - { - name: 'Webpack', - icon: 'logos:webpack', - url: 'github.io' - } + // { + // name: 'Github', + // icon: 'akar-icons:github-fill', + // url: 'github.io' + // }, + // { + // name: 'Vue', + // icon: 'logos:vue', + // url: 'vuejs.org' + // }, + // { + // name: 'Vite', + // icon: 'vscode-icons:file-type-vite', + // url: 'https://vitejs.dev/' + // }, + // { + // name: 'Angular', + // icon: 'logos:angular-icon', + // url: 'github.io' + // }, + // { + // name: 'React', + // icon: 'logos:react', + // url: 'github.io' + // }, + // { + // name: 'Webpack', + // icon: 'logos:webpack', + // url: 'github.io' + // } ] - shortcut = Object.assign(shortcut, data) + // shortcut = Object.assign(shortcut, data) } // 用户来源 diff --git a/yudao-admin-vue3/src/views/Login/Login.vue b/yudao-admin-vue3/src/views/Login/Login.vue index 5d349ce..fa9e652 100644 --- a/yudao-admin-vue3/src/views/Login/Login.vue +++ b/yudao-admin-vue3/src/views/Login/Login.vue @@ -9,7 +9,7 @@ >
- + {{ underlineToHump(appStore.getTitle) }}
diff --git a/yudao-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-admin-vue3/src/views/Login/components/LoginForm.vue index 3dbaff3..e1644b6 100644 --- a/yudao-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-admin-vue3/src/views/Login/components/LoginForm.vue @@ -82,7 +82,7 @@ mode="pop" @success="handleLogin" /> - + @@ -184,9 +184,9 @@ const loginData = reactive({ captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, loginForm: { - tenantName: import.meta.env.VITE_APP_DEFAULT_LOGIN_TENANT || '', - username: import.meta.env.VITE_APP_DEFAULT_LOGIN_USERNAME || '', - password: import.meta.env.VITE_APP_DEFAULT_LOGIN_PASSWORD || '', + tenantName: '雲頂玖號', + username: 'ydadmin', + password: '123456', captchaVerification: '', rememberMe: true // 默认记录我。如果不需要,可手动修改 } @@ -351,4 +351,4 @@ onMounted(() => { cursor: pointer; } } - + \ No newline at end of file diff --git a/yudao-admin-vue3/src/views/system/operatewarning/OperateWarningForm.vue b/yudao-admin-vue3/src/views/system/operatewarning/OperateWarningForm.vue new file mode 100644 index 0000000..31d980a --- /dev/null +++ b/yudao-admin-vue3/src/views/system/operatewarning/OperateWarningForm.vue @@ -0,0 +1,128 @@ + + \ No newline at end of file diff --git a/yudao-admin-vue3/src/views/system/operatewarning/index.vue b/yudao-admin-vue3/src/views/system/operatewarning/index.vue new file mode 100644 index 0000000..833a9a7 --- /dev/null +++ b/yudao-admin-vue3/src/views/system/operatewarning/index.vue @@ -0,0 +1,265 @@ + + + \ No newline at end of file diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java index 4e7b5e0..b5f08e9 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java @@ -36,11 +36,13 @@ public class TenantContextHolder { */ public static Long getRequiredTenantId() { Long tenantId = getTenantId(); - if (tenantId == null) { - throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:" - + DocumentEnum.TENANT.getUrl()); - } - return tenantId; +// if (tenantId == null) { +// throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:" +// + DocumentEnum.TENANT.getUrl()); +// } + +// return tenantId; + return 1L; } public static void setTenantId(Long tenantId) { diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java index 20cdef5..540f5b6 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java @@ -1,11 +1,15 @@ package cn.iocoder.yudao.module.trade.controller.app.delivery; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; import cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express.AppDeliveryExpressRespVO; import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; +import com.alibaba.fastjson.JSONObject; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; @@ -36,4 +40,11 @@ public class AppDeliverExpressController { return success(DeliveryExpressConvert.INSTANCE.convertList03(list)); } + @GetMapping("/realTimeExpressDeliveryQuery") + @Operation(summary = "实时物流查询") + public CommonResult realTimeExpressDeliveryQuery(){ + String deliveryQuery = deliveryExpressService.deliveryQuery(); + return success(deliveryQuery); + } + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java index 762b238..1b7f551 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.trade.controller.app.order; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; @@ -17,6 +19,8 @@ import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService; import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Maps; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -147,6 +151,32 @@ public class AppTradeOrderController { return success(true); } +// @PostMapping("/test") +// public void test(){ +// //获取access_token +// String accessTokenApiurl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx63c280fe3248a3e7&secret=6f270509224a7ae1296bbf1c8cb97aed"; +// HttpResponse get = HttpUtil.createGet(accessTokenApiurl).execute(); +// String body = get.body(); +// System.out.println("-----------------------------------------------"); +// JSONObject jsonObject = JSON.parseObject(body); +// System.out.println(jsonObject); +// System.out.println(body); +// String token = jsonObject.getString("access_token"); +// System.out.println(token); +// System.out.println("-----------------------------------------------"); +// +// String apiurlSec = "https://api.weixin.qq.com/wxa/sec/order/is_trade_managed?access_token="+token; +// JSONObject mapSec = new JSONObject(); +// mapSec.put("out_order_id","wx63c280fe3248a3e7"); +// mapSec.put("openid","wx63c280fe3248a3e7"); +// HttpResponse postSec = HttpUtil.createPost(apiurlSec) +//// .header("Authorization","Bearer 8e79d003102a4b5c80fd823c3c04347c") +//// .header("tenant-id","1") +// .body(mapSec.toJSONString()) +// .execute(); +// String bodySec = postSec.body(); +// } + @DeleteMapping("/cancel") @Operation(summary = "取消交易订单") @Parameter(name = "id", description = "交易订单编号") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java index c504b30..f8722fc 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java @@ -79,4 +79,7 @@ public interface DeliveryExpressService { */ List getDeliveryExpressListByStatus(Integer status); + + String deliveryQuery(); + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java index ec787af..b768357 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.trade.service.delivery; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressCreateReqVO; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressExportReqVO; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressPageReqVO; @@ -9,10 +12,13 @@ import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.Delive import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; import cn.iocoder.yudao.module.trade.dal.mysql.delivery.DeliveryExpressMapper; +import com.alibaba.fastjson.JSONObject; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -30,6 +36,39 @@ public class DeliveryExpressServiceImpl implements DeliveryExpressService { @Resource private DeliveryExpressMapper deliveryExpressMapper; + //签名, 用于验证身份, 按param + key + customer 的顺序进行MD5加密(注意加密后字符串一定要转32位大写), 不需要加上“+”号 + private String getSign(JSONObject param){ + String key = "basdjhabsdjh"; + String customer = "adjashdjahdija"; + String resultStr = param+key+customer; + + try { + // 创建MessageDigest对象,指定使用MD5算法 + MessageDigest md = MessageDigest.getInstance("MD5"); + // 将字符串转换为byte数组 + byte[] inputBytes = resultStr.getBytes(); + // 使用MD5算法更新摘要 + md.update(inputBytes); + // 计算摘要 + byte[] digest = md.digest(); + + // 将byte数组转换为十六进制字符串 + StringBuffer sb = new StringBuffer(); + for (byte b : digest) { + sb.append(String.format("%02x", b & 0xff)); + } + + // 打印MD5加密后的字符串 + System.out.println("MD5 Hash: " + sb.toString()); + return sb.toString().toUpperCase(); + + } catch (NoSuchAlgorithmException e) { + System.out.println("MD5 algorithm not available."); + e.printStackTrace(); + return null; + } + } + @Override public Long createDeliveryExpress(DeliveryExpressCreateReqVO createReqVO) { //校验编码是否唯一 @@ -111,4 +150,24 @@ public class DeliveryExpressServiceImpl implements DeliveryExpressService { return deliveryExpressMapper.selectListByStatus(status); } + @Override + public String deliveryQuery() { + //快递100 查询实时物流api接口地址 + String url = "https://poll.kuaidi100.com/poll/query.do"; + JSONObject mapSec = new JSONObject(); + mapSec.put("customer","");//授权码,请申请企业版获取 + JSONObject paramSec = new JSONObject(); + paramSec.put("com","yuantong");//查询的快递公司的编码, 一律用小写字母 + paramSec.put("num","12345678");//查询的快递单号, 单号的最小长度6个字符,最大长度32个字符 + paramSec.put("phone","13888888888");//收、寄件人的电话号码(手机和固定电话均可,只能填写一个,顺丰速运、顺丰快运必填,其他快递公司选填。如座机号码有分机号,分机号无需传入;如号码是电商虚拟号码需传入“-“后的后四位 + mapSec.put("param",paramSec); + mapSec.put("sign",getSign(paramSec));//签名, 用于验证身份, 按param + key + customer 的顺序进行MD5加密(注意加密后字符串一定要转32位大写), 不需要加上“+”号 + + HttpResponse postSec = HttpUtil.createPost(url) + .header("Content-Type","application/x-www-form-urlencoded") + .body(mapSec.toJSONString()) + .execute(); + return postSec.body(); + } + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java index 582ab3a..89c9e14 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java @@ -507,6 +507,34 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { // 收货订单 receiveOrder0(order); + + //微信官方收货 + //获取access_token + String accessTokenApiurl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx63c280fe3248a3e7&secret=6f270509224a7ae1296bbf1c8cb97aed"; + HttpResponse get = HttpUtil.createGet(accessTokenApiurl).execute(); + String body = get.body(); + System.out.println("-----------------------------------------------"); + JSONObject jsonObject = JSON.parseObject(body); + System.out.println(jsonObject); + System.out.println(body); + String token = jsonObject.getString("access_token"); + System.out.println(token); + System.out.println("-----------------------------------------------"); + + String apiurlSec = "https://api.weixin.qq.com/wxa/sec/order/is_trade_managed?access_token="+token; + JSONObject mapSec = new JSONObject(); + mapSec.put("out_order_id",order.getNo()); + SocialUserRespDTO socialUserRespDTO = socialUserApi.getSocialUserByUserId(1, order.getUserId(), 34); + mapSec.put("openid",socialUserRespDTO.getOpenid()); + HttpResponse postSec = HttpUtil.createPost(apiurlSec) +// .header("Authorization","Bearer 8e79d003102a4b5c80fd823c3c04347c") +// .header("tenant-id","1") + .body(mapSec.toJSONString()) + .execute(); + String bodySec = postSec.body(); + System.out.println("====================="); + System.out.println(bodySec); + System.out.println("====================="); } @Override diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java index 585308d..90b1961 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java @@ -160,4 +160,6 @@ public interface ErrorCodeConstants { // ========== 站内信发送 1-002-028-000 ========== ErrorCode NOTIFY_SEND_TEMPLATE_PARAM_MISS = new ErrorCode(1_002_028_000, "模板参数({})缺失"); + ErrorCode OPERATE_WARNING_NOT_EXISTS = new ErrorCode(1_002_028_000, "告警记录不存在"); + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/OperateWarningController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/OperateWarningController.java new file mode 100644 index 0000000..018df7d --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/OperateWarningController.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.system.controller.admin.operatewarning; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo.*; +import cn.iocoder.yudao.module.system.dal.dataobject.operatewarning.OperateWarningDO; +import cn.iocoder.yudao.module.system.service.operatewarning.OperateWarningService; + +@Tag(name = "管理后台 - 告警记录") +@RestController +@RequestMapping("/system/operate-warning") +@Validated +public class OperateWarningController { + + @Resource + private OperateWarningService operateWarningService; + + @PostMapping("/create") + @Operation(summary = "创建告警记录") + @PreAuthorize("@ss.hasPermission('system:operate-warning:create')") + public CommonResult createOperateWarning(@Valid @RequestBody OperateWarningSaveReqVO createReqVO) { + return success(operateWarningService.createOperateWarning(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新告警记录") + @PreAuthorize("@ss.hasPermission('system:operate-warning:update')") + public CommonResult updateOperateWarning(@Valid @RequestBody OperateWarningSaveReqVO updateReqVO) { + operateWarningService.updateOperateWarning(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除告警记录") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('system:operate-warning:delete')") + public CommonResult deleteOperateWarning(@RequestParam("id") Long id) { + operateWarningService.deleteOperateWarning(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得告警记录") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('system:operate-warning:query')") + public CommonResult getOperateWarning(@RequestParam("id") Long id) { + OperateWarningDO operateWarning = operateWarningService.getOperateWarning(id); + return success(BeanUtils.toBean(operateWarning, OperateWarningRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得告警记录分页") + @PreAuthorize("@ss.hasPermission('system:operate-warning:query')") + public CommonResult> getOperateWarningPage(@Valid OperateWarningPageReqVO pageReqVO) { + PageResult pageResult = operateWarningService.getOperateWarningPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OperateWarningRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出告警记录 Excel") + @PreAuthorize("@ss.hasPermission('system:operate-warning:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOperateWarningExcel(@Valid OperateWarningPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = operateWarningService.getOperateWarningPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "告警记录.xls", "数据", OperateWarningRespVO.class, + BeanUtils.toBean(list, OperateWarningRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningPageReqVO.java new file mode 100644 index 0000000..0271cc5 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningPageReqVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 告警记录分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class OperateWarningPageReqVO extends PageParam { + + @Schema(description = "发生时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "告警策略") + private String alarmPolicy; + + @Schema(description = "监控对象") + private String monitoringObject; + + @Schema(description = "触发条件") + private String triggeringCondition; + + @Schema(description = "告警频率") + private String alarmFrequency; + + @Schema(description = "通知渠道") + private String notificationChannel; + + @Schema(description = "持续时间") + private String duration; + + @Schema(description = "告警级别") + private String alarmLevel; + + @Schema(description = "告警状态", example = "2") + private Integer alarmStatus; + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningRespVO.java new file mode 100644 index 0000000..4ebd118 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningRespVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 告警记录 Response VO") +@Data +@ExcelIgnoreUnannotated +public class OperateWarningRespVO { + + @Schema(description = "告警编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19817") + @ExcelProperty("告警编号") + private Long id; + + @Schema(description = "发生时间") + @ExcelProperty("发生时间") + private LocalDateTime createTime; + + @Schema(description = "告警策略") + @ExcelProperty("告警策略") + private String alarmPolicy; + + @Schema(description = "监控对象") + @ExcelProperty("监控对象") + private String monitoringObject; + + @Schema(description = "触发条件") + @ExcelProperty("触发条件") + private String triggeringCondition; + + @Schema(description = "告警频率") + @ExcelProperty("告警频率") + private String alarmFrequency; + + @Schema(description = "通知渠道") + @ExcelProperty("通知渠道") + private String notificationChannel; + + @Schema(description = "持续时间") + @ExcelProperty("持续时间") + private String duration; + + @Schema(description = "告警级别") + @ExcelProperty("告警级别") + private String alarmLevel; + + @Schema(description = "告警状态", example = "2") + @ExcelProperty("告警状态") + private Integer alarmStatus; + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningSaveReqVO.java new file mode 100644 index 0000000..a576bf9 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/operatewarning/vo/OperateWarningSaveReqVO.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 告警记录新增/修改 Request VO") +@Data +public class OperateWarningSaveReqVO { + + @Schema(description = "告警编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19817") + private Long id; + + @Schema(description = "告警策略") + private String alarmPolicy; + + @Schema(description = "监控对象") + private String monitoringObject; + + @Schema(description = "触发条件") + private String triggeringCondition; + + @Schema(description = "告警频率") + private String alarmFrequency; + + @Schema(description = "通知渠道") + private String notificationChannel; + + @Schema(description = "持续时间") + private String duration; + + @Schema(description = "告警级别") + private String alarmLevel; + + @Schema(description = "告警状态", example = "2") + private Integer alarmStatus; + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/operatewarning/OperateWarningDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/operatewarning/OperateWarningDO.java new file mode 100644 index 0000000..5e05fae --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/operatewarning/OperateWarningDO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.system.dal.dataobject.operatewarning; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 告警记录 DO + * + * @author 管理员 + */ +@TableName("system_operate_warning") +@KeySequence("system_operate_warning_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class OperateWarningDO extends BaseDO { + + /** + * 告警编号 + */ + @TableId + private Long id; + /** + * 告警策略 + */ + private String alarmPolicy; + /** + * 监控对象 + */ + private String monitoringObject; + /** + * 触发条件 + */ + private String triggeringCondition; + /** + * 告警频率 + */ + private String alarmFrequency; + /** + * 通知渠道 + */ + private String notificationChannel; + /** + * 持续时间 + */ + private String duration; + /** + * 告警级别 + */ + private String alarmLevel; + /** + * 告警状态 + */ + private Integer alarmStatus; + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/operatewarning/OperateWarningMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/operatewarning/OperateWarningMapper.java new file mode 100644 index 0000000..4713a3f --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/operatewarning/OperateWarningMapper.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.system.dal.mysql.operatewarning; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.system.dal.dataobject.operatewarning.OperateWarningDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo.*; + +/** + * 告警记录 Mapper + * + * @author 管理员 + */ +@Mapper +public interface OperateWarningMapper extends BaseMapperX { + + default PageResult selectPage(OperateWarningPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .betweenIfPresent(OperateWarningDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OperateWarningDO::getAlarmPolicy, reqVO.getAlarmPolicy()) + .eqIfPresent(OperateWarningDO::getMonitoringObject, reqVO.getMonitoringObject()) + .eqIfPresent(OperateWarningDO::getTriggeringCondition, reqVO.getTriggeringCondition()) + .eqIfPresent(OperateWarningDO::getAlarmFrequency, reqVO.getAlarmFrequency()) + .eqIfPresent(OperateWarningDO::getNotificationChannel, reqVO.getNotificationChannel()) + .eqIfPresent(OperateWarningDO::getDuration, reqVO.getDuration()) + .eqIfPresent(OperateWarningDO::getAlarmLevel, reqVO.getAlarmLevel()) + .eqIfPresent(OperateWarningDO::getAlarmStatus, reqVO.getAlarmStatus()) + .orderByDesc(OperateWarningDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java index b28e873..2ea06ca 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java @@ -1,19 +1,39 @@ package cn.iocoder.yudao.module.system.job; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; import cn.iocoder.yudao.module.infra.api.websocket.WebSocketSenderApi; import cn.iocoder.yudao.module.system.api.dict.DictDataApi; import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; +import cn.iocoder.yudao.module.system.dal.dataobject.operatewarning.OperateWarningDO; +import cn.iocoder.yudao.module.system.dal.mysql.operatewarning.OperateWarningMapper; +import cn.iocoder.yudao.module.system.job.vo.CommVo; +import cn.iocoder.yudao.module.system.job.vo.WarningJobVo; +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; import java.nio.file.FileStore; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; + +/** + * 1:磁盘告警规则 + * 2:内存告警规则 + * 3:进程cpu利用率告警规则 + * 4:系统cpu利用率告警规则 + * + * package cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder.getRequiredTenantId; + */ + @Component @Slf4j public class WarningJob implements JobHandler { @@ -21,40 +41,132 @@ public class WarningJob implements JobHandler { private WebSocketSenderApi webSocketSenderApi; @Resource private DictDataApi dataApi; + @Resource + private OperateWarningMapper operateWarningMapper; @Override public String execute(String param) throws Exception { + DictDataRespDTO configCountDo = null; + DictDataRespDTO configCountHeapDo = null; + DictDataRespDTO configCountProcessCPUDo = null; + DictDataRespDTO configCountSystemCPUDo = null; + List warningRule = dataApi.getDictDataList("warning_rule"); + for (DictDataRespDTO dictDataRespDTO : warningRule) { + if ("1".equals(dictDataRespDTO.getValue())){ + configCountDo = dictDataRespDTO; + } + if ("2".equals(dictDataRespDTO.getValue())){ + configCountHeapDo = dictDataRespDTO; + } + if ("3".equals(dictDataRespDTO.getValue())){ + configCountProcessCPUDo = dictDataRespDTO; + } + if ("4".equals(dictDataRespDTO.getValue())){ + configCountSystemCPUDo = dictDataRespDTO; + } + } + /** + * 磁盘告警逻辑 + */ try { // 获取文件系统根目录的 FileStore FileStore fileStore = Files.getFileStore(Paths.get("/")); - // 获取总容量 long totalSpace = fileStore.getTotalSpace(); -// System.out.println("Total space: " + totalSpace / 1024 + " kiB"); - // 获取未使用的容量 long usableSpace = fileStore.getUsableSpace(); -// System.out.println("Usable space: " + usableSpace / 1024 + " kiB"); - // 获取已使用的容量 long usedSpace = totalSpace - usableSpace; -// System.out.println("Used space: " + usedSpace / 1024 + " kiB"); - double totalSpacePercentage = ((double) usedSpace / totalSpace) * 100; - DictDataRespDTO configCountDo = null; - List warningRule = dataApi.getDictDataList("warning_rule"); - for (DictDataRespDTO dictDataRespDTO : warningRule) { - if ("磁盘告警规则".equals(dictDataRespDTO.getLabel())){ - configCountDo = dictDataRespDTO; - } - } - if (configCountDo != null && totalSpacePercentage > Integer.parseInt(configCountDo.getValue())){ + if (configCountDo != null && totalSpacePercentage > Integer.parseInt(configCountDo.getLabel())){ webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), 1L, "1", "diskPull"); + OperateWarningDO spaceWarningDO = new OperateWarningDO(); + spaceWarningDO.setAlarmPolicy("磁盘告警策略"); + spaceWarningDO.setMonitoringObject("磁盘"); + spaceWarningDO.setTriggeringCondition("当磁盘占用率达到"+Double.parseDouble(configCountProcessCPUDo.getLabel())*100+"%"); + operateWarningMapper.insert(spaceWarningDO); } } catch (Exception e) { e.printStackTrace(); } -// if () -// webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), 1L, "1", "true"); + /** + * 进程cpu利用率告警逻辑 + */ + HttpResponse response = HttpUtil.createGet("http://localhost:6127/admin/instances/0dea41b65450/actuator/metrics/process.cpu.usage") + .header("Accept","application/json") + .execute(); + String body = response.body(); + // 使用 Jackson 将 JSON 字符串转换为对象 + ObjectMapper mapper = new ObjectMapper(); + WarningJobVo memoryMetrics = mapper.readValue(body, WarningJobVo.class); + for (CommVo measurement : memoryMetrics.getMeasurements()) { + if (Double.parseDouble(measurement.getValue()) > Double.parseDouble(configCountProcessCPUDo.getLabel())){ + webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), 1L, "1", "processPull"); + OperateWarningDO processCPUWarningDO = new OperateWarningDO(); + processCPUWarningDO.setAlarmPolicy("进程cpu利用率告警策略"); + processCPUWarningDO.setMonitoringObject("进程cpu"); + processCPUWarningDO.setTriggeringCondition("当进程cpu利用率达到"+Double.parseDouble(configCountProcessCPUDo.getLabel())*100+"%"); + operateWarningMapper.insert(processCPUWarningDO); + return null; + } + } + + /** + * 系统cpu利用率告警逻辑 + */ + HttpResponse systemCpuResponse = HttpUtil.createGet("http://localhost:6127/admin/instances/0dea41b65450/actuator/metrics/system.cpu.usage") + .header("Accept","application/json") + .execute(); + String systemCpuBody = systemCpuResponse.body(); + // 使用 Jackson 将 JSON 字符串转换为对象 + ObjectMapper systemCpuMapper = new ObjectMapper(); + WarningJobVo systemCpuMemoryMetrics = systemCpuMapper.readValue(systemCpuBody, WarningJobVo.class); + for (CommVo measurement : systemCpuMemoryMetrics.getMeasurements()) { + if (Double.parseDouble(measurement.getValue()) > Double.parseDouble(configCountSystemCPUDo.getLabel())){ + webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), 1L, "1", "systemPull"); + OperateWarningDO systemCpuWarningDO = new OperateWarningDO(); + systemCpuWarningDO.setAlarmPolicy("系统cpu利用率告警策略"); + systemCpuWarningDO.setMonitoringObject("系统cpu"); + systemCpuWarningDO.setTriggeringCondition("当系统cpu利用率达到"+Double.parseDouble(configCountSystemCPUDo.getLabel())*100+"%"); + operateWarningMapper.insert(systemCpuWarningDO); + return null; + } + } + + /** + * 内存告警逻辑 + */ + try { + Process proc = Runtime.getRuntime().exec("systeminfo"); + BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream(), "GBK")); // 指定正确的字符编码,如GBK或UTF-8 + String line; + String totalMemory = null; + String freeMemory = null; + while ((line = reader.readLine()) != null) { + if (line.contains("物理内存总量")) { + totalMemory = line.substring(7, line.length() - 2).replace(",","").trim(); + } + if (line.contains("可用的物理内存")) { + freeMemory = line.substring(8, line.length() - 2).replace(",","").trim(); + } + } + reader.close(); + //剩余内存占比 + double memory = Double.parseDouble(freeMemory) / Double.parseDouble(totalMemory); + //已使用的内存占比 + double useMemory = 1 - memory; + if (useMemory > Double.parseDouble(configCountHeapDo.getLabel())){ + webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), 1L, "1", "HeapPull"); + OperateWarningDO heapWarningDO = new OperateWarningDO(); + heapWarningDO.setAlarmPolicy("物理内存告警策略"); + heapWarningDO.setMonitoringObject("物理内存"); + heapWarningDO.setTriggeringCondition("当内存占用率达到"+Double.parseDouble(configCountHeapDo.getLabel())*100+"%"); + operateWarningMapper.insert(heapWarningDO); + return null; + } + } catch (IOException e) { + e.printStackTrace(); + } + return null; } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommTwoVo.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommTwoVo.java new file mode 100644 index 0000000..a2cfbac --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommTwoVo.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.system.job.vo; + +import lombok.Data; + +import java.util.List; + +@Data +public class CommTwoVo { + private String tag; + private List values; +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommVo.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommVo.java new file mode 100644 index 0000000..ff29d80 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/CommVo.java @@ -0,0 +1,9 @@ +package cn.iocoder.yudao.module.system.job.vo; + +import lombok.Data; + +@Data +public class CommVo { + private String statistic; + private String value; +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/WarningJobVo.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/WarningJobVo.java new file mode 100644 index 0000000..84d7251 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/vo/WarningJobVo.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.system.job.vo; + +import lombok.Data; + +import java.util.List; + +@Data +public class WarningJobVo { + private String name; + private String description; + private String baseUnit; + private List measurements; + private List availableTags; +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningService.java new file mode 100644 index 0000000..512a6ae --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningService.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.system.service.operatewarning; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo.*; +import cn.iocoder.yudao.module.system.dal.dataobject.operatewarning.OperateWarningDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 告警记录 Service 接口 + * + * @author 管理员 + */ +public interface OperateWarningService { + + /** + * 创建告警记录 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createOperateWarning(@Valid OperateWarningSaveReqVO createReqVO); + + /** + * 更新告警记录 + * + * @param updateReqVO 更新信息 + */ + void updateOperateWarning(@Valid OperateWarningSaveReqVO updateReqVO); + + /** + * 删除告警记录 + * + * @param id 编号 + */ + void deleteOperateWarning(Long id); + + /** + * 获得告警记录 + * + * @param id 编号 + * @return 告警记录 + */ + OperateWarningDO getOperateWarning(Long id); + + /** + * 获得告警记录分页 + * + * @param pageReqVO 分页查询 + * @return 告警记录分页 + */ + PageResult getOperateWarningPage(OperateWarningPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningServiceImpl.java new file mode 100644 index 0000000..58b1109 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/operatewarning/OperateWarningServiceImpl.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.system.service.operatewarning; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.system.controller.admin.operatewarning.vo.*; +import cn.iocoder.yudao.module.system.dal.dataobject.operatewarning.OperateWarningDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.system.dal.mysql.operatewarning.OperateWarningMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; + +/** + * 告警记录 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class OperateWarningServiceImpl implements OperateWarningService { + + @Resource + private OperateWarningMapper operateWarningMapper; + + @Override + public Long createOperateWarning(OperateWarningSaveReqVO createReqVO) { + // 插入 + OperateWarningDO operateWarning = BeanUtils.toBean(createReqVO, OperateWarningDO.class); + operateWarningMapper.insert(operateWarning); + // 返回 + return operateWarning.getId(); + } + + @Override + public void updateOperateWarning(OperateWarningSaveReqVO updateReqVO) { + // 校验存在 + validateOperateWarningExists(updateReqVO.getId()); + // 更新 + OperateWarningDO updateObj = BeanUtils.toBean(updateReqVO, OperateWarningDO.class); + operateWarningMapper.updateById(updateObj); + } + + @Override + public void deleteOperateWarning(Long id) { + // 校验存在 + validateOperateWarningExists(id); + // 删除 + operateWarningMapper.deleteById(id); + } + + private void validateOperateWarningExists(Long id) { + if (operateWarningMapper.selectById(id) == null) { + throw exception(OPERATE_WARNING_NOT_EXISTS); + } + } + + @Override + public OperateWarningDO getOperateWarning(Long id) { + return operateWarningMapper.selectById(id); + } + + @Override + public PageResult getOperateWarningPage(OperateWarningPageReqVO pageReqVO) { + return operateWarningMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 98a4663..a76b565 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -73,7 +73,8 @@ spring: # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 124.70.1.134 # 地址 + host: 120.46.37.243 # 地址 +# host: 124.70.1.134 # 地址 # host: 127.0.0.1 # 地址 port: 6379 # 端口 database: 0 # 数据库索引 -- 2.45.2