Przeglądaj źródła

feat:添加短信模块。将endpoint改为channel

bianlz 1 tydzień temu
rodzic
commit
4c548a24c8
46 zmienionych plików z 2273 dodań i 106 usunięć
  1. 16 0
      .editorconfig
  2. 8 0
      .eslintignore
  3. 7 0
      .eslintrc.js
  4. 41 0
      .gitignore
  5. 7 0
      .husky/commit-msg
  6. 4 0
      .husky/pre-commit
  7. 22 0
      .prettierignore
  8. 21 0
      .prettierrc.js
  9. 44 8
      config/routes.ts
  10. 19 19
      mock/egress.ts
  11. 358 0
      mock/message.ts
  12. 2 2
      src/components/HttpUtil/path.tsx
  13. 8 1
      src/locales/zh-CN/menu.ts
  14. 3 3
      src/pages/egress/api/data.d.ts
  15. 3 3
      src/pages/egress/api/table/component/UpsertApiModalForm.tsx
  16. 0 0
      src/pages/egress/channel/create/component/BasicInfoStepFormPage.tsx
  17. 0 0
      src/pages/egress/channel/create/component/BizInfoStepFormPage.tsx
  18. 0 0
      src/pages/egress/channel/create/component/ConfigInfoStepFormPage.tsx
  19. 0 0
      src/pages/egress/channel/create/component/http/body.tsx
  20. 0 0
      src/pages/egress/channel/create/component/http/data.d.ts
  21. 0 0
      src/pages/egress/channel/create/component/http/header.tsx
  22. 0 0
      src/pages/egress/channel/create/component/http/index.tsx
  23. 0 0
      src/pages/egress/channel/create/component/http/path.tsx
  24. 0 0
      src/pages/egress/channel/create/component/http/query.tsx
  25. 9 9
      src/pages/egress/channel/create/index.tsx
  26. 1 1
      src/pages/egress/channel/data.d.ts
  27. 4 4
      src/pages/egress/channel/table/component/CreateChannelModal.tsx
  28. 13 13
      src/pages/egress/channel/table/index.tsx
  29. 36 34
      src/pages/egress/loan/integration/index.tsx
  30. 127 0
      src/pages/message/sms/channel/table/component/UpsertSmsChannelModalForm.tsx
  31. 155 0
      src/pages/message/sms/channel/table/index.tsx
  32. 57 0
      src/pages/message/sms/data.d.ts
  33. 11 0
      src/pages/message/sms/index.tsx
  34. 52 0
      src/pages/message/sms/platform/table/component/UpsertSmsPlatformModalForm.tsx
  35. 151 0
      src/pages/message/sms/platform/table/index.tsx
  36. 161 0
      src/pages/message/sms/service/table/component/UpsertSmsServiceModalForm.tsx
  37. 155 0
      src/pages/message/sms/service/table/index.tsx
  38. 70 0
      src/pages/message/sms/signature/table/component/UpsertSmsSignatureModalForm.tsx
  39. 155 0
      src/pages/message/sms/signature/table/index.tsx
  40. 68 0
      src/pages/message/sms/template/table/component/UpsertSmsTemplateModalForm.tsx
  41. 155 0
      src/pages/message/sms/template/table/index.tsx
  42. 2 1
      src/requestErrorConfig.ts
  43. 4 4
      src/services/op-admin/gateway/egress.ts
  44. 4 4
      src/services/op-admin/gateway/typings.d.ts
  45. 166 0
      src/services/op-admin/message/sms.ts
  46. 154 0
      src/services/op-admin/message/typings.d.ts

+ 16 - 0
.editorconfig

@@ -0,0 +1,16 @@
+# http://editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[Makefile]
+indent_style = tab

+ 8 - 0
.eslintignore

@@ -0,0 +1,8 @@
+/lambda/
+/scripts
+/config
+.history
+public
+dist
+.umi
+mock

+ 7 - 0
.eslintrc.js

@@ -0,0 +1,7 @@
+module.exports = {
+  extends: [require.resolve('@umijs/lint/dist/config/eslint')],
+  globals: {
+    page: true,
+    REACT_APP_ENV: true,
+  },
+};

+ 41 - 0
.gitignore

@@ -0,0 +1,41 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+**/node_modules
+# roadhog-api-doc ignore
+/src/utils/request-temp.js
+_roadhog-api-doc
+
+# production
+/dist
+
+# misc
+.DS_Store
+npm-debug.log*
+yarn-error.log
+
+/coverage
+.idea
+yarn.lock
+package-lock.json
+*bak
+.vscode
+
+
+# visual studio code
+.history
+*.log
+functions/*
+.temp/**
+
+# umi
+.umi
+.umi-production
+.umi-test
+
+# screenshot
+screenshot
+.firebase
+.eslintcache
+
+build

+ 7 - 0
.husky/commit-msg

@@ -0,0 +1,7 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+# Export Git hook params
+export GIT_PARAMS=$*
+
+npx --no-install fabric verify-commit

+ 4 - 0
.husky/pre-commit

@@ -0,0 +1,4 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+npx --no-install lint-staged

+ 22 - 0
.prettierignore

@@ -0,0 +1,22 @@
+**/*.svg
+.umi
+.umi-production
+/dist
+.dockerignore
+.DS_Store
+.eslintignore
+*.png
+*.toml
+docker
+.editorconfig
+Dockerfile*
+.gitignore
+.prettierignore
+LICENSE
+.eslintcache
+*.lock
+yarn-error.log
+.history
+CNAME
+/build
+/public

+ 21 - 0
.prettierrc.js

@@ -0,0 +1,21 @@
+module.exports = {
+  singleQuote: true,
+  trailingComma: 'all',
+  printWidth: 100,
+  proseWrap: 'never',
+  endOfLine: 'lf',
+  overrides: [
+    {
+      files: '.prettierrc',
+      options: {
+        parser: 'json',
+      },
+    },
+    {
+      files: 'document.ejs',
+      options: {
+        parser: 'html',
+      },
+    },
+  ],
+};

+ 44 - 8
config/routes.ts

@@ -63,28 +63,27 @@ export default [
     layout: false,
     component: './404',
   },
-
   {
-    path: '/ui',
+    path: '/ui/gateway',
     name: 'gateway',
     routes: [
       {
         name: 'egress',
-        path: '/ui/egress',
+        path: '/ui/gateway/egress',
         routes: [
           {
             name: 'api',
-            path: '/ui/egress/api',
+            path: '/ui/gateway/egress/api',
             component: './egress/api/table',
           },
           {
-            name: 'endpoint',
-            path: '/ui/egress/endpoint',
-            component: './egress/endpoint/table',
+            name: 'channel',
+            path: '/ui/gateway/egress/channel',
+            component: './egress/channel/table',
           },
           {
             name: 'api-loan-integration',
-            path: '/ui/egress/loan-integration',
+            path: '/ui/gateway/egress/loan-integration',
             component: './egress/loan/integration',
             hideInMenu: true,
           },
@@ -92,5 +91,42 @@ export default [
       },
     ],
   },
+  {
+    name: 'message',
+    path: '/ui/message',
+    routes: [
+      {
+        name: 'sms',
+        path: '/ui/message/sms',
+        routes: [
+          {
+            name: 'sms-signature',
+            path: '/ui/message/sms/signature',
+            component: './message/sms/signature/table',
+          },
+          {
+            name: 'sms-template',
+            path: '/ui/message/sms/template',
+            component: './message/sms/template/table',
+          },
+          {
+            name: 'sms-service',
+            path: '/ui/message/sms/service',
+            component: './message/sms/service/table',
+          },
+          {
+            name: 'sms-platform',
+            path: '/ui/message/sms/platform',
+            component: './message/sms/platform/table',
+          },
+          {
+            name: 'sms-channel',
+            path: '/ui/message/sms/channel',
+            component: './message/sms/channel/table',
+          },
+        ]
+      }
+    ]
+  }
 
 ];

+ 19 - 19
mock/egress.ts

@@ -94,7 +94,7 @@ const loanApiIntegrationRespData = {
 }
 
 /** 分页查询接出API通道响应数据 */
-const pageQueryEgressApiEndpointRespData = {
+const pageQueryEgressApiChannelRespData = {
     "success": true,
     "errCode": null,
     "errMessage": null,
@@ -102,7 +102,7 @@ const pageQueryEgressApiEndpointRespData = {
         {
             "id": '1848565642249170945',
             "apiName": "xxxxx-xx",
-            "endpointName": "xxxxx-xx-撞库",
+            "channelName": "xxxxx-xx-撞库",
             "integrationMode": "customize",
             "apiType": "product",
             "createUsername": "admin",
@@ -112,7 +112,7 @@ const pageQueryEgressApiEndpointRespData = {
         }, {
             "id": '1848565642249170946',
             "apiName": "yyyyy-yy",
-            "endpointName": "xxxxx-xx-申请",
+            "channelName": "xxxxx-xx-申请",
             "integrationMode": "guide",
             "apiType": "loan",
             "createUsername": "admin",
@@ -125,7 +125,7 @@ const pageQueryEgressApiEndpointRespData = {
 
 
 /** 查询撞库API通道响应数据 */
-const queryCiApiEndpointRespData = {
+const queryCiApiChannelRespData = {
     "success": true,
     "data": [
         {
@@ -133,7 +133,7 @@ const queryCiApiEndpointRespData = {
             "apiId": "1853241164564557825",
             "apiType": "loan",
             "apiName": "测试001",
-            "endpointName": "测试001-撞库",
+            "channelName": "测试001-撞库",
             "integrationMode": "customize",
             "gmtCreate": "2024-11-04 16:48:33",
             "gmtModify": "2024-11-04 16:48:33",
@@ -144,7 +144,7 @@ const queryCiApiEndpointRespData = {
 }
 
 /** 查询API通道响应数据 */
-const queryApiEndpointRespData = {
+const queryApiChannelRespData = {
     "success": true,
     "errCode": null,
     "errMessage": null,
@@ -152,7 +152,7 @@ const queryApiEndpointRespData = {
         {
             "id": '1848565642249170945',
             "apiName": "xxxxx-xx",
-            "endpointName": "xxxxx-xx-撞库",
+            "channelName": "xxxxx-xx-撞库",
             "integrationMode": "guide",
             "apiType": "product",
             "createUsername": "admin",
@@ -165,7 +165,7 @@ const queryApiEndpointRespData = {
 }
 
 /** 查询申请API通道响应数据 */
-const queryApiApplyEndpointRespData = {
+const queryApiApplyChannelRespData = {
     "success": true,
     "data": [
         {
@@ -173,7 +173,7 @@ const queryApiApplyEndpointRespData = {
             "apiId": "1853241164564557825",
             "apiType": "loan",
             "apiName": "测试001",
-            "endpointName": "测试001-注册",
+            "channelName": "测试001-注册",
             "integrationMode": "guide",
             "gmtCreate": "2024-11-04 16:48:33",
             "gmtModify": "2024-11-04 16:48:33",
@@ -235,21 +235,21 @@ const loanApiIntegration = async (req: Request, res: Response) => {
 }
 
 /** 分页查询接出API通道 */
-const pageQueryEgressApiEndpoint = async (req: Request, res: Response) => {
+const pageQueryEgressApiChannel = async (req: Request, res: Response) => {
     await waitTime(2000);
-    res.json(pageQueryEgressApiEndpointRespData);
+    res.json(pageQueryEgressApiChannelRespData);
 }
 
 
 /** 查询API通道 */
-const queryApiEndpoint = async (req: Request, res: Response) => {
+const queryApiChannel = async (req: Request, res: Response) => {
     await waitTime(2000);
-    if (req.query.endpointCode === 'checkinto') {
-        res.json(queryCiApiEndpointRespData);
-    } else if (req.query.endpointCode === 'apply') {
-        res.json(queryApiApplyEndpointRespData);
+    if (req.query.channelCode === 'checkinto') {
+        res.json(queryCiApiChannelRespData);
+    } else if (req.query.channelCode === 'apply') {
+        res.json(queryApiApplyChannelRespData);
     } else {
-        res.json(queryApiEndpointRespData);
+        res.json(queryApiChannelRespData);
     }
 }
 
@@ -272,8 +272,8 @@ export default {
     'GET /egress/api/list': queryEgressApi,
     'PUT /egress/api/upsert': upsertEgressApi,
     'PUT /egress/api/loan/integration': loanApiIntegration,
-    'GET /egress/api/endpoint/page': pageQueryEgressApiEndpoint,
-    'GET /egress/api/endpoint/list': queryApiEndpoint,
+    'GET /egress/api/channel/page': pageQueryEgressApiChannel,
+    'GET /egress/api/channel/list': queryApiChannel,
     'GET /egress/api/loan': queryApiLoan,
     'DELETE /egress/api': deleteEgressApi,
 };

+ 358 - 0
mock/message.ts

@@ -0,0 +1,358 @@
+import { Request, Response } from 'express';
+
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 消息中心mock
+ */
+
+/** 等待时间 */
+const waitTime = (time: number = 100) => {
+    return new Promise((resolve) => {
+        setTimeout(() => {
+            resolve(true);
+        }, time);
+    });
+};
+
+/** 分页查询短信签名响应数据 */
+const pageQuerySmsSignRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "total": 1,
+    "pageSize": 10,
+    "pageIndex": 1,
+    "data": [
+        {
+            "id": 1,
+            "signatureName": "惠融数科签名",
+            "signatureContent": "惠融数科",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "totalPages": 1,
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 分页查询短信签名响应数据 */
+const querySmsSignRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": [
+        {
+            "id": 1,
+            "signatureName": "惠融数科签名",
+            "signatureContent": "惠融数科",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 分页查询短信模版响应数据 */
+const pageQuerySmsTemplateRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "total": 1,
+    "pageSize": 10,
+    "pageIndex": 1,
+    "data": [
+        {
+            "id": 1,
+            "templateName": "惠融数科模版",
+            "templateContent": "尊敬的xxx,您的手机号${phone}已经欠费,哈哈哈哈.",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "totalPages": 1,
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 查询短信模版响应数据 */
+const querySmsTemplateRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": [
+        {
+            "id": 1,
+            "templateName": "惠融数科模版",
+            "templateContent": "尊敬的xxx,您的手机号${phone}已经欠费,哈哈哈哈.",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 分页查询短信服务响应数据 */
+const pageQuerySmsServiceRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "total": 1,
+    "pageSize": 10,
+    "pageIndex": 1,
+    "data": [
+        {
+            "id": 1,
+            "serviceName": "促申请短信",
+            "serviceCode": "apply-sms",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "totalPages": 1,
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 分页查询短信平台响应数据 */
+const pageQuerySmsPlatformRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "total": 1,
+    "pageSize": 10,
+    "pageIndex": 1,
+    "data": [
+        {
+            "id": 1,
+            "platformName": "红树短信平台",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "totalPages": 1,
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 查询短信平台响应数据 */
+const querySmsPlatformRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": [
+        {
+            "id": 1,
+            "platformName": "红树短信平台",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 分页查询短信通道响应数据 */
+const pageQuerySmsChannelRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "total": 1,
+    "pageSize": 10,
+    "pageIndex": 1,
+    "data": [
+        {
+            "id": 1,
+            "channelName": "红树短信平台-营销通道",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "totalPages": 1,
+    "notEmpty": true,
+    "empty": false
+}
+
+/** 查询短信通道响应数据 */
+const querySmsChannelRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": [
+        {
+            "id": 1,
+            "channelName": "红树短信平台-营销通道",
+            "createUsername": "刘涛",
+            "modifyUsername": "张元英",
+            "gmtCreate": "2024-10-21 09:33:51",
+            "gmtModify": "2024-10-21 09:33:51",
+            "status": "draft"
+        }
+    ],
+    "notEmpty": true,
+    "empty": false
+}
+
+
+/** 更新/插入短信签名响应数据 */
+const upsertSmsSignRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": 1848565642249170945
+}
+
+/** 更新/插入短信模版响应数据 */
+const upsertSmsTemplateRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": 1848565642249170945
+}
+
+/** 更新/插入短信平台响应数据 */
+const upsertSmsPlatformRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": 1848565642249170945
+}
+
+/** 更新/插入短信通道响应数据 */
+const upsertSmsChannelRespData = {
+    "success": true,
+    "errCode": null,
+    "errMessage": null,
+    "data": 1848565642249170945
+}
+
+/** 分页查询短信签名 */
+const pageQuerySmsSign = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(pageQuerySmsSignRespData);
+}
+
+/** 查询短信签名 */
+const querySmsSign = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(querySmsSignRespData);
+}
+
+
+
+/** 更新/插入短信签名 */
+const upsertSmsSign = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(upsertSmsSignRespData);
+}
+
+/** 分页查询短信模版 */
+const pageQuerySmsTemplate = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(pageQuerySmsTemplateRespData);
+}
+
+/** 分页查询短信模版 */
+const querySmsTemplate = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(querySmsTemplateRespData);
+}
+
+/** 更新/插入短信模版 */
+const upsertSmsTemplate = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(upsertSmsTemplateRespData);
+}
+
+/** 分页查询短信服务 */
+const pageQuerySmsService = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(pageQuerySmsServiceRespData);
+}
+
+
+/** 分页查询短信平台 */
+const pageQuerySmsPlatform = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(pageQuerySmsPlatformRespData);
+}
+
+/** 查询短信平台 */
+const querySmsPlatform = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(querySmsPlatformRespData);
+}
+
+
+
+/** 更新/插入短信模版 */
+const upsertSmsPlatform = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(upsertSmsPlatformRespData);
+}
+
+/** 分页查询短信通道 */
+const pageQuerySmsChannel = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(pageQuerySmsChannelRespData);
+}
+
+/** 查询短信通道 */
+const querySmsChannel = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(querySmsChannelRespData);
+}
+
+
+
+/** 更新/插入短信通道 */
+const upsertSmsChannel = async (req: Request, res: Response) => {
+    await waitTime(2000);
+    res.json(upsertSmsChannelRespData);
+}
+
+
+export default {
+    'GET /sms/sign/page': pageQuerySmsSign,
+    'GET /sms/sign/list': querySmsSign,
+    'POST /sms/sign/upsert': upsertSmsSign,
+
+    'GET /sms/template/page': pageQuerySmsTemplate,
+    'GET /sms/template/list': querySmsTemplate,
+    'POST /sms/template/upsert': upsertSmsTemplate,
+
+    'GET /sms/service/page': pageQuerySmsService,
+    'GET /sms/platform/page': pageQuerySmsPlatform,
+    'GET /sms/platform/list': querySmsPlatform,
+    'POST /sms/platform/upsert': upsertSmsPlatform,
+    'GET /sms/channel/page': pageQuerySmsChannel,
+    'GET /sms/channel/list': querySmsChannel,
+    'POST /sms/channel/upsert': upsertSmsChannel,
+};

+ 2 - 2
src/components/HttpUtil/path.tsx

@@ -25,8 +25,8 @@ class ApiPath extends React.Component {
     const columns: ProColumns<ApiPathParamType>[] = [
       {
         title: '参数值',
-        key: 'key',
-        dataIndex: 'key',
+        key: 'value',
+        dataIndex: 'value',
         formItemProps: () => {
           return {
             rules: [{ required: true, message: '此项为必填项' }],

+ 8 - 1
src/locales/zh-CN/menu.ts

@@ -53,6 +53,13 @@ export default {
   'menu.gateway': '网关管理',
   'menu.gateway.egress': '接出网关',
   'menu.gateway.egress.api': 'API',
-  'menu.gateway.egress.endpoint': 'API通道',
+  'menu.gateway.egress.channel': 'API通道',
   'menu.gateway.egress.api-loan-integration': '助贷API对接',
+  'menu.message': '消息中心',
+  'menu.message.sms': '短信管理',
+  'menu.message.sms.sms-signature': '短信签名',
+  'menu.message.sms.sms-template': '短信模版',
+  'menu.message.sms.sms-service': '短信服务',
+  'menu.message.sms.sms-platform': '短信平台',
+  'menu.message.sms.sms-channel': '短信通道',
 };

+ 3 - 3
src/pages/egress/api/data.d.ts

@@ -74,7 +74,7 @@ type Api = {
 }
 
 /** API通道http配置 */
-type ApiEndpointHttpConfig = {
+type ApiChannelHttpConfig = {
     method: string,
     url: string,
     header?: any[],
@@ -100,7 +100,7 @@ type LoanApiIntegreationCmd = {
     /** 助贷相关信息 */
     apiLoanInfo: ApiLoan,
     /** 撞库配置通道配置 */
-    checkinto: ApiEndpointHttpConfig,
+    checkinto: ApiChannelHttpConfig,
     /** 申请通道配置 */
-    apply: ApiEndpointHttpConfig,
+    apply: ApiChannelHttpConfig,
 }

+ 3 - 3
src/pages/egress/api/table/component/UpsertApiModalForm.tsx

@@ -60,7 +60,7 @@ class UpsertApiModalForm extends React.Component<UpsertApiModalFormProp> {
     /** 提交方法 */
     const handleSubmit = (data: any) => {
       return saveEgressApi(data).then((resp) => {
-        let content = '', okPath = '', cancelPath = '/ui/egress/api';
+        let content = '', okPath = '', cancelPath = '/ui/gateway/egress/api';
         if (resp.success) {
           message.success('保存成功!')
           if (this.props.data?.id !== null && this.props.data?.id !== undefined) {
@@ -69,10 +69,10 @@ class UpsertApiModalForm extends React.Component<UpsertApiModalFormProp> {
           }
           if (data.apiType === 'loan') {
             content = '是否直接跳转助贷对接流程?'
-            okPath = '/ui/egress/loan-integration'
+            okPath = '/ui/gateway/egress/loan-integration'
           } else {
             content = '当前只支持助贷对接流程,是否跳转到API列表页面?'
-            okPath = '/ui/egress/api'
+            okPath = '/ui/gateway/egress/api'
           }
           handleJump(content, okPath, cancelPath, { id: resp.data, from: 'api' });
         }

+ 0 - 0
src/pages/egress/endpoint/create/component/BasicInfoStepFormPage.tsx → src/pages/egress/channel/create/component/BasicInfoStepFormPage.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/BizInfoStepFormPage.tsx → src/pages/egress/channel/create/component/BizInfoStepFormPage.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/ConfigInfoStepFormPage.tsx → src/pages/egress/channel/create/component/ConfigInfoStepFormPage.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/http/body.tsx → src/pages/egress/channel/create/component/http/body.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/http/data.d.ts → src/pages/egress/channel/create/component/http/data.d.ts


+ 0 - 0
src/pages/egress/endpoint/create/component/http/header.tsx → src/pages/egress/channel/create/component/http/header.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/http/index.tsx → src/pages/egress/channel/create/component/http/index.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/http/path.tsx → src/pages/egress/channel/create/component/http/path.tsx


+ 0 - 0
src/pages/egress/endpoint/create/component/http/query.tsx → src/pages/egress/channel/create/component/http/query.tsx


+ 9 - 9
src/pages/egress/endpoint/create/index.tsx → src/pages/egress/channel/create/index.tsx

@@ -11,11 +11,11 @@ import { Button, Popconfirm } from 'antd';
  * @since 2024-09-24
  * @desc 创建API通道页面
  */
-const CreateApiEndpointPage: React.FC = () => {
+const CreateApiChannelPage: React.FC = () => {
   /**基础信息form引用 */
   const basicInfoFormRef = useRef<ProFormInstance>();
 
-  const [currentEndpointType, setCurrentEndpointType] = useState<string>('');
+  const [currentChannelType, setCurrentChannelType] = useState<string>('');
 
   return (
     <PageContainer
@@ -34,16 +34,16 @@ const CreateApiEndpointPage: React.FC = () => {
           }
           onCurrentChange={(current: number) => {
             if (current === 1) {
-              setCurrentEndpointType(basicInfoFormRef.current?.getFieldValue('endpointType'))
+              setCurrentChannelType(basicInfoFormRef.current?.getFieldValue('channelType'))
             }
           }}
           onFinish={(values) => {
             const param = {
               basic: {
                 apiId: values.apiId,
-                endpointCode: values.endpointCode,
-                endpointName: values.endpointName,
-                endpointType: values.endpointType,
+                channelCode: values.channelCode,
+                channelName: values.channelName,
+                channelType: values.channelType,
                 integrateType: values.integrateType,
                 memo: values.memo,
               },
@@ -75,7 +75,7 @@ const CreateApiEndpointPage: React.FC = () => {
                       onConfirm={() => {
                         history.push(
                           {
-                            pathname: '/gateway/egress/api-endpoint',
+                            pathname: '/gateway/egress/api-channel',
                           },
                         )
                       }}
@@ -115,10 +115,10 @@ const CreateApiEndpointPage: React.FC = () => {
           }}
         >
           <BasicInfoStepFormPage formref={basicInfoFormRef} />
-          <ConfigInfoStepFormPage configtype={currentEndpointType} />
+          <ConfigInfoStepFormPage configtype={currentChannelType} />
         </StepsForm>
       </ProCard>
     </PageContainer >
   );
 }
-export default CreateApiEndpointPage;
+export default CreateApiChannelPage;

+ 1 - 1
src/pages/egress/endpoint/data.d.ts → src/pages/egress/channel/data.d.ts

@@ -5,7 +5,7 @@
  */
 
 /** 创建API Modal属性 */
-type CreateEndpointFormModalProp = {
+type CreateChannelFormModalProp = {
   /** @name 用于触发打开的 dom */
   trigger: JSX.Element;
   /** 回调函数 */

+ 4 - 4
src/pages/egress/endpoint/table/component/CreateEndpointModal.tsx → src/pages/egress/channel/table/component/CreateChannelModal.tsx

@@ -9,7 +9,7 @@ import { history } from 'umi';
  * @since 2024-11-04
  * @desc 创建通道modal窗口
  */
-const CreateEndpointModal: React.FC<CreateEndpointFormModalProp> = (props) => {
+const CreateChannelModal: React.FC<CreateChannelFormModalProp> = (props) => {
   /** 接出API列表 */
   const [egressApiList, setEgressApiList] = useState([]);
   const handleRequestEgressApi = () => {
@@ -37,9 +37,9 @@ const CreateEndpointModal: React.FC<CreateEndpointFormModalProp> = (props) => {
           if ((currentApi as EGRESS.Api).apiType === 'loan') {
             history.push(
               {
-                pathname: '/ui/egress/loan-integration',
+                pathname: '/ui/gateway/egress/loan-integration',
               },
-              { id: value.apiId, from: '/ui/egress/endpoint' },
+              { id: value.apiId, from: '/ui/gateway/egress/channel' },
             )
           }
         }
@@ -70,4 +70,4 @@ const CreateEndpointModal: React.FC<CreateEndpointFormModalProp> = (props) => {
     </ModalForm >
   );
 }
-export default CreateEndpointModal;
+export default CreateChannelModal;

+ 13 - 13
src/pages/egress/endpoint/table/index.tsx → src/pages/egress/channel/table/index.tsx

@@ -3,22 +3,22 @@ import { PageContainer } from '@ant-design/pro-layout';
 import React, { useRef } from 'react';
 import { history } from 'umi';
 
-import { pageQueryEgressApiEndpoint } from '@/services/op-admin/gateway/egress';
+import { pageQueryEgressApiChannel } from '@/services/op-admin/gateway/egress';
 import { PlusOutlined } from '@ant-design/icons';
 import type { ActionType, ProColumns } from '@ant-design/pro-components';
 import { Button, Tag } from 'antd';
-import CreateEndpointFormModal from './component/CreateEndpointModal';
+import CreateChannelFormModal from './component/CreateChannelModal';
 /**
  * @author bianlanzhou
  * @since 2024-10-25
  * @desc 接出API通道列表
  */
-const EgressApiEndpointTable: React.FC = () => {
+const EgressApiChannelTable: React.FC = () => {
   /** 引用 */
   const actionRef = useRef<ActionType>();
 
   /** 列定义 */
-  const columns: ProColumns<EGRESS.ApiEndpointItem>[] = [
+  const columns: ProColumns<EGRESS.ApiChannelItem>[] = [
     {
       title: '序号',
       dataIndex: 'index',
@@ -31,7 +31,7 @@ const EgressApiEndpointTable: React.FC = () => {
     },
     {
       title: '通道名称',
-      dataIndex: 'endpointName',
+      dataIndex: 'channelName',
     },
     {
       title: 'API类型',
@@ -56,7 +56,7 @@ const EgressApiEndpointTable: React.FC = () => {
       valueType: 'option',
       width: '10%',
       render: (_, record) => [
-        <a key="view" onClick={() => {}}>
+        <a key="view" onClick={() => { }}>
           查看
         </a>,
         <a
@@ -64,9 +64,9 @@ const EgressApiEndpointTable: React.FC = () => {
           onClick={() => {
             history.push(
               {
-                pathname: '/ui/egress/loan-integration',
+                pathname: '/ui/gateway/egress/loan-integration',
               },
-              { id: record.apiId, from: '/ui/egress/endpoint' },
+              { id: record.apiId, from: '/ui/gateway/egress/channel' },
             );
           }}
         >
@@ -81,11 +81,11 @@ const EgressApiEndpointTable: React.FC = () => {
         title: '',
       }}
     >
-      <ProTable<EGRESS.ApiEndpointItem>
+      <ProTable<EGRESS.ApiChannelItem>
         columns={columns}
         cardBordered
         actionRef={actionRef}
-        request={pageQueryEgressApiEndpoint}
+        request={pageQueryEgressApiChannel}
         editable={{
           type: 'multiple',
         }}
@@ -97,10 +97,10 @@ const EgressApiEndpointTable: React.FC = () => {
           pageSize: 10,
         }}
         toolBarRender={() => [
-          <CreateEndpointFormModal
+          <CreateChannelFormModal
             key="create"
             trigger={
-              <Button key="create" type="primary" onClick={() => {}} icon={<PlusOutlined />}>
+              <Button key="create" type="primary" onClick={() => { }} icon={<PlusOutlined />}>
                 创建API通道
               </Button>
             }
@@ -114,4 +114,4 @@ const EgressApiEndpointTable: React.FC = () => {
     </PageContainer>
   );
 };
-export default EgressApiEndpointTable;
+export default EgressApiChannelTable;

+ 36 - 34
src/pages/egress/loan/integration/index.tsx

@@ -2,7 +2,7 @@ import HttpClient from '@/components/HttpUtil';
 import {
   loanApiIntegration,
   queryApiLoan,
-  queryEgressApiEndpoint,
+  queryEgressApiChannel,
 } from '@/services/op-admin/gateway/egress';
 import { queryMerchant } from '@/services/op-admin/gateway/merchant';
 import {
@@ -16,9 +16,9 @@ import {
   StepsForm,
 } from '@ant-design/pro-components';
 import { useLocation } from '@umijs/max';
+import { history } from 'umi';
 import { Button, message, Popconfirm, Spin } from 'antd';
 import React, { useRef, useState } from 'react';
-import { history } from 'umi';
 
 /**
  * @author bianlanzhou
@@ -35,24 +35,24 @@ const LoanIntegration: React.FC = () => {
   /** 页面loading */
   const [pageLoading, setPageLoading] = useState<boolean>(false);
   /** 撞库通道集成方式 */
-  const [ciEndpointIntegrationMode, setCiEndpointIntegrationMode] = useState('customize');
+  const [ciChannelIntegrationMode, setCiChannelIntegrationMode] = useState('customize');
   /** 注册通道集成方式 */
-  const [apyEndpointIntegrationMode, setApyEndpointIntegrationMode] = useState('customize');
+  const [apyChannelIntegrationMode, setApyChannelIntegrationMode] = useState('customize');
   /** 撞库通道ID */
-  const [checkintoEndpointId, setCheckintoEndpointId] = useState<string>('');
+  const [checkintoChannelId, setCheckintoChannelId] = useState<string>('');
   /** 申请注册ID */
-  const [applyEndpointId, setApplyintoEndpointId] = useState<string>('');
+  const [applyChannelId, setApplyintoChannelId] = useState<string>('');
   /** 查询撞库通道 */
-  const handleQueryCheckintoEndpoint = () => {
-    return queryEgressApiEndpoint({
-      endpointCode: 'checkinto',
+  const handleQueryCheckintoChannel = () => {
+    return queryEgressApiChannel({
+      channelCode: 'checkinto',
       apiId: (location.state as { id: string; from: string }).id,
     })
       .then((resp) => {
         if (resp.data && resp.data.length > 0) {
           let integrationMode = resp.data[0].integrationMode;
-          setCiEndpointIntegrationMode(integrationMode);
-          setCheckintoEndpointId(resp.data[0].id);
+          setCiChannelIntegrationMode(integrationMode);
+          setCheckintoChannelId(resp.data[0].id);
           if (integrationMode === 'guide') {
             return {
               ...resp.data[0],
@@ -66,7 +66,7 @@ const LoanIntegration: React.FC = () => {
           }
         } else {
           //默认值
-          setCiEndpointIntegrationMode('customize');
+          setCiChannelIntegrationMode('customize');
           return {
             integrationMode: 'customize',
           };
@@ -76,16 +76,16 @@ const LoanIntegration: React.FC = () => {
   };
 
   /** 查询申请通道 */
-  const handleQueryApplyEndpoint = () => {
-    return queryEgressApiEndpoint({
-      endpointCode: 'apply',
+  const handleQueryApplyChannel = () => {
+    return queryEgressApiChannel({
+      channelCode: 'apply',
       apiId: (location.state as { id: string; from: string }).id,
     })
       .then((resp) => {
         if (resp.data && resp.data.length > 0) {
           let integrationMode = resp.data[0].integrationMode;
-          setApyEndpointIntegrationMode(resp.data[0].integrationMode);
-          setApplyintoEndpointId(resp.data[0].id);
+          setApyChannelIntegrationMode(resp.data[0].integrationMode);
+          setApplyintoChannelId(resp.data[0].id);
           if (integrationMode === 'guide') {
             return {
               ...resp.data[0],
@@ -98,7 +98,7 @@ const LoanIntegration: React.FC = () => {
             };
           }
         } else {
-          setApyEndpointIntegrationMode('customize');
+          setApyChannelIntegrationMode('customize');
           return {
             integrationMode: 'customize',
           };
@@ -133,8 +133,8 @@ const LoanIntegration: React.FC = () => {
       });
   };
 
-  /** 处理通道formData */
-  const handleEndpointFormData = (endpointId: string, formData: any) => {
+  /** 处理撞库通道formData */
+  const handleChannelFormData = (channelId: string, formData: any) => {
     const locationStateData = location.state as { id: string; from: string };
     let requestConfigStr = '';
     if (formData.integrationMode === 'guide') {
@@ -151,7 +151,7 @@ const LoanIntegration: React.FC = () => {
       requestConfigStr = formData.requestConfig;
     }
     return {
-      id: endpointId,
+      id: channelId,
       apiId: locationStateData.id,
       integrationMode: formData.integrationMode,
       requestConfig: requestConfigStr,
@@ -159,6 +159,7 @@ const LoanIntegration: React.FC = () => {
     };
   };
 
+
   return (
     <PageContainer
       header={{
@@ -287,9 +288,10 @@ const LoanIntegration: React.FC = () => {
               name="checkInto"
               title="撞库"
               grid
-              request={handleQueryCheckintoEndpoint}
+              request={handleQueryCheckintoChannel}
               onFinish={async (formData) => {
-                setCheckIntoFormData(handleEndpointFormData(checkintoEndpointId, formData));
+                let checkintoFormData = handleChannelFormData(checkintoChannelId, formData);
+                setCheckIntoFormData(checkintoFormData);
                 return true;
               }}
             >
@@ -310,12 +312,12 @@ const LoanIntegration: React.FC = () => {
                     },
                   ]}
                   onChange={(value) => {
-                    setCiEndpointIntegrationMode(value);
+                    setCiChannelIntegrationMode(value);
                   }}
                 />
               </ProCard>
               <ProCard title="请求配置" bordered style={{ marginTop: '5px' }}>
-                {ciEndpointIntegrationMode === 'customize' ? (
+                {ciChannelIntegrationMode === 'customize' ? (
                   <div style={{ width: '85vw' }}>
                     <ProFormTextArea
                       label="请求配置参数"
@@ -335,7 +337,7 @@ const LoanIntegration: React.FC = () => {
                   <HttpClient />
                 )}
               </ProCard>
-              {ciEndpointIntegrationMode === 'customize' ? (
+              {ciChannelIntegrationMode === 'customize' ? (
                 <div />
               ) : (
                 <ProCard title="响应配置" bordered style={{ marginTop: '5px' }}>
@@ -364,12 +366,12 @@ const LoanIntegration: React.FC = () => {
               name="apply"
               title="注册"
               wrapperCol={{ span: 24 }}
-              request={handleQueryApplyEndpoint}
+              request={handleQueryApplyChannel}
               grid
               onFinish={async (formData) => {
                 setPageLoading(true);
                 let locationStateData = location.state as { id: string; from: string };
-                let applyFormData = handleEndpointFormData(applyEndpointId, formData);
+                let applyFormData = handleChannelFormData(applyChannelId, formData);
                 loanApiIntegration({
                   apiId: locationStateData.id,
                   apiLoanInfo: mainFormRef.current?.getFieldFormatValueObject?.() as ApiLoan,
@@ -378,11 +380,11 @@ const LoanIntegration: React.FC = () => {
                 })
                   .then((resp) => {
                     if (resp.success) {
-                      let toPathname = '/ui/egress/endpoint';
+                      let toPathname = '/ui/gateway/egress/channel';
                       if (locationStateData.from === 'api') {
-                        toPathname = '/ui/egress/api';
+                        toPathname = '/ui/gateway/egress/api';
                       }
-                      message.success('创建成功!');
+                      message.success('操作成功!');
                       history.push({
                         pathname: toPathname,
                       });
@@ -412,12 +414,12 @@ const LoanIntegration: React.FC = () => {
                     },
                   ]}
                   onChange={(value) => {
-                    setApyEndpointIntegrationMode(value);
+                    setApyChannelIntegrationMode(value);
                   }}
                 />
               </ProCard>
               <ProCard title="请求配置" bordered style={{ marginTop: '5px' }}>
-                {apyEndpointIntegrationMode === 'customize' ? (
+                {apyChannelIntegrationMode === 'customize' ? (
                   <div style={{ width: '85vw' }}>
                     <ProFormTextArea
                       label="请求配置参数"
@@ -437,7 +439,7 @@ const LoanIntegration: React.FC = () => {
                   <HttpClient />
                 )}
               </ProCard>
-              {ciEndpointIntegrationMode === 'customize' ? (
+              {ciChannelIntegrationMode === 'customize' ? (
                 <div />
               ) : (
                 <ProCard title="响应配置" bordered style={{ marginTop: '5px' }}>

+ 127 - 0
src/pages/message/sms/channel/table/component/UpsertSmsChannelModalForm.tsx

@@ -0,0 +1,127 @@
+import { queryEgressApi, queryEgressApiChannel } from '@/services/op-admin/gateway/egress';
+import { querySmsPlatform, upsertSmsChannel } from '@/services/op-admin/message/sms';
+import { ModalForm, ProForm, ProFormSelect, ProFormText } from '@ant-design/pro-components';
+import { message } from 'antd';
+import React, { useState } from 'react';
+
+/**
+ * @author bianlanzhou
+ * @since 2024-11-07
+ * @desc 
+ */
+const UpsertSmsChannelModalForm: React.FC<UpsertSmsChannelModalFormProp> = (props) => {
+  const [form] = ProForm.useForm();
+
+  /** API通道列表 */
+  const [apiChannelOption, setApiChannelOption] = useState([]);
+
+  /** 提交方法 */
+  const handleSubmit = (value: SMS.ChannelUpsertCmd) => {
+    if (props.data) {
+      value.id = props.data.id;
+    }
+    return upsertSmsChannel(value).then(() => {
+      message.success("操作成功!")
+      props.callback();
+      return true;
+    }).catch((err) => {
+      console.log(err)
+      return false;
+    });
+  }
+  return (
+    <ModalForm<SMS.ChannelUpsertCmd>
+      trigger={props.trigger}
+      title="短信通道"
+      onFinish={handleSubmit}
+      clearOnDestroy={true}
+      initialValues={
+        props.data
+      }
+      form={form}
+    >
+      <ProForm.Group>
+        <ProFormText
+          width="md"
+          name="channelName"
+          label="平台名称"
+          rules={[
+            {
+              required: true,
+              message: '请填写平台名称',
+            },
+          ]}
+          placeholder="请填写平台名称"
+          required
+        />
+        <ProFormSelect name="platformId" placeholder="请选择短信平台"
+          label='绑定短信平台'
+          width='md'
+          rules={[
+            {
+              required: true,
+              message: '请选择短信平台',
+            },
+          ]}
+          fieldProps={
+            {
+              fieldNames: {
+                label: 'platformName',
+                value: 'id'
+              }
+            }
+          }
+          request={() => {
+            return querySmsPlatform().then((resp) => {
+              return resp.data
+            })
+          }}
+        />
+        <ProFormSelect name="apiId" placeholder="请选择短信API"
+          label='绑定短信API'
+          width='md'
+          rules={[
+            {
+              required: true,
+              message: '请选择短信API',
+            },
+          ]}
+          fieldProps={
+            {
+              fieldNames: {
+                label: 'apiName',
+                value: 'id'
+              }
+            }
+          }
+          request={() => {
+            return queryEgressApi({ apiType: 'sms' }).then((resp) => {
+              return resp.data;
+            })
+          }}
+          onChange={(value) => {
+            queryEgressApiChannel({ apiId: value }).then((resp) => {
+              setApiChannelOption(resp.data.map((item: any) => {
+                return {
+                  value: item.id, label: item.channelName
+                };
+              }))
+            })
+          }}
+        />
+        <ProFormSelect name="apiChannelId" placeholder="请选择短信API通道"
+          label='绑定短信API通道'
+          width='md'
+          options={apiChannelOption}
+          rules={[
+            {
+              required: true,
+              message: '请选择短信API通道',
+            },
+          ]}
+        />
+      </ProForm.Group>
+    </ModalForm>
+  );
+}
+export default UpsertSmsChannelModalForm;

+ 155 - 0
src/pages/message/sms/channel/table/index.tsx

@@ -0,0 +1,155 @@
+import React, { useRef } from 'react';
+import { PageContainer } from '@ant-design/pro-layout';
+import { ProTable } from '@ant-design/pro-components';
+
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import { Button, Popconfirm, Spin, Tag } from 'antd';
+import UpsertSmsChannelModalForm from './component/UpsertSmsChannelModalForm';
+import { PlusOutlined } from '@ant-design/icons';
+import { pageQuerySmsChannel } from '@/services/op-admin/message/sms';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-07
+ * @desc 
+ */
+const SmsChannelTable: React.FC = () => {
+
+  /** 引用 */
+  const actionRef = useRef<ActionType>();
+
+  /** 列定义 */
+  const columns: ProColumns<SMS.Channel>[] = [
+    {
+      title: '序号',
+      dataIndex: 'index',
+      valueType: 'indexBorder',
+      width: 48,
+    },
+    {
+      title: '通道名称',
+      dataIndex: 'channelName',
+    },
+    {
+      title: '短信平台名称',
+      dataIndex: 'platformName',
+    },
+    {
+      title: '创建人',
+      dataIndex: 'createUsername',
+      search: false,
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'gmtCreate',
+      search: false,
+    },
+    {
+      title: '修改人',
+      dataIndex: 'modifyUsername',
+      search: false,
+    },
+    {
+      title: '修改时间',
+      dataIndex: 'gmtModify',
+      search: false,
+    },
+    {
+      title: '状态',
+      dataIndex: 'status',
+      search: false,
+      render: (_, record) => {
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='orange'>草稿</Tag>]
+        }
+        if (record.status === 'ok') {
+          return [<Tag key='status' color='blue'>已启用</Tag>]
+        }
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='red'>已停用</Tag>]
+        }
+        if (record.status === 'delete') {
+          return [<Tag key='status' color='purple'>已删除</Tag>]
+        }
+        return [<Tag key='status' color='#f50'>未知</Tag>]
+      }
+    },
+    {
+      title: '操作',
+      valueType: 'option',
+      width: '10%',
+      render: (_, record) => [
+        <UpsertSmsChannelModalForm
+          key="edit"
+          trigger={
+            <a
+              key="edit"
+            >
+              编辑
+            </a>
+          }
+          callback={() => {
+            actionRef.current?.reload()
+          }}
+          data={record}
+        />
+        ,
+        <Popconfirm
+          key="delete"
+          title="确认删除此条记录?"
+          okText="确定"
+          cancelText="取消"
+          onConfirm={async () => {
+
+          }}
+        >
+          <Spin spinning={false} >
+            <a
+              key="delete"
+            >
+              删除
+            </a>
+          </Spin>
+        </Popconfirm>,
+      ],
+    },
+  ]
+  return (
+    <PageContainer
+      header={{
+        title: '',
+      }}
+    >
+      <ProTable<SMS.Channel>
+        columns={columns}
+        cardBordered
+        actionRef={actionRef}
+        request={pageQuerySmsChannel}
+        editable={{
+          type: 'multiple',
+        }}
+        rowKey="id"
+        search={{
+          labelWidth: 'auto',
+        }}
+        pagination={{
+          pageSize: 10,
+        }}
+        toolBarRender={() => [
+          <UpsertSmsChannelModalForm
+            key="create"
+            trigger={
+              <Button key="create" type="primary" icon={<PlusOutlined />}>
+                创建短信通道
+              </Button>
+            }
+            callback={() => {
+              actionRef.current?.reload();
+            }}
+          />,
+        ]}
+        headerTitle="短信通道列表"
+      />
+    </PageContainer>
+  );
+}
+export default SmsChannelTable;

+ 57 - 0
src/pages/message/sms/data.d.ts

@@ -0,0 +1,57 @@
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 短信数据class定义
+ */
+
+
+/** 创建签名 Modal属性 */
+type UpsertSmsSignatureModalFormProp = {
+    /** @name 用于触发打开的 dom */
+    trigger: JSX.Element;
+    /** 回调函数 */
+    callback: () => void;
+    /** 数据 */
+    data?: SMS.Signature;
+}
+
+/** 创建模版 Modal属性 */
+type UpsertSmsTemplateModalFormProp = {
+    /** @name 用于触发打开的 dom */
+    trigger: JSX.Element;
+    /** 回调函数 */
+    callback: () => void;
+    /** 数据 */
+    data?: SMS.Template;
+}
+
+
+/** 创建短信服务 Modal属性 */
+type UpsertSmsServiceModalFormProp = {
+    /** @name 用于触发打开的 dom */
+    trigger: JSX.Element;
+    /** 回调函数 */
+    callback: () => void;
+    /** 数据 */
+    data?: SMS.Service;
+}
+
+/** 创建短信平台 Modal属性 */
+type UpsertSmsPlatformModalFormProp = {
+    /** @name 用于触发打开的 dom */
+    trigger: JSX.Element;
+    /** 回调函数 */
+    callback: () => void;
+    /** 数据 */
+    data?: SMS.SmsPlatform;
+}
+
+/** 创建短信通道 Modal属性 */
+type UpsertSmsChannelModalFormProp = {
+    /** @name 用于触发打开的 dom */
+    trigger: JSX.Element;
+    /** 回调函数 */
+    callback: () => void;
+    /** 数据 */
+    data?: SMS.SmsChannel;
+}

+ 11 - 0
src/pages/message/sms/index.tsx

@@ -0,0 +1,11 @@
+import React from 'react';
+
+function Sms() {
+  return (
+    <div>
+      Sms
+    </div>
+  );
+}
+
+export default Sms;

+ 52 - 0
src/pages/message/sms/platform/table/component/UpsertSmsPlatformModalForm.tsx

@@ -0,0 +1,52 @@
+
+import { upsertSmsPlatform } from '@/services/op-admin/message/sms';
+import { ModalForm, ProFormText } from '@ant-design/pro-components';
+import { message } from 'antd';
+import React from 'react';
+
+/**
+ * @author bianlanzhou
+ * @since 2024-11-07
+ * @desc 更新/插入短信平台
+ */
+const UpsertSmsPlatformModalForm: React.FC<UpsertSmsPlatformModalFormProp> = (props) => {
+  /** 提交方法 */
+  const handleSubmit = (value: SMS.PlatformUpsertCmd) => {
+    if (props.data) {
+      value.id = props.data.id;
+    }
+    return upsertSmsPlatform(value).then(() => {
+      message.success("操作成功!")
+      props.callback();
+      return true;
+    }).catch((err) => {
+      console.log(err)
+      return false;
+    });
+  }
+  return (
+    <ModalForm<SMS.PlatformUpsertCmd>
+      trigger={props.trigger}
+      title="短信平台"
+      onFinish={handleSubmit}
+      initialValues={
+        props.data
+      }
+    >
+      <ProFormText
+        width="md"
+        name="platformName"
+        label="平台名称"
+        rules={[
+          {
+            required: true,
+            message: '请填写平台名称',
+          },
+        ]}
+        placeholder="请填写平台名称"
+        required
+      />
+    </ModalForm >
+  );
+}
+export default UpsertSmsPlatformModalForm;

+ 151 - 0
src/pages/message/sms/platform/table/index.tsx

@@ -0,0 +1,151 @@
+import React, { useRef } from 'react';
+import { PageContainer } from '@ant-design/pro-layout';
+import { ProTable } from '@ant-design/pro-components';
+
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import { Button, Popconfirm, Spin, Tag } from 'antd';
+import UpsertSmsPlatformModalForm from './component/UpsertSmsPlatformModalForm';
+import { pageQuerySmsPlatform } from '@/services/op-admin/message/sms';
+import { PlusOutlined } from '@ant-design/icons';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-07
+ * @desc 短信平台列表页
+ */
+const SmsPlatform: React.FC = () => {
+  /** 引用 */
+  const actionRef = useRef<ActionType>();
+
+  /** 列定义 */
+  const columns: ProColumns<SMS.Platform>[] = [
+    {
+      title: '序号',
+      dataIndex: 'index',
+      valueType: 'indexBorder',
+      width: 48,
+    },
+    {
+      title: '平台名称',
+      dataIndex: 'platformName',
+    },
+    {
+      title: '创建人',
+      dataIndex: 'createUsername',
+      search: false,
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'gmtCreate',
+      search: false,
+    },
+    {
+      title: '修改人',
+      dataIndex: 'modifyUsername',
+      search: false,
+    },
+    {
+      title: '修改时间',
+      dataIndex: 'gmtModify',
+      search: false,
+    },
+    {
+      title: '状态',
+      dataIndex: 'status',
+      search: false,
+      render: (_, record) => {
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='orange'>草稿</Tag>]
+        }
+        if (record.status === 'ok') {
+          return [<Tag key='status' color='blue'>已启用</Tag>]
+        }
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='red'>已停用</Tag>]
+        }
+        if (record.status === 'delete') {
+          return [<Tag key='status' color='purple'>已删除</Tag>]
+        }
+        return [<Tag key='status' color='#f50'>未知</Tag>]
+      }
+    },
+    {
+      title: '操作',
+      valueType: 'option',
+      width: '10%',
+      render: (_, record) => [
+        <UpsertSmsPlatformModalForm
+          key="edit"
+          trigger={
+            <a
+              key="edit"
+            >
+              编辑
+            </a>
+          }
+          callback={() => {
+            actionRef.current?.reload()
+          }}
+          data={record}
+        />
+        ,
+        <Popconfirm
+          key="delete"
+          title="确认删除此条记录?"
+          okText="确定"
+          cancelText="取消"
+          onConfirm={async () => {
+
+          }}
+        >
+          <Spin spinning={false} >
+            <a
+              key="delete"
+            >
+              删除
+            </a>
+          </Spin>
+        </Popconfirm>,
+      ],
+    },
+  ]
+
+  return (
+    <PageContainer
+      header={{
+        title: '',
+      }}
+    >
+      <ProTable<SMS.Platform>
+        columns={columns}
+        cardBordered
+        actionRef={actionRef}
+        request={pageQuerySmsPlatform}
+        editable={{
+          type: 'multiple',
+        }}
+        rowKey="id"
+        search={{
+          labelWidth: 'auto',
+        }}
+        pagination={{
+          pageSize: 10,
+        }}
+        toolBarRender={() => [
+          <UpsertSmsPlatformModalForm
+            key="create"
+            trigger={
+              <Button key="create" type="primary" icon={<PlusOutlined />}>
+                创建短信平台
+              </Button>
+            }
+            callback={() => {
+              actionRef.current?.reload();
+            }}
+          />,
+        ]}
+        headerTitle="短信平台列表"
+      />
+    </PageContainer>
+  );
+}
+export default SmsPlatform;

+ 161 - 0
src/pages/message/sms/service/table/component/UpsertSmsServiceModalForm.tsx

@@ -0,0 +1,161 @@
+import { querySmsChannel, querySmsPlatform, querySmsSign, querySmsTemplate, upsertSmsService } from '@/services/op-admin/message/sms';
+import { ModalForm, ProFormSelect, ProFormText } from '@ant-design/pro-components';
+import { Card, Col, message } from 'antd';
+import { Row } from 'antd/lib';
+import React, { useState } from 'react';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 创建/更新短信服务
+ */
+const UpsertSmsServiceModalForm: React.FC<UpsertSmsServiceModalFormProp> = (props) => {
+
+  /** 短信通道列表 */
+  const [smsChannelOption, setSmsChannelOption] = useState([]);
+
+  /** 提交方法 */
+  const handleSubmit = (value: SMS.ServiceUpsertCmd) => {
+    if (props.data) {
+      value.id = props.data.id;
+    }
+    return upsertSmsService(value).then(() => {
+      message.success("操作成功!")
+      props.callback();
+      return true;
+    }).catch((err) => {
+      console.log(err)
+      return false;
+    });
+  }
+
+  return (
+    <ModalForm<SMS.ServiceUpsertCmd>
+      trigger={props.trigger}
+      title="短信服务"
+      onFinish={handleSubmit}
+      initialValues={
+        props.data
+      }
+    >
+      <Row gutter={[16, 16]}>
+        <Col span={12} >
+          <ProFormText
+            width="md"
+            name="serviceName"
+            label="服务名称"
+            rules={[
+              {
+                required: true,
+                message: '请填写服务名称',
+              },
+            ]}
+            placeholder="请填写服务名称"
+            required
+          />
+          <ProFormText
+            width="md"
+            name="serviceCode"
+            label="服务编码"
+            rules={[
+              {
+                required: true,
+                message: '请填写服务编码',
+              },
+            ]}
+            placeholder="请填写服务编码"
+            required
+          />
+          <ProFormSelect name="smsPlatformId" placeholder="请选择短信平台"
+            label='短信平台'
+            width='md'
+            rules={[
+              {
+                required: true,
+                message: '请选择短信平台',
+              },
+            ]}
+            fieldProps={{
+              fieldNames: {
+                label: 'platformName',
+                value: 'id',
+              },
+            }}
+            request={() => {
+              return querySmsPlatform().then((resp) => {
+                return resp.data;
+              })
+            }}
+            onChange={(value) => {
+              querySmsChannel({ platformId: value }).then((resp) => {
+                setSmsChannelOption(resp.data)
+              });
+            }}
+          />
+          <ProFormSelect name="smsChannelId" placeholder="请选择短信通道"
+            label='短信通道'
+            width='md'
+            options={smsChannelOption}
+            rules={[
+              {
+                required: true,
+                message: '请选择短信通道',
+              },
+            ]}
+          />
+          <ProFormSelect name="signId" placeholder="请选择短信签名"
+            label='短信签名'
+            width='md'
+            rules={[
+              {
+                required: true,
+                message: '请选择短信签名',
+              },
+            ]}
+            fieldProps={{
+              fieldNames: {
+                label: 'signatureName',
+                value: 'id',
+              },
+            }}
+            request={() => {
+              return querySmsSign().then((resp) => {
+                return resp.data;
+              })
+            }}
+          />
+          <ProFormSelect name="templateId" placeholder="请选择短信模版"
+            label='短信模版'
+            width='md'
+            rules={[
+              {
+                required: true,
+                message: '请选择短信模版',
+              },
+            ]}
+            fieldProps={{
+              fieldNames: {
+                label: 'templateName',
+                value: 'id',
+              },
+            }}
+            request={() => {
+              return querySmsTemplate().then((resp) => {
+                return resp.data;
+              })
+            }}
+          />
+        </Col>
+        <Col span={12} >
+          <Card title="短信预览" style={{ height: '100%' }} >
+            <Card title={false} style={{ borderTopLeftRadius: '0 0', borderTopRightRadius: '5px 10px', borderBottomLeftRadius: '5px 10px', borderBottomRightRadius: '5px 10px', minHeight: '30px', fontSize: '15px' }}>
+              { }
+            </Card>
+          </Card>
+        </Col>
+      </Row>
+
+    </ModalForm >
+  );
+}
+
+export default UpsertSmsServiceModalForm;

+ 155 - 0
src/pages/message/sms/service/table/index.tsx

@@ -0,0 +1,155 @@
+import React, { useRef } from 'react';
+import { PageContainer } from '@ant-design/pro-layout';
+import { ProTable } from '@ant-design/pro-components';
+
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import { Button, Popconfirm, Spin, Tag } from 'antd';
+import UpsertSmsServiceModalForm from './component/UpsertSmsServiceModalForm';
+import { pageQuerySmsService } from '@/services/op-admin/message/sms';
+import { PlusOutlined } from '@ant-design/icons';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 短信服务列表
+ */
+const SmsServiceTable: React.FC = () => {
+  /** 引用 */
+  const actionRef = useRef<ActionType>();
+
+  /** 列定义 */
+  const columns: ProColumns<SMS.Service>[] = [
+    {
+      title: '序号',
+      dataIndex: 'index',
+      valueType: 'indexBorder',
+      width: 48,
+    },
+    {
+      title: '服务名称',
+      dataIndex: 'serviceName',
+    },
+    {
+      title: '服务编码',
+      dataIndex: 'serviceCode',
+      search: false,
+    },
+    {
+      title: '创建人',
+      dataIndex: 'createUsername',
+      search: false,
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'gmtCreate',
+      search: false,
+    },
+    {
+      title: '修改人',
+      dataIndex: 'modifyUsername',
+      search: false,
+    },
+    {
+      title: '修改时间',
+      dataIndex: 'gmtModify',
+      search: false,
+    },
+    {
+      title: '状态',
+      dataIndex: 'status',
+      search: false,
+      render: (_, record) => {
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='orange'>草稿</Tag>]
+        }
+        if (record.status === 'ok') {
+          return [<Tag key='status' color='blue'>已启用</Tag>]
+        }
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='red'>已停用</Tag>]
+        }
+        if (record.status === 'delete') {
+          return [<Tag key='status' color='purple'>已删除</Tag>]
+        }
+        return [<Tag key='status' color='#f50'>未知</Tag>]
+      }
+    },
+    {
+      title: '操作',
+      valueType: 'option',
+      width: '10%',
+      render: (_, record) => [
+        <UpsertSmsServiceModalForm
+          key="edit"
+          trigger={
+            <a
+              key="edit"
+            >
+              编辑
+            </a>
+          }
+          callback={() => {
+            actionRef.current?.reload()
+          }}
+          data={record}
+        />
+        ,
+        <Popconfirm
+          key="delete"
+          title="确认删除此条记录?"
+          okText="确定"
+          cancelText="取消"
+          onConfirm={async () => {
+
+          }}
+        >
+          <Spin spinning={false} >
+            <a
+              key="delete"
+            >
+              删除
+            </a>
+          </Spin>
+        </Popconfirm>,
+      ],
+    },
+  ]
+  return (
+    <PageContainer
+      header={{
+        title: '',
+      }}
+    >
+      <ProTable<SMS.Service>
+        columns={columns}
+        cardBordered
+        actionRef={actionRef}
+        request={pageQuerySmsService}
+        editable={{
+          type: 'multiple',
+        }}
+        rowKey="id"
+        search={{
+          labelWidth: 'auto',
+        }}
+        pagination={{
+          pageSize: 10,
+        }}
+        toolBarRender={() => [
+          <UpsertSmsServiceModalForm
+            key="create"
+            trigger={
+              <Button key="create" type="primary" icon={<PlusOutlined />}>
+                创建短信服务
+              </Button>
+            }
+            callback={() => {
+              actionRef.current?.reload();
+            }}
+          />,
+        ]}
+        headerTitle="短信服务列表"
+      />
+    </PageContainer>
+  );
+}
+export default SmsServiceTable;

+ 70 - 0
src/pages/message/sms/signature/table/component/UpsertSmsSignatureModalForm.tsx

@@ -0,0 +1,70 @@
+import React from 'react';
+import { ModalForm, ProForm, ProFormText } from '@ant-design/pro-components';
+import { upsertSmsSign } from '@/services/op-admin/message/sms';
+import { message } from 'antd';
+
+
+/**
+ * @author bianlanzhou
+ * @since 2024-09-24
+ * @desc 创建/修改modal窗口
+ */
+
+class UpsertSmsSignatureModalForm extends React.Component<UpsertSmsSignatureModalFormProp> {
+  render() {
+    /** 提交方法 */
+    const handleSubmit = (value: SMS.SignatureUpsertCmd) => {
+      if (this.props.data) {
+        value.id = this.props.data.id;
+      }
+      return upsertSmsSign(value).then(() => {
+        message.success("操作成功!")
+        this.props.callback();
+        return true;
+      }).catch((err) => {
+        console.log(err)
+        return false;
+      });
+    }
+    return (
+      <ModalForm<SMS.SignatureUpsertCmd>
+        trigger={this.props.trigger}
+        title="短信签名"
+        onFinish={handleSubmit}
+        initialValues={
+          this.props.data
+        }
+      >
+        <ProForm.Group >
+          <ProFormText
+            width="md"
+            name="signatureName"
+            label="签名名称"
+            rules={[
+              {
+                required: true,
+                message: '请填写签名名称',
+              },
+            ]}
+            placeholder="请填写签名名称"
+            required
+          />
+          <ProFormText
+            width="md"
+            name="signatureContent"
+            label="签名内容"
+            rules={[
+              {
+                required: true,
+                message: '请填写签名内容',
+              },
+            ]}
+            placeholder="请填写签名内容"
+            required
+          />
+        </ProForm.Group>
+      </ModalForm >
+    );
+  }
+}
+export default UpsertSmsSignatureModalForm;

+ 155 - 0
src/pages/message/sms/signature/table/index.tsx

@@ -0,0 +1,155 @@
+import React, { useRef } from 'react';
+import { PageContainer } from '@ant-design/pro-layout';
+import { ProTable } from '@ant-design/pro-components';
+
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import { pageQuerySmsSign } from '@/services/op-admin/message/sms';
+import { Button, Popconfirm, Spin, Tag } from 'antd';
+import UpsertSmsSignatureModalForm from './component/UpsertSmsSignatureModalForm';
+import { PlusOutlined } from '@ant-design/icons';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 短信签名列表页面
+ */
+const SmsSignatureTable: React.FC = () => {
+
+  /** 引用 */
+  const actionRef = useRef<ActionType>();
+
+  /** 列定义 */
+  const columns: ProColumns<SMS.Signature>[] = [
+    {
+      title: '序号',
+      dataIndex: 'index',
+      valueType: 'indexBorder',
+      width: 48,
+    },
+    {
+      title: '签名名称',
+      dataIndex: 'signatureName',
+    },
+    {
+      title: '签名内容',
+      dataIndex: 'signatureContent',
+      search: false,
+    },
+    {
+      title: '创建人',
+      dataIndex: 'createUsername',
+      search: false,
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'gmtCreate',
+      search: false,
+    },
+    {
+      title: '修改人',
+      dataIndex: 'modifyUsername',
+      search: false,
+    },
+    {
+      title: '修改时间',
+      dataIndex: 'gmtModify',
+      search: false,
+    },
+    {
+      title: '状态',
+      dataIndex: 'status',
+      search: false,
+      render: (_, record) => {
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='orange'>草稿</Tag>]
+        }
+        if (record.status === 'ok') {
+          return [<Tag key='status' color='blue'>已启用</Tag>]
+        }
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='red'>已停用</Tag>]
+        }
+        if (record.status === 'delete') {
+          return [<Tag key='status' color='purple'>已删除</Tag>]
+        }
+        return [<Tag key='status' color='#f50'>未知</Tag>]
+      }
+    },
+    {
+      title: '操作',
+      valueType: 'option',
+      width: '10%',
+      render: (_, record) => [
+        <UpsertSmsSignatureModalForm
+          key="edit"
+          trigger={
+            <a
+              key="edit"
+            >
+              编辑
+            </a>
+          }
+          callback={() => {
+            actionRef.current?.reload()
+          }}
+          data={record}
+        />
+        ,
+        <Popconfirm
+          key="delete"
+          title="确认删除此条记录?"
+          okText="确定"
+          cancelText="取消"
+          onConfirm={async () => {
+
+          }}
+        >
+          <Spin spinning={false} >
+            <a
+              key="delete"
+            >
+              删除
+            </a>
+          </Spin>
+        </Popconfirm>,
+      ],
+    },
+  ]
+  return (
+    <PageContainer
+      header={{
+        title: '',
+      }}
+    >
+      <ProTable<SMS.Signature>
+        columns={columns}
+        actionRef={actionRef}
+        request={pageQuerySmsSign}
+        editable={{
+          type: 'multiple',
+        }}
+        rowKey="id"
+        search={{
+          labelWidth: 'auto',
+        }}
+        pagination={{
+          pageSize: 10,
+        }}
+        toolBarRender={() => [
+          <UpsertSmsSignatureModalForm
+            key="create"
+            trigger={
+              <Button key="create" type="primary" icon={<PlusOutlined />}>
+                创建短信签名
+              </Button>
+            }
+            callback={() => {
+              actionRef.current?.reload();
+            }}
+          />,
+        ]}
+        headerTitle="短信签名列表"
+      />
+    </PageContainer>
+  );
+}
+export default SmsSignatureTable;

+ 68 - 0
src/pages/message/sms/template/table/component/UpsertSmsTemplateModalForm.tsx

@@ -0,0 +1,68 @@
+import React from 'react';
+import { ModalForm, ProForm, ProFormText } from '@ant-design/pro-components';
+import { upsertSmsTemplate } from '@/services/op-admin/message/sms';
+import { message } from 'antd';
+
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 更新/插入短信模版
+ */
+class UpsertSmsTemplateModalForm extends React.Component<UpsertSmsTemplateModalFormProp> {
+  render() {
+    /** 提交方法 */
+    const handleSubmit = (value: SMS.TemplateUpsertCmd) => {
+      if (this.props.data) {
+        value.id = this.props.data.id;
+      }
+      return upsertSmsTemplate(value).then(() => {
+        message.success("操作成功!")
+        this.props.callback();
+        return true;
+      }).catch((err) => {
+        console.log(err)
+        return false;
+      });
+    }
+    return (
+      <ModalForm<SMS.TemplateUpsertCmd>
+        trigger={this.props.trigger}
+        title="短信模版"
+        onFinish={handleSubmit}
+        initialValues={
+          this.props.data
+        }
+      >
+        <ProForm.Group >
+          <ProFormText
+            width="md"
+            name="templateName"
+            label="模版名称"
+            rules={[
+              {
+                required: true,
+                message: '请填写模版名称',
+              },
+            ]}
+            placeholder="请填写模版名称"
+            required
+          />
+          <ProFormText
+            width="md"
+            name="templateContent"
+            label="模版内容"
+            rules={[
+              {
+                required: true,
+                message: '请填写模版内容',
+              },
+            ]}
+            placeholder="请填写模版内容"
+            required
+          />
+        </ProForm.Group>
+      </ModalForm >
+    );
+  }
+}
+export default UpsertSmsTemplateModalForm;

+ 155 - 0
src/pages/message/sms/template/table/index.tsx

@@ -0,0 +1,155 @@
+import React, { useRef } from 'react';
+import { PageContainer } from '@ant-design/pro-layout';
+import { ProTable } from '@ant-design/pro-components';
+
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import { Button, Popconfirm, Spin, Tag } from 'antd';
+import UpsertSmsTemplateModalForm from './component/UpsertSmsTemplateModalForm';
+import { pageQuerySmsTemplate } from '@/services/op-admin/message/sms';
+import { PlusOutlined } from '@ant-design/icons';
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 短信模版列表
+ */
+const SmsTemplateTable: React.FC = () => {
+  /** 引用 */
+  const actionRef = useRef<ActionType>();
+
+  /** 列定义 */
+  const columns: ProColumns<SMS.Template>[] = [
+    {
+      title: '序号',
+      dataIndex: 'index',
+      valueType: 'indexBorder',
+      width: 48,
+    },
+    {
+      title: '模版名称',
+      dataIndex: 'templateName',
+    },
+    {
+      title: '模版内容',
+      dataIndex: 'templateContent',
+      search: false,
+    },
+    {
+      title: '创建人',
+      dataIndex: 'createUsername',
+      search: false,
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'gmtCreate',
+      search: false,
+    },
+    {
+      title: '修改人',
+      dataIndex: 'modifyUsername',
+      search: false,
+    },
+    {
+      title: '修改时间',
+      dataIndex: 'gmtModify',
+      search: false,
+    },
+    {
+      title: '状态',
+      dataIndex: 'status',
+      search: false,
+      render: (_, record) => {
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='orange'>草稿</Tag>]
+        }
+        if (record.status === 'ok') {
+          return [<Tag key='status' color='blue'>已启用</Tag>]
+        }
+        if (record.status === 'draft') {
+          return [<Tag key='status' color='red'>已停用</Tag>]
+        }
+        if (record.status === 'delete') {
+          return [<Tag key='status' color='purple'>已删除</Tag>]
+        }
+        return [<Tag key='status' color='#f50'>未知</Tag>]
+      }
+    },
+    {
+      title: '操作',
+      valueType: 'option',
+      width: '10%',
+      render: (_, record) => [
+        <UpsertSmsTemplateModalForm
+          key="edit"
+          trigger={
+            <a
+              key="edit"
+            >
+              编辑
+            </a>
+          }
+          callback={() => {
+            actionRef.current?.reload()
+          }}
+          data={record}
+        />
+        ,
+        <Popconfirm
+          key="delete"
+          title="确认删除此条记录?"
+          okText="确定"
+          cancelText="取消"
+          onConfirm={async () => {
+
+          }}
+        >
+          <Spin spinning={false} >
+            <a
+              key="delete"
+            >
+              删除
+            </a>
+          </Spin>
+        </Popconfirm>,
+      ],
+    },
+  ]
+  return (
+    <PageContainer
+      header={{
+        title: '',
+      }}
+    >
+      <ProTable<SMS.Template>
+        columns={columns}
+        cardBordered
+        actionRef={actionRef}
+        request={pageQuerySmsTemplate}
+        editable={{
+          type: 'multiple',
+        }}
+        rowKey="id"
+        search={{
+          labelWidth: 'auto',
+        }}
+        pagination={{
+          pageSize: 10,
+        }}
+        toolBarRender={() => [
+          <UpsertSmsTemplateModalForm
+            key="create"
+            trigger={
+              <Button key="create" type="primary" icon={<PlusOutlined />}>
+                创建短信签名
+              </Button>
+            }
+            callback={() => {
+              actionRef.current?.reload();
+            }}
+          />,
+        ]}
+        headerTitle="短信模版列表"
+      />
+    </PageContainer>
+  );
+}
+export default SmsTemplateTable;

+ 2 - 1
src/requestErrorConfig.ts

@@ -76,9 +76,10 @@ export const errorConfig: RequestConfig = {
         // Axios 的错误
         // 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
         console.log(`Response status:${error.response.status}`)
-        // message.error(`Response status:${error.response.status}`);
         if (error.response.status === 403) {
           history.push('/ui/login')
+        } else {
+          message.error("系统异常,请联系管理员!");
         }
       } else if (error.request) {
         // 请求已经成功发起,但没有收到响应

+ 4 - 4
src/services/op-admin/gateway/egress.ts

@@ -40,8 +40,8 @@ export async function saveEgressApi(data: UpsertApiModalFormItem, options?: { [k
 }
 
 /** 分页查询接出网关API通道 */
-export async function pageQueryEgressApiEndpoint(params?: any, options?: { [key: string]: any }) {
-    return request('/egress/api/endpoint/page', {
+export async function pageQueryEgressApiChannel(params?: any, options?: { [key: string]: any }) {
+    return request('/egress/api/channel/page', {
         method: 'GET',
         params: { ...params },
         ...(options || {}),
@@ -59,8 +59,8 @@ export async function loanApiIntegration(data: EGRESS.LoanApiIntegrationCmd, opt
 }
 
 /** 查询接出API通道 */
-export async function queryEgressApiEndpoint(params?: any, options?: { [key: string]: any }) {
-    return request('/egress/api/endpoint/list', {
+export async function queryEgressApiChannel(params?: any, options?: { [key: string]: any }) {
+    return request('/egress/api/channel/list', {
         method: 'GET',
         params: { ...params },
         ...(options || {}),

+ 4 - 4
src/services/op-admin/gateway/typings.d.ts

@@ -13,7 +13,7 @@ declare namespace EGRESS {
     }
 
     /** API通道数据项 */
-    type ApiEndpointItem = {
+    type ApiChannelItem = {
         /** ID */
         id: string,
         /** API ID */
@@ -21,7 +21,7 @@ declare namespace EGRESS {
         /** API名称 */
         apiName: string,
         /** 通道名称 */
-        endpointName: string,
+        channelName: string,
         /** 通道对接方式 */
         integrationMode: string,
         /** 创建人 */
@@ -35,7 +35,7 @@ declare namespace EGRESS {
     }
 
     /** API通道http配置 */
-    type ApiEndpointHttpConfig = {
+    type ApiChannelHttpConfig = {
         /** 方法 */
         method: string,
         /** url */
@@ -70,6 +70,6 @@ declare namespace EGRESS {
         checkinto?: any,
         /** 申请通道配置 */
         apply?: any,
-        // apply?: ApiEndpointHttpConfig,
+        // apply?: ApiChannelHttpConfig,
     }
 }

+ 166 - 0
src/services/op-admin/message/sms.ts

@@ -0,0 +1,166 @@
+// @ts-ignore
+/* eslint-disable */
+import { request } from 'umi';
+
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc sms 后端请求方法定义
+ */
+
+/** 分页查询短信签名 */
+export async function pageQuerySmsSign(params: any, options?: { [key: string]: any }) {
+    return request('/sms/sign/page', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 查询短信签名 */
+export async function querySmsSign(params?: any, options?: { [key: string]: any }) {
+    return request('/sms/sign/list', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 更新/插入短信签名 */
+export async function upsertSmsSign(data: SMS.SignatureUpsertCmd, options?: { [key: string]: any }) {
+    return request('/sms/sign/upsert', {
+        method: 'POST',
+        data: {
+            ...data,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 分页查询短信模版 */
+export async function pageQuerySmsTemplate(params: any, options?: { [key: string]: any }) {
+    return request('/sms/template/page', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 查询短信模版 */
+export async function querySmsTemplate(params?: any, options?: { [key: string]: any }) {
+    return request('/sms/template/list', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 更新/插入短信模版 */
+export async function upsertSmsTemplate(data: SMS.TemplateUpsertCmd, options?: { [key: string]: any }) {
+    return request('/sms/template/upsert', {
+        method: 'POST',
+        data: {
+            ...data,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 分页查询短信服务 */
+export async function pageQuerySmsService(params: any, options?: { [key: string]: any }) {
+    return request('/sms/service/page', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 更新/插入短信服务 */
+export async function upsertSmsService(data: SMS.ServiceUpsertCmd, options?: { [key: string]: any }) {
+    return request('/sms/service/upsert', {
+        method: 'POST',
+        data: {
+            ...data,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 分页查询短信平台 */
+export async function pageQuerySmsPlatform(params: any, options?: { [key: string]: any }) {
+    return request('/sms/platform/page', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 查询短信平台 */
+export async function querySmsPlatform(params?: any, options?: { [key: string]: any }) {
+    return request('/sms/platform/list', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 更新/插入短信平台 */
+export async function upsertSmsPlatform(data: SMS.PlatformUpsertCmd, options?: { [key: string]: any }) {
+    return request('/sms/platform/upsert', {
+        method: 'POST',
+        data: {
+            ...data,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 分页查询短信通道 */
+export async function pageQuerySmsChannel(params: any, options?: { [key: string]: any }) {
+    return request('/sms/channel/page', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 分页查询短信通道 */
+export async function querySmsChannel(params: any, options?: { [key: string]: any }) {
+    return request('/sms/channel/list', {
+        method: 'GET',
+        params: {
+            ...params,
+        },
+        ...(options || {}),
+    });
+}
+
+/** 更新/插入短信通道 */
+export async function upsertSmsChannel(data: SMS.ChannelUpsertCmd, options?: { [key: string]: any }) {
+    return request('/sms/channel/upsert', {
+        method: 'POST',
+        data: {
+            ...data,
+        },
+        ...(options || {}),
+    });
+}
+
+
+

+ 154 - 0
src/services/op-admin/message/typings.d.ts

@@ -0,0 +1,154 @@
+/**
+ * @author bianlanzhou
+ * @since 2024-11-06
+ * @desc 消息中心-短信-数据对象类型定义
+ */
+
+declare namespace SMS {
+    /** 短信签名 */
+    type Signature = {
+        /** 主键 */
+        id: string,
+        /** 签名名称 */
+        signatureName: string,
+        /** 签名内容 */
+        signatureContent: string,
+        /** 创建人名称 */
+        createUsername: string,
+        /** 更新人名称 */
+        modifyUsername: string,
+        /** 状态 */
+        status: string,
+    }
+    /** 短信签名upsert cmd */
+    type SignatureUpsertCmd = {
+        /** 主键 */
+        id: string,
+        /** 签名名称 */
+        signatureName: string,
+        /** 签名内容 */
+        signatureContent: string,
+    }
+    /** 短信模版 */
+    type Template = {
+        /** 主键 */
+        id: string,
+        /** 签名名称 */
+        templateName: string,
+        /** 签名内容 */
+        templateContent: string,
+        /** 创建人名称 */
+        createUsername: string,
+        /** 更新人名称 */
+        modifyUsername: string,
+        /** 状态 */
+        status: string,
+        /** 版本 */
+        version: string,
+    }
+
+    /** 短信模版upsert cmd */
+    type TemplateUpsertCmd = {
+        /** 主键 */
+        id: string,
+        /** 签名名称 */
+        templateName: string,
+        /** 签名内容 */
+        templateContent: string,
+    }
+
+    /** 短信服务 */
+    type Service = {
+        /** 主键 */
+        id: string,
+        /** 短信服务名称 */
+        templateName: string,
+        /** 服务编码 */
+        templateCode: string,
+        /** 创建人名称 */
+        createUsername: string,
+        /** 更新人名称 */
+        modifyUsername: string,
+        /** 状态 */
+        status: string,
+    }
+
+    /** 短信服务upsert cmd */
+    type ServiceUpsertCmd = {
+        /** 主键 */
+        id: string,
+        /** 服务名称 */
+        serviceName: string,
+        /** api id */
+        apiId: string,
+        /** 通道编码 */
+        channelCode: string,
+        /** 签名ID */
+        signatureId: string,
+        /** 模版ID */
+        templateId: string,
+    }
+
+
+    /** 短信平台 */
+    type Platform = {
+        /** 主键 */
+        id: string,
+        /** 平台名称 */
+        platformName: string,
+        /** 创建人名称 */
+        createUsername: string,
+        /** 创建时间 */
+        gmtCreate: string,
+        /** 更新人名称 */
+        modifyUsername: string,
+        /** 修改时间 */
+        gmtModify: string,
+        /** 状态 */
+        status: string,
+    }
+
+    /** 短信平台upsert cmd */
+    type PlatformUpsertCmd = {
+        /** 主键 */
+        id: string,
+        /** 平台名称 */
+        platformName: string,
+    }
+
+
+    /** 短信通道 */
+    type Channel = {
+        /** 主键 */
+        id: string,
+        /** 平台ID */
+        platformId: string,
+        /** 关联API ID */
+        apiId: string,
+        /** 通道名称 */
+        channelName: string,
+        /** 创建人名称 */
+        createUsername: string,
+        /** 创建时间 */
+        gmtCreate: string,
+        /** 更新人名称 */
+        modifyUsername: string,
+        /** 修改时间 */
+        gmtModify: string,
+        /** 状态 */
+        status: string,
+    }
+
+    /** 短信通道 upsert cmd */
+    type ChannelUpsertCmd = {
+        /** 主键 */
+        id: string,
+        /** 通道名称 */
+        channelName: string,
+        /** api通道ID */
+        apiChannelId: string,
+        /** 短信平台ID */
+        platformId: string,
+    }
+
+}