From 31143ab53b6905e439d388a8c39f11ceb775f8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Sun, 7 Apr 2024 17:10:30 +0800 Subject: [PATCH 001/118] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=9A=84=E8=8B=A5=E4=BE=9D=E4=B8=BA"SAC",=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=99=BD=E5=90=8D=E5=8D=95=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E6=96=B0=E5=A2=9E=EF=BC=8C=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=E7=AE=A1=E7=90=86=EF=BC=8C=E5=AE=89=E8=A3=85=E5=8C=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E=E7=9A=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/.env.development | 4 +- sf-ui/.env.production | 4 +- sf-ui/.env.staging | 4 +- sf-ui/package.json | 4 +- .../src/views/FDS/channelManagement/index.vue | 377 ++++++++++++++++++ .../src/views/FDS/installationList/index.vue | 368 +++++++++++++++++ .../views/FDS/whiteListManagement/index.vue | 377 ++++++++++++++++++ sf-ui/src/views/index.vue | 14 +- sf-ui/src/views/login.vue | 2 +- sf-ui/src/views/register.vue | 2 +- sf-ui/vue.config.js | 4 +- 11 files changed, 1141 insertions(+), 19 deletions(-) create mode 100644 sf-ui/src/views/FDS/channelManagement/index.vue create mode 100644 sf-ui/src/views/FDS/installationList/index.vue create mode 100644 sf-ui/src/views/FDS/whiteListManagement/index.vue diff --git a/sf-ui/.env.development b/sf-ui/.env.development index 18b2a3e..b2d594f 100644 --- a/sf-ui/.env.development +++ b/sf-ui/.env.development @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = SAC管理系统 # 开发环境配置 ENV = 'development' -# 若依管理系统/开发环境 +# SAC管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' # 路由懒加载 diff --git a/sf-ui/.env.production b/sf-ui/.env.production index cb064ec..cbbe0e4 100644 --- a/sf-ui/.env.production +++ b/sf-ui/.env.production @@ -1,8 +1,8 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = SAC管理系统 # 生产环境配置 ENV = 'production' -# 若依管理系统/生产环境 +# SAC管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/sf-ui/.env.staging b/sf-ui/.env.staging index a47af9a..b55b86d 100644 --- a/sf-ui/.env.staging +++ b/sf-ui/.env.staging @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = SAC管理系统 NODE_ENV = production # 测试环境配置 ENV = 'staging' -# 若依管理系统/测试环境 +# SAC管理系统/测试环境 VUE_APP_BASE_API = '/stage-api' diff --git a/sf-ui/package.json b/sf-ui/package.json index 255259d..060a9b0 100644 --- a/sf-ui/package.json +++ b/sf-ui/package.json @@ -1,8 +1,8 @@ { "name": "ruoyi", "version": "3.8.6", - "description": "若依管理系统", - "author": "若依", + "description": "SAC管理系统", + "author": "SAC", "license": "MIT", "scripts": { "dev": "vue-cli-service serve", diff --git a/sf-ui/src/views/FDS/channelManagement/index.vue b/sf-ui/src/views/FDS/channelManagement/index.vue new file mode 100644 index 0000000..efd9eea --- /dev/null +++ b/sf-ui/src/views/FDS/channelManagement/index.vue @@ -0,0 +1,377 @@ + + + diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue new file mode 100644 index 0000000..03ef63b --- /dev/null +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -0,0 +1,368 @@ + + + diff --git a/sf-ui/src/views/FDS/whiteListManagement/index.vue b/sf-ui/src/views/FDS/whiteListManagement/index.vue new file mode 100644 index 0000000..efd9eea --- /dev/null +++ b/sf-ui/src/views/FDS/whiteListManagement/index.vue @@ -0,0 +1,377 @@ + + + diff --git a/sf-ui/src/views/index.vue b/sf-ui/src/views/index.vue index caa90af..f7ec05c 100644 --- a/sf-ui/src/views/index.vue +++ b/sf-ui/src/views/index.vue @@ -39,9 +39,9 @@ -

若依后台管理框架

+

SAC后台管理框架

- 一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 + 一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了SAC管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。

当前版本: v{{ version }} @@ -120,21 +120,21 @@

QQ群: 满937441 满887144332 满180251782 满104180207 满186866453 满201396349 - 满101456076 满101539465 满264312783 满167385320 - 满104748341 满160110482 满170801498 满108482800 + 满101456076 满101539465 满264312783 满167385320 + 满104748341 满160110482 满170801498 满108482800 满101046199 满136919097 143961921

微信:/ *若依/ *SAC

支付宝:/ *若依/ *SAC

@@ -913,7 +913,7 @@
    -
  1. 若依前后端分离系统正式发布
  2. +
  3. SAC前后端分离系统正式发布
diff --git a/sf-ui/src/views/login.vue b/sf-ui/src/views/login.vue index cdae8dc..59b2841 100644 --- a/sf-ui/src/views/login.vue +++ b/sf-ui/src/views/login.vue @@ -1,7 +1,7 @@ @@ -139,8 +137,8 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - - + + @@ -164,9 +162,6 @@ - - - @@ -190,12 +185,61 @@ + + + + + + + + + + + + + + + + + 离线上传 + 安装包11111 + + + 安装包1111.excel + 58.1kb + + + 安卓 + 兼容性信息 + + + 授权信息内容 + 安装包源内容 + + + 备注信息备注信息 + + + 上传时间2024-04-07 17:43 + 已上传 + 刮刮乐 + 日志日志 + + + + + + @@ -203,7 +247,7 @@ import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config"; export default { - name: "Config", + name: "installationList", dicts: ['sys_yes_no'], data() { return { @@ -223,10 +267,10 @@ export default { configList: [], // 弹出层标题 title: "", - // 是否显示新增白名单弹出框 + // 是否显示安装包上传弹出框 addOpen: false, - // 是否显示白名单配置弹出框 - configOpen:false, + // 是否显示安装包详情弹出框 + detailOpen:false, // 日期范围 dateRange: [], // 查询参数 @@ -242,14 +286,11 @@ export default { // 表单校验 rules: { configName: [ - { required: true, message: "参数名称不能为空", trigger: "blur" } + { required: true, message: "上传方式不能为空", trigger: "change" } ], configKey: [ - { required: true, message: "参数键名不能为空", trigger: "blur" } + { required: true, message: "安装包名称不能为空", trigger: "blur" } ], - configValue: [ - { required: true, message: "参数键值不能为空", trigger: "blur" } - ] } }; }, @@ -303,7 +344,7 @@ export default { handleAdd() { this.reset(); this.addOpen = true; - this.title = "新增白名单"; + this.title = "上传安装包"; }, // 多选框选中数据 handleSelectionChange(selection) { From 891571492cc1d9bfc7d9dab5fbbc2264405b00a2 Mon Sep 17 00:00:00 2001 From: akun <957746831@qq.com> Date: Mon, 8 Apr 2024 11:15:16 +0800 Subject: [PATCH 003/118] =?UTF-8?q?dockerfile=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 ++++++ sf-ui/Dockerfile | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 Dockerfile create mode 100644 sf-ui/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c41a1d3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM registry.etest.tf.cn/base/jdk:v20191019 +# 复制jar文件到路径 +COPY ./sf-admin/target/sf-admin.jar /usr/local/sf-admin.jar +# 指定路径 +WORKDIR /usr/local + diff --git a/sf-ui/Dockerfile b/sf-ui/Dockerfile new file mode 100644 index 0000000..73e5a8c --- /dev/null +++ b/sf-ui/Dockerfile @@ -0,0 +1,3 @@ +FROM registry.zsmarter.com/public/nginx:1.22.1 +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories +COPY ./sf-ui/dist /app/nginx/html From 50878a411bf1ab47e81b59465b94b443097db79d Mon Sep 17 00:00:00 2001 From: akun <957746831@qq.com> Date: Mon, 8 Apr 2024 11:21:12 +0800 Subject: [PATCH 004/118] =?UTF-8?q?dockerfile=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c41a1d3..9e25db0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.etest.tf.cn/base/jdk:v20191019 +FROM openjdk:8 # 复制jar文件到路径 COPY ./sf-admin/target/sf-admin.jar /usr/local/sf-admin.jar # 指定路径 From b9b10afce8107992e3ed15c637736dd3eb69e99a Mon Sep 17 00:00:00 2001 From: akun <957746831@qq.com> Date: Mon, 8 Apr 2024 14:01:32 +0800 Subject: [PATCH 005/118] =?UTF-8?q?dockerfile=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 9e25db0..bc2de8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,3 +4,4 @@ COPY ./sf-admin/target/sf-admin.jar /usr/local/sf-admin.jar # 指定路径 WORKDIR /usr/local +ENTRYPOINT ["java","-jar","sf-admin.jar"] \ No newline at end of file From 02253789e855544a51235bfa1c5974f244f84400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Mon, 8 Apr 2024 14:07:00 +0800 Subject: [PATCH 006/118] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=88=97=E8=A1=A8=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E5=92=8C=E5=AE=89=E8=A3=85=E5=8C=85=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/api/FDS/whiteList.js | 13 ++ .../src/views/FDS/installationList/index.vue | 167 +++++++++++------- .../index.vue | 53 +++--- .../views/FDS/whiteListManagement/index.vue | 130 ++++++++------ 4 files changed, 227 insertions(+), 136 deletions(-) create mode 100644 sf-ui/src/api/FDS/whiteList.js rename sf-ui/src/views/FDS/{channelManagement => publishList}/index.vue (87%) diff --git a/sf-ui/src/api/FDS/whiteList.js b/sf-ui/src/api/FDS/whiteList.js new file mode 100644 index 0000000..96b925c --- /dev/null +++ b/sf-ui/src/api/FDS/whiteList.js @@ -0,0 +1,13 @@ +import request from '@/utils/request' + + + +export function Document11691998078000list(query) { + return request({ + url: '/forms/api/router/get/Document11691998078000list', + method: 'get', + params: query + }) +} + + diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue index d7554b1..c509aa0 100644 --- a/sf-ui/src/views/FDS/installationList/index.vue +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -1,26 +1,37 @@ - diff --git a/sf-ui/src/views/FDS/channelManagement/index.vue b/sf-ui/src/views/FDS/publishList/index.vue similarity index 87% rename from sf-ui/src/views/FDS/channelManagement/index.vue rename to sf-ui/src/views/FDS/publishList/index.vue index efd9eea..a4932bb 100644 --- a/sf-ui/src/views/FDS/channelManagement/index.vue +++ b/sf-ui/src/views/FDS/publishList/index.vue @@ -1,26 +1,27 @@ diff --git a/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue b/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue new file mode 100644 index 0000000..dbb9e8c --- /dev/null +++ b/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue @@ -0,0 +1,219 @@ + + diff --git a/sf-ui/src/views/FDS/whiteListManagement/index.vue b/sf-ui/src/views/FDS/whiteListManagement/index.vue index f1a77d2..66abde6 100644 --- a/sf-ui/src/views/FDS/whiteListManagement/index.vue +++ b/sf-ui/src/views/FDS/whiteListManagement/index.vue @@ -141,6 +141,16 @@ @click="handleEdit(scope.row)" >修改 + + 详情 + + - - + From 8fb318f5d95fef60255f87564d0108c0b0fe04ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Thu, 11 Apr 2024 09:22:50 +0800 Subject: [PATCH 020/118] =?UTF-8?q?feat:=20=E6=8F=90=E4=BA=A4=E7=83=AD?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/FDS/whiteListManagement/index.vue | 22 +- sf-ui/src/views/index.vue | 949 +----------------- 2 files changed, 9 insertions(+), 962 deletions(-) diff --git a/sf-ui/src/views/FDS/whiteListManagement/index.vue b/sf-ui/src/views/FDS/whiteListManagement/index.vue index 66abde6..0fb6fc5 100644 --- a/sf-ui/src/views/FDS/whiteListManagement/index.vue +++ b/sf-ui/src/views/FDS/whiteListManagement/index.vue @@ -110,13 +110,6 @@ @click="handleDown(scope.row)" >下架 - 预览 - { }) }, - /** 预览按钮操作 */ - handleView() { - const configIds = row.configId || this.ids - this.$modal.confirm('是否确认预览编号为"' + configIds + '"的数据项?').then(function() { - //这里写发布操作 - return delConfig(configIds) - }).then(() => { - this.getList() - this.$modal.msgSuccess('预览成功') - }).catch(() => { - }) - }, - + + /** 查看详情按钮操作 */ handleDetail(row) { if (row.type == 1) { diff --git a/sf-ui/src/views/index.vue b/sf-ui/src/views/index.vue index f7ec05c..784e888 100644 --- a/sf-ui/src/views/index.vue +++ b/sf-ui/src/views/index.vue @@ -1,963 +1,26 @@ - diff --git a/sf-ui/src/views/deploy/INFO/index.vue b/sf-ui/src/views/deploy/INFO/index.vue new file mode 100644 index 0000000..797a3b0 --- /dev/null +++ b/sf-ui/src/views/deploy/INFO/index.vue @@ -0,0 +1,332 @@ + + diff --git a/sf-ui/src/views/goods/goods/index.vue b/sf-ui/src/views/goods/goods/index.vue new file mode 100644 index 0000000..819c794 --- /dev/null +++ b/sf-ui/src/views/goods/goods/index.vue @@ -0,0 +1,348 @@ + + + From 2623d5634087d78d2bf5ee756bf75e4dd0f02a4a Mon Sep 17 00:00:00 2001 From: pengren Date: Thu, 11 Apr 2024 13:51:18 +0800 Subject: [PATCH 023/118] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-163=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9A=E6=88=91=E7=9A=84=E8=B4=AD=E4=B9=B0?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8E=E5=AE=89=E8=A3=85=E5=8C=85=E5=90=8E?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-admin/pom.xml | 8 +- .../mapper/deploy/SysApkInfoMapper.xml | 113 ++++++ .../mapper/goods/GoodsMessagesMapper.xml | 118 ++++++ .../mapper/index/ApplyListInfoMapper.xml | 87 +++++ .../common/exception/BusinessException.java | 77 ++++ .../sf/common/utils/SnowflakeIdWorker.java | 152 ++++++++ sf-order/pom.xml | 34 ++ .../java/com/sf/order/domain/OrderInfo.java | 367 ++++++++++++++++++ .../sf/order/domain/dto/OrderCreateDto.java | 59 +++ .../sf/order/domain/req/OrderListreqVo.java | 22 ++ .../sf/order/domain/res/OrderListResVo.java | 53 +++ .../com/sf/order/mapper/OrderInfoMapper.java | 67 ++++ .../sf/order/service/IOrderInfoService.java | 73 ++++ .../service/impl/OrderInfoServiceImpl.java | 137 +++++++ .../mapper/order/OrderInfoMapper.xml | 172 ++++++++ sf-ui/src/api/deploy/INFO.js | 44 +++ sf-ui/src/api/goods/goods.js | 44 +++ sf-ui/src/views/deploy/INFO/add.vue | 199 ++++++++++ sf-ui/src/views/deploy/INFO/index.vue | 332 ++++++++++++++++ sf-ui/src/views/goods/goods/index.vue | 348 +++++++++++++++++ 20 files changed, 2505 insertions(+), 1 deletion(-) create mode 100644 sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml create mode 100644 sf-admin/src/main/resources/mapper/goods/GoodsMessagesMapper.xml create mode 100644 sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml create mode 100644 sf-common/src/main/java/com/sf/common/exception/BusinessException.java create mode 100644 sf-common/src/main/java/com/sf/common/utils/SnowflakeIdWorker.java create mode 100644 sf-order/pom.xml create mode 100644 sf-order/src/main/java/com/sf/order/domain/OrderInfo.java create mode 100644 sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java create mode 100644 sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java create mode 100644 sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java create mode 100644 sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java create mode 100644 sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java create mode 100644 sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java create mode 100644 sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml create mode 100644 sf-ui/src/api/deploy/INFO.js create mode 100644 sf-ui/src/api/goods/goods.js create mode 100644 sf-ui/src/views/deploy/INFO/add.vue create mode 100644 sf-ui/src/views/deploy/INFO/index.vue create mode 100644 sf-ui/src/views/goods/goods/index.vue diff --git a/sf-admin/pom.xml b/sf-admin/pom.xml index 1f2a15f..781eeae 100644 --- a/sf-admin/pom.xml +++ b/sf-admin/pom.xml @@ -60,7 +60,13 @@ com.smarterFramework sf-file - + + com.smarterFramework + sf-order + 1.0.0 + compile + + diff --git a/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml b/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml new file mode 100644 index 0000000..d1a60cf --- /dev/null +++ b/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO + + + + + + + + insert into SYS_APK_INFO + + uploading_type, + sys_apk_name, + version, + sys_apk, + sys_apk_size, + sys_type, + uploading_status, + uploading_log_id, + order_num, + is_delete, + created, + modified, + create_time, + update_time, + + + #{uploadingType}, + #{sysApkName}, + #{version}, + #{sysApk}, + #{sysApkSize}, + #{sysType}, + #{uploadingStatus}, + #{uploadingLogId}, + #{orderNum}, + #{isDelete}, + #{created}, + #{modified}, + #{createTime}, + #{updateTime}, + + + + + update SYS_APK_INFO + + uploading_type = #{uploadingType}, + sys_apk_name = #{sysApkName}, + version = #{version}, + sys_apk = #{sysApk}, + sys_apk_size = #{sysApkSize}, + sys_type = #{sysType}, + uploading_status = #{uploadingStatus}, + uploading_log_id = #{uploadingLogId}, + order_num = #{orderNum}, + is_delete = #{isDelete}, + created = #{created}, + modified = #{modified}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from SYS_APK_INFO where id = #{id} + + + + delete from SYS_APK_INFO where id in + + #{id} + + + \ No newline at end of file diff --git a/sf-admin/src/main/resources/mapper/goods/GoodsMessagesMapper.xml b/sf-admin/src/main/resources/mapper/goods/GoodsMessagesMapper.xml new file mode 100644 index 0000000..ffa20fa --- /dev/null +++ b/sf-admin/src/main/resources/mapper/goods/GoodsMessagesMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, goods_code, stock_id, review_status, product_title, product_picture, original_price, product_desc, order_num, is_delete, created, modified, create_time, update_time, goods_type, goods_spec from GOODS_MESSAGES + + + + + + + + + insert into GOODS_MESSAGES + + goods_code, + stock_id, + review_status, + product_title, + product_picture, + original_price, + product_desc, + order_num, + is_delete, + created, + modified, + create_time, + update_time, + goods_type, + goods_spec, + + + #{goodsCode}, + #{stockId}, + #{reviewStatus}, + #{productTitle}, + #{productPicture}, + #{originalPrice}, + #{productDesc}, + #{orderNum}, + #{isDelete}, + #{created}, + #{modified}, + #{createTime}, + #{updateTime}, + #{goodsType}, + #{goodsSpec}, + + + + + update GOODS_MESSAGES + + goods_code = #{goodsCode}, + stock_id = #{stockId}, + review_status = #{reviewStatus}, + product_title = #{productTitle}, + product_picture = #{productPicture}, + original_price = #{originalPrice}, + product_desc = #{productDesc}, + order_num = #{orderNum}, + is_delete = #{isDelete}, + created = #{created}, + modified = #{modified}, + create_time = #{createTime}, + update_time = #{updateTime}, + goods_type = #{goodsType}, + goods_spec = #{goodsSpec}, + + where id = #{id} + + + + delete from GOODS_MESSAGES where id = #{id} + + + + delete from GOODS_MESSAGES where id in + + #{id} + + + \ No newline at end of file diff --git a/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml b/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml new file mode 100644 index 0000000..9bac81d --- /dev/null +++ b/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + select id, app_name, app_desc, picture, order_num, is_delete, created, modified, create_time, update_time from APPLY_LIST_INFO + + + + + + + + insert into APPLY_LIST_INFO + + app_name, + app_desc, + picture, + order_num, + is_delete, + created, + modified, + create_time, + update_time, + + + #{appName}, + #{appDesc}, + #{picture}, + #{orderNum}, + #{isDelete}, + #{created}, + #{modified}, + #{createTime}, + #{updateTime}, + + + + + update APPLY_LIST_INFO + + app_name = #{appName}, + app_desc = #{appDesc}, + picture = #{picture}, + order_num = #{orderNum}, + is_delete = #{isDelete}, + created = #{created}, + modified = #{modified}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from APPLY_LIST_INFO where id = #{id} + + + + delete from APPLY_LIST_INFO where id in + + #{id} + + + \ No newline at end of file diff --git a/sf-common/src/main/java/com/sf/common/exception/BusinessException.java b/sf-common/src/main/java/com/sf/common/exception/BusinessException.java new file mode 100644 index 0000000..26ba14a --- /dev/null +++ b/sf-common/src/main/java/com/sf/common/exception/BusinessException.java @@ -0,0 +1,77 @@ +package com.sf.common.exception; + + +import com.sf.common.enums.ErrorCodeTypeEnum; + +/** + * @author : yswjme@163.com + * @Title : BusinessException.java + * @Package : com.zsmarter.ai.word.exception + * @Descript : 业务运行时异常 + * @date : 2020-06-29 04:59:44 + * @vsersion : V1.0 + */ +public class BusinessException extends RuntimeException { + + private static final long serialVersionUID = 4693786499059513760L; + + private ErrorCodeTypeEnum errorCodeTypeEnum; + + private final String errorDescription; + + private String errorCode; + + public BusinessException(String errorDescription) { + super(errorDescription); + this.errorDescription = errorDescription; + } + + public BusinessException(String errorDescription, Throwable t) { + super(errorDescription, t); + this.errorDescription = errorDescription; + } + + public BusinessException(String code, String errorDescription) { + super(errorDescription); + this.errorDescription = errorDescription; + this.errorCode = code; + } + + public BusinessException(String code, String errorDescription, Throwable t) { + super(errorDescription, t); + this.errorDescription = errorDescription; + this.errorCode = code; + } + + public BusinessException(ErrorCodeTypeEnum errorCodeTypeEnum, String code, String errorDescription) { + super(errorDescription); + this.errorDescription = errorDescription; + this.errorCode = code; + this.errorCodeTypeEnum = errorCodeTypeEnum; + } + + public BusinessException(ErrorCodeTypeEnum errorCodeTypeEnum, String code, String errorDescription, Throwable t) { + super(errorDescription, t); + this.errorDescription = errorDescription; + this.errorCode = code; + this.errorCodeTypeEnum = errorCodeTypeEnum; + } + + public String getErrorDescription() { + return this.errorDescription; + } + + public String getErrorCode() { + return errorCode; + } + + public String getErrorTitle() { + return "业务校验失败!"; + } + + public ErrorCodeTypeEnum getErrorCodeTypeEnum() { + return errorCodeTypeEnum; + } + + +} diff --git a/sf-common/src/main/java/com/sf/common/utils/SnowflakeIdWorker.java b/sf-common/src/main/java/com/sf/common/utils/SnowflakeIdWorker.java new file mode 100644 index 0000000..31257ae --- /dev/null +++ b/sf-common/src/main/java/com/sf/common/utils/SnowflakeIdWorker.java @@ -0,0 +1,152 @@ +package com.sf.common.utils; + + +import org.springframework.stereotype.Component; + +/** + * Tiwtter.SnowFlake的结构如下(每部分用-分开):
+ * 0 - 0000000000 0000000000 0000000000 0000000000 0 - 00000 - 00000 - 000000000000
+ * 1位标识,由于long基本类型在Java中是带符号的,最高位是符号位,正数是0,负数是1,所以id一般是正数,最高位是0
+ * 41位时间截(毫秒级),注意,41位时间截不是存储当前时间的时间截,而是存储时间截的差值(当前时间截 - 开始时间截) + * 得到的值),这里的的开始时间截,一般是我们的id生成器开始使用的时间,由我们程序来指定的(如下下面程序IdWorker类的startTime属性)。41位的时间截,可以使用69年,年T = (1L << 41) / (1000L * 60 * 60 * 24 * 365) = 69
+ * 10位的数据机器位,可以部署在1024个节点,包括5位datacenterId和5位workerId
+ * 12位序列,毫秒内的计数,12位的计数顺序号支持每个节点每毫秒(同一机器,同一时间截)产生4096个ID序号
+ * 加起来刚好64位,为一个Long型。
+ * SnowFlake的优点是,整体上按照时间自增排序,并且整个分布式系统内不会产生ID碰撞(由数据中心ID和机器ID作区分),并且效率较高,经测试,SnowFlake每秒能够产生26万ID左右。 + * @author yswjme@163.com + * @date : + * + */ +@Component +public class SnowflakeIdWorker { + + /** 开始时间截 (2018-01-01) ,不可修改 */ + private final long twepoch = 1420041600000L; + + /** 机器id所占的位数 */ + private final long workerIdBits = 5L; + + /** 数据标识id所占的位数 */ + private final long datacenterIdBits = 5L; + + /** 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) */ + private final long maxWorkerId = -1L ^ (-1L << workerIdBits); + + /** 支持的最大数据标识id,结果是31 */ + private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); + + /** 序列在id中占的位数 */ + private final long sequenceBits = 12L; + + /** 机器ID向左移12位 */ + private final long workerIdShift = sequenceBits; + + /** 数据标识id向左移17位(12+5) */ + private final long datacenterIdShift = sequenceBits + workerIdBits; + + /** 时间截向左移22位(5+5+12) */ + private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; + + /** 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095) */ + private final long sequenceMask = -1L ^ (-1L << sequenceBits); + + /** 工作机器ID(0~31) */ + private long workerId; + + /** 数据中心ID(0~31) */ + private long datacenterId; + + /** 毫秒内序列(0~4095) */ + private long sequence = 0L; + + /** 上次生成ID的时间截 */ + private long lastTimestamp = -1L; + + /** + * 构造函数 + * + * @param workerId 工作ID (0~31) + * @param datacenterId 数据中心ID (0~31) + */ + public SnowflakeIdWorker(long workerId, long datacenterId) { + if (workerId > maxWorkerId || workerId < 0) { + throw new IllegalArgumentException(String.format( + "worker Id can't be greater than %d or less than 0", + maxWorkerId)); + } + if (datacenterId > maxDatacenterId || datacenterId < 0) { + throw new IllegalArgumentException(String.format( + "datacenter Id can't be greater than %d or less than 0", + maxDatacenterId)); + } + this.workerId = workerId; + this.datacenterId = datacenterId; + } + + public SnowflakeIdWorker() { + }; + + /** + * 获得下一个ID (该方法是线程安全的) + * + * @return SnowflakeId + */ + public synchronized long nextId() { + long timestamp = timeGen(); + + // 如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常 + if (timestamp < lastTimestamp) { + throw new RuntimeException( + String.format( + "Clock moved backwards. Refusing to generate id for %d milliseconds", + lastTimestamp - timestamp)); + } + + // 如果是同一时间生成的,则进行毫秒内序列 + if (lastTimestamp == timestamp) { + sequence = (sequence + 1) & sequenceMask; + // 毫秒内序列溢出 + if (sequence == 0) { + // 阻塞到下一个毫秒,获得新的时间戳 + timestamp = tilNextMillis(lastTimestamp); + } + }else {// 时间戳改变,毫秒内序列重置 + sequence = 0L; + } + + // 上次生成ID的时间截 + lastTimestamp = timestamp; + + // 移位并通过或运算拼到一起组成64位的ID + return ((timestamp - twepoch) << timestampLeftShift) // + | (datacenterId << datacenterIdShift) // + | (workerId << workerIdShift) // + | sequence; + } + + /** + * 阻塞到下一个毫秒,直到获得新的时间戳 + * + * @param lastTimestamp + * 上次生成ID的时间截 + * @return 当前时间戳 + */ + protected long tilNextMillis(long lastTimestamp) { + long timestamp = timeGen(); + while (timestamp <= lastTimestamp) { + timestamp = timeGen(); + } + return timestamp; + } + + /** + * 返回以毫秒为单位的当前时间 + * + * @return 当前时间(毫秒) + */ + protected long timeGen() { + return System.currentTimeMillis(); + } + + +} diff --git a/sf-order/pom.xml b/sf-order/pom.xml new file mode 100644 index 0000000..08b9c37 --- /dev/null +++ b/sf-order/pom.xml @@ -0,0 +1,34 @@ + + + + smarterFramework + com.smarterFramework + 1.0.0 + + 4.0.0 + + sf-order + + + order订单模块 + + + + + + + com.smarterFramework + sf-common + + + io.swagger.core.v3 + swagger-annotations + 2.1.2 + compile + + + + + \ No newline at end of file diff --git a/sf-order/src/main/java/com/sf/order/domain/OrderInfo.java b/sf-order/src/main/java/com/sf/order/domain/OrderInfo.java new file mode 100644 index 0000000..6e165a8 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/domain/OrderInfo.java @@ -0,0 +1,367 @@ +package com.sf.order.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.sf.common.annotation.Excel; +import com.sf.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 订单基础信息对象 ORDER_INFO + * + * @author ztzh + * @date 2024-04-09 + */ +public class OrderInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long id; + + /** + * 订单编号 + */ + @Excel(name = "订单编号") + private Long orderNo; + + /** + * 订单状态: + * 0:待支付 + * 1:已付款 + * 2:支付超时系统结束 + * 3:已完成 + */ + @Excel(name = "订单状态: 0:待支付 1:已付款 2:支付超时系统结束 3:已完成 ") + private Long orderStatus; + + /** + * 支付方式:0-点券 1-现金 + */ + @Excel(name = "支付方式:0-点券 1-现金") + private Long payType; + + /** + * 支付渠道(支付方式为现金时) + * 0:微信 + * 1:支付宝 + */ + @Excel(name = "支付渠道(支付方式为现金时) 0:微信 1:支付宝") + private Long payChannel; + + /** + * 订单金额 + */ + @Excel(name = "订单金额") + private Long orderAmt; + + /** + * 运费 + */ + @Excel(name = "运费") + private Long freightAmt; + + /** + * 总金额 + */ + @Excel(name = "总金额") + private Long payAmt; + + /** + * 实际支付金额 + */ + @Excel(name = "实际支付金额") + private Long reallyAmt; + + /** + * 收件方式 + * :0-自提 + * 1-快递 2-配送 + */ + @Excel(name = "收件方式:0-自提 1-快递 2-配送") + private Long receiveType; + + /** + * 商品Id + */ + @Excel(name = "商品Id") + private Long goodsId; + + /** + * 商户Id + */ + @Excel(name = "商户Id") + private Long businessId; + + /** + * 收货地址配置Id + */ + @Excel(name = "收货地址配置Id") + private Long receiveAddrId; + + /** + * 支付时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date payTime; + + /** + * 订单创建人 + */ + @Excel(name = "订单创建人") + private Long createUserId; + + /** + * 最后一次更新操作人 + */ + @Excel(name = "最后一次更新操作人") + private Long updateUserId; + + /** + * 逻辑删除标识 + * 0:未删除 + * 1:已删除 + */ + @Excel(name = "逻辑删除标识 0:未删除 1:已删除") + private Long isDelete; + + /** + * 快递单号 + */ + @Excel(name = "快递单号") + private String trackNo; + + /** + * 订单类型0:自动1:手动 + */ + @Excel(name = "订单类型0:自动1:手动") + private Long orderType; + + /** + * 平台外部订单号 + */ + @Excel(name = "平台外部订单号") + private Long outOrderNo; + + /** + * 平台支付返回值 + */ + @Excel(name = "平台支付返回值") + private String payData; + + /** + * 减免金额(优惠券抵扣) + */ + @Excel(name = "减免金额(优惠券抵扣)") + private Long reductionAmout; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setOrderNo(Long orderNo) { + this.orderNo = orderNo; + } + + public Long getOrderNo() { + return orderNo; + } + + public void setOrderStatus(Long orderStatus) { + this.orderStatus = orderStatus; + } + + public Long getOrderStatus() { + return orderStatus; + } + + public void setPayType(Long payType) { + this.payType = payType; + } + + public Long getPayType() { + return payType; + } + + public void setPayChannel(Long payChannel) { + this.payChannel = payChannel; + } + + public Long getPayChannel() { + return payChannel; + } + + public void setOrderAmt(Long orderAmt) { + this.orderAmt = orderAmt; + } + + public Long getOrderAmt() { + return orderAmt; + } + + public void setFreightAmt(Long freightAmt) { + this.freightAmt = freightAmt; + } + + public Long getFreightAmt() { + return freightAmt; + } + + public void setPayAmt(Long payAmt) { + this.payAmt = payAmt; + } + + public Long getPayAmt() { + return payAmt; + } + + public void setReallyAmt(Long reallyAmt) { + this.reallyAmt = reallyAmt; + } + + public Long getReallyAmt() { + return reallyAmt; + } + + public void setReceiveType(Long receiveType) { + this.receiveType = receiveType; + } + + public Long getReceiveType() { + return receiveType; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public Long getGoodsId() { + return goodsId; + } + + public void setBusinessId(Long businessId) { + this.businessId = businessId; + } + + public Long getBusinessId() { + return businessId; + } + + public void setReceiveAddrId(Long receiveAddrId) { + this.receiveAddrId = receiveAddrId; + } + + public Long getReceiveAddrId() { + return receiveAddrId; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + public Date getPayTime() { + return payTime; + } + + public void setCreateUserId(Long createUserId) { + this.createUserId = createUserId; + } + + public Long getCreateUserId() { + return createUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setIsDelete(Long isDelete) { + this.isDelete = isDelete; + } + + public Long getIsDelete() { + return isDelete; + } + + public void setTrackNo(String trackNo) { + this.trackNo = trackNo; + } + + public String getTrackNo() { + return trackNo; + } + + public void setOrderType(Long orderType) { + this.orderType = orderType; + } + + public Long getOrderType() { + return orderType; + } + + public void setOutOrderNo(Long outOrderNo) { + this.outOrderNo = outOrderNo; + } + + public Long getOutOrderNo() { + return outOrderNo; + } + + public void setPayData(String payData) { + this.payData = payData; + } + + public String getPayData() { + return payData; + } + + public void setReductionAmout(Long reductionAmout) { + this.reductionAmout = reductionAmout; + } + + public Long getReductionAmout() { + return reductionAmout; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("orderNo", getOrderNo()) + .append("orderStatus", getOrderStatus()) + .append("payType", getPayType()) + .append("payChannel", getPayChannel()) + .append("orderAmt", getOrderAmt()) + .append("freightAmt", getFreightAmt()) + .append("payAmt", getPayAmt()) + .append("reallyAmt", getReallyAmt()) + .append("receiveType", getReceiveType()) + .append("goodsId", getGoodsId()) + .append("businessId", getBusinessId()) + .append("receiveAddrId", getReceiveAddrId()) + .append("createTime", getCreateTime()) + .append("payTime", getPayTime()) + .append("createUserId", getCreateUserId()) + .append("updateUserId", getUpdateUserId()) + .append("isDelete", getIsDelete()) + .append("updateTime", getUpdateTime()) + .append("trackNo", getTrackNo()) + .append("orderType", getOrderType()) + .append("outOrderNo", getOutOrderNo()) + .append("payData", getPayData()) + .append("reductionAmout", getReductionAmout()) + .toString(); + } +} diff --git a/sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java b/sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java new file mode 100644 index 0000000..0359751 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java @@ -0,0 +1,59 @@ +package com.sf.order.domain.dto; + +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotNull; + +/** + * @author : ztzh + * @since : 2023/7/27 + */ +@Schema(description = "下单") +public class OrderCreateDto { + + @Schema(description = "商品id") + @NotNull(message = "商品id不能为空") + private Long goodsId; + + @Schema(description = "数量") + @NotNull(message = "数量不能唯恐") + private Long count; + + @Schema(description = "金额") + @NotNull(message = "金额不能为空") + private Long amount; + + @Schema(description = "用户id") + @NotNull(message = "用户id不能空") + private Long userId; + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } +} diff --git a/sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java b/sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java new file mode 100644 index 0000000..3cbbbd8 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java @@ -0,0 +1,22 @@ +package com.sf.order.domain.req; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class OrderListreqVo { + /** + * 主键id + */ + private Long userId; + + /** + * 订单类型 + */ + private Long orderStatus; + + private Integer pageSize; + + private Integer pageNo; + +} diff --git a/sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java b/sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java new file mode 100644 index 0000000..502a641 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java @@ -0,0 +1,53 @@ +package com.sf.order.domain.res; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 活动信息详情 + * + */ +@Data +@Schema(name = "OrderListResVo", description = "订单列表") +public class OrderListResVo { + /** + * 主键id + */ + private Long id; + + /** + * 订单编号 + */ + private String orderNo; + + /** + * 订单状态: + * 0:待支付 + * 1:已付款 + * 2:支付超时系统结束 + * 3:已完成 + */ + private Long orderStatus; + + /** + * 订单金额 + */ + private Long orderAmt; + + /** + * 商品标题 + */ + private String productTitle; + + /** + * 商品规格 + */ + private Integer goodsSpec; + /** + * 商品数量 + */ + private Integer goodsCount = 1; + +} diff --git a/sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java b/sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java new file mode 100644 index 0000000..b4f9f31 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java @@ -0,0 +1,67 @@ +package com.sf.order.mapper; + +import com.sf.order.domain.OrderInfo; +import com.sf.order.domain.req.OrderListreqVo; +import com.sf.order.domain.res.OrderListResVo; + +import java.util.List; + + +/** + * 订单基础信息Mapper接口 + * + * @author ztzh + * @date 2024-04-09 + */ +public interface OrderInfoMapper { + /** + * 查询订单基础信息 + * + * @param id 订单基础信息主键 + * @return 订单基础信息 + */ + public OrderInfo selectOrderInfoById(Long id); + + /** + * 查询订单基础信息列表 + * + * @param orderInfo 订单基础信息 + * @return 订单基础信息集合 + */ + public List selectOrderInfoList(OrderInfo orderInfo); + + + List queryList(OrderListreqVo vo); + + /** + * 新增订单基础信息 + * + * @param orderInfo 订单基础信息 + * @return 结果 + */ + public int insertOrderInfo(OrderInfo orderInfo); + + /** + * 修改订单基础信息 + * + * @param orderInfo 订单基础信息 + * @return 结果 + */ + public int updateOrderInfo(OrderInfo orderInfo); + + /** + * 删除订单基础信息 + * + * @param id 订单基础信息主键 + * @return 结果 + */ + public int deleteOrderInfoById(Long id); + + /** + * 批量删除订单基础信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOrderInfoByIds(Long[] ids); +} diff --git a/sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java b/sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java new file mode 100644 index 0000000..c63358f --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java @@ -0,0 +1,73 @@ +package com.sf.order.service; + + +import com.sf.order.domain.OrderInfo; +import com.sf.order.domain.dto.OrderCreateDto; +import com.sf.order.domain.req.OrderListreqVo; +import com.sf.order.domain.res.OrderListResVo; + +import java.util.List; + +/** + * 订单基础信息Service接口 + * + * @author ztzh + * @date 2024-04-09 + */ +public interface IOrderInfoService +{ + /** + * 查询订单基础信息 + * + * @param id 订单基础信息主键 + * @return 订单基础信息 + */ + public OrderInfo selectOrderInfoById(Long id); + + /** + * 查询订单基础信息列表 + * + * @param orderInfo 订单基础信息 + * @return 订单基础信息集合 + */ + public List selectOrderInfoList(OrderInfo orderInfo); + + /** + * 查询订单基础信息列表 + */ + List queryList(OrderListreqVo vo); + + /** + * 新增订单基础信息 + * + * @param orderInfo 订单基础信息 + * @return 结果 + */ + public int createOrder(OrderCreateDto orderInfo); + + /** + * 修改订单基础信息 + * + * @param orderInfo 订单基础信息 + * @return 结果 + */ + public int updateOrderInfo(OrderInfo orderInfo); + + /** + * 批量删除订单基础信息 + * + * @param ids 需要删除的订单基础信息主键集合 + * @return 结果 + */ + public int deleteOrderInfoByIds(Long[] ids); + + /** + * 删除订单基础信息信息 + * + * @param id 订单基础信息主键 + * @return 结果 + */ + public int deleteOrderInfoById(Long id); + + void orderPay(Long orderId); +} diff --git a/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java b/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java new file mode 100644 index 0000000..315b818 --- /dev/null +++ b/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java @@ -0,0 +1,137 @@ +package com.sf.order.service.impl; + +import java.util.List; + +import com.sf.common.exception.BusinessException; +import com.sf.common.utils.DateUtils; +import com.sf.common.utils.SnowflakeIdWorker; +import com.sf.order.domain.OrderInfo; +import com.sf.order.domain.dto.OrderCreateDto; +import com.sf.order.domain.req.OrderListreqVo; +import com.sf.order.domain.res.OrderListResVo; +import com.sf.order.mapper.OrderInfoMapper; +import com.sf.order.service.IOrderInfoService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * 订单基础信息Service业务层处理 + * + * @author ztzh + * @date 2024-04-09 + */ +@Service +public class OrderInfoServiceImpl implements IOrderInfoService +{ + @Resource + private OrderInfoMapper orderInfoMapper; + @Resource + private SnowflakeIdWorker snowflakeIdWorker; + + /** + * 查询订单基础信息 + * + * @param id 订单基础信息主键 + * @return 订单基础信息 + */ + @Override + public OrderInfo selectOrderInfoById(Long id) + { + return orderInfoMapper.selectOrderInfoById(id); + } + + /** + * 查询订单基础信息列表 + * + * @param orderInfo 订单基础信息 + * @return 订单基础信息 + */ + @Override + public List selectOrderInfoList(OrderInfo orderInfo) + { + return orderInfoMapper.selectOrderInfoList(orderInfo); + } + public List queryList(OrderListreqVo vo) + { + return orderInfoMapper.queryList(vo); + } + + /** + * 新增订单基础信息 + * + * @param orderCreateDto 订单基础信息 + * @return 结果 + */ + @Override + public int createOrder(OrderCreateDto orderCreateDto) + { + OrderInfo orderInfo = new OrderInfo(); + orderInfo.setOrderNo(snowflakeIdWorker.nextId()); + orderInfo.setPayType(0L); + orderInfo.setReceiveType(0L); + orderInfo.setOrderStatus(0l); + orderInfo.setCreateUserId(orderCreateDto.getUserId()); + orderInfo.setUpdateUserId(orderCreateDto.getUserId()); + orderInfo.setGoodsId(orderCreateDto.getGoodsId()); + orderInfo.setOrderAmt(orderCreateDto.getAmount()); + orderInfo.setPayAmt(orderCreateDto.getAmount()); + orderInfo.setCreateTime(DateUtils.getNowDate()); + orderInfo.setUpdateTime(DateUtils.getNowDate()); + return orderInfoMapper.insertOrderInfo(orderInfo); + } + + /** + * 修改订单基础信息 + * + * @param orderInfo 订单基础信息 + * @return 结果 + */ + @Override + public int updateOrderInfo(OrderInfo orderInfo) + { + orderInfo.setUpdateTime(DateUtils.getNowDate()); + return orderInfoMapper.updateOrderInfo(orderInfo); + } + @Override + public void orderPay(Long orderId) { + OrderInfo updateOrder = this.selectOrderInfoById(orderId); + if (updateOrder == null) { + throw new BusinessException("订单缺失!"); + } +// if (!OrderInfoConstant.ORDER_WAITING_FOR_PAYMENT.equals(orderInfo.getOrderStatus())) { +// throw new BusinessException("订单状态异常!"); +// } + updateOrder.setOrderStatus(1L); + updateOrder.setPayTime(DateUtils.getNowDate()); + // 修改订单状态 + if (1>this.updateOrderInfo(updateOrder)) { + throw new BusinessException("支付异常,请联系管理员!"); + } + } + + /** + * 批量删除订单基础信息 + * + * @param ids 需要删除的订单基础信息主键 + * @return 结果 + */ + @Override + public int deleteOrderInfoByIds(Long[] ids) + { + return orderInfoMapper.deleteOrderInfoByIds(ids); + } + + /** + * 删除订单基础信息信息 + * + * @param id 订单基础信息主键 + * @return 结果 + */ + @Override + public int deleteOrderInfoById(Long id) + { + return orderInfoMapper.deleteOrderInfoById(id); + } + +} diff --git a/sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml b/sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml new file mode 100644 index 0000000..811f46a --- /dev/null +++ b/sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, order_no, order_status, pay_type, pay_channel, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO + + + select id, order_no, order_status, pay_type, productTitle, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO + + + + + + + + + insert into ORDER_INFO + + id, + order_no, + order_status, + pay_type, + pay_channel, + order_amt, + freight_amt, + pay_amt, + really_amt, + receive_type, + goods_id, + business_id, + receive_addr_id, + create_time, + pay_time, + create_user_id, + update_user_id, + is_delete, + update_time, + track_no, + order_type, + out_order_no, + pay_data, + reduction_amout, + + + #{id}, + #{orderNo}, + #{orderStatus}, + #{payType}, + #{payChannel}, + #{orderAmt}, + #{freightAmt}, + #{payAmt}, + #{reallyAmt}, + #{receiveType}, + #{goodsId}, + #{businessId}, + #{receiveAddrId}, + #{createTime}, + #{payTime}, + #{createUserId}, + #{updateUserId}, + #{isDelete}, + #{updateTime}, + #{trackNo}, + #{orderType}, + #{outOrderNo}, + #{payData}, + #{reductionAmout}, + + + + + update ORDER_INFO + + order_no = #{orderNo}, + order_status = #{orderStatus}, + pay_type = #{payType}, + pay_channel = #{payChannel}, + order_amt = #{orderAmt}, + freight_amt = #{freightAmt}, + pay_amt = #{payAmt}, + really_amt = #{reallyAmt}, + receive_type = #{receiveType}, + goods_id = #{goodsId}, + business_id = #{businessId}, + receive_addr_id = #{receiveAddrId}, + create_time = #{createTime}, + pay_time = #{payTime}, + create_user_id = #{createUserId}, + update_user_id = #{updateUserId}, + is_delete = #{isDelete}, + update_time = #{updateTime}, + track_no = #{trackNo}, + order_type = #{orderType}, + out_order_no = #{outOrderNo}, + pay_data = #{payData}, + reduction_amout = #{reductionAmout}, + + where id = #{id} + + + + delete from ORDER_INFO where id = #{id} + + + + delete from ORDER_INFO where id in + + #{id} + + + \ No newline at end of file diff --git a/sf-ui/src/api/deploy/INFO.js b/sf-ui/src/api/deploy/INFO.js new file mode 100644 index 0000000..1a71d94 --- /dev/null +++ b/sf-ui/src/api/deploy/INFO.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询安装包管理(新)列表 +export function listINFO(query) { + return request({ + url: '/deploy/INFO/list', + method: 'get', + params: query + }) +} + +// 查询安装包管理(新)详细 +export function getINFO(id) { + return request({ + url: '/deploy/INFO/' + id, + method: 'get' + }) +} + +// 新增安装包管理(新) +export function addINFO(data) { + return request({ + url: '/deploy/INFO', + method: 'post', + data: data + }) +} + +// 修改安装包管理(新) +export function updateINFO(data) { + return request({ + url: '/deploy/INFO', + method: 'put', + data: data + }) +} + +// 删除安装包管理(新) +export function delINFO(id) { + return request({ + url: '/deploy/INFO/' + id, + method: 'delete' + }) +} diff --git a/sf-ui/src/api/goods/goods.js b/sf-ui/src/api/goods/goods.js new file mode 100644 index 0000000..68f58bc --- /dev/null +++ b/sf-ui/src/api/goods/goods.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询商品信息列表 +export function listGoods(query) { + return request({ + url: '/goods/goods/list', + method: 'get', + params: query + }) +} + +// 查询商品信息详细 +export function getGoods(id) { + return request({ + url: '/goods/goods/' + id, + method: 'get' + }) +} + +// 新增商品信息 +export function addGoods(data) { + return request({ + url: '/goods/goods', + method: 'post', + data: data + }) +} + +// 修改商品信息 +export function updateGoods(data) { + return request({ + url: '/goods/goods', + method: 'put', + data: data + }) +} + +// 删除商品信息 +export function delGoods(id) { + return request({ + url: '/goods/goods/' + id, + method: 'delete' + }) +} diff --git a/sf-ui/src/views/deploy/INFO/add.vue b/sf-ui/src/views/deploy/INFO/add.vue new file mode 100644 index 0000000..c9bc57b --- /dev/null +++ b/sf-ui/src/views/deploy/INFO/add.vue @@ -0,0 +1,199 @@ + + + diff --git a/sf-ui/src/views/deploy/INFO/index.vue b/sf-ui/src/views/deploy/INFO/index.vue new file mode 100644 index 0000000..797a3b0 --- /dev/null +++ b/sf-ui/src/views/deploy/INFO/index.vue @@ -0,0 +1,332 @@ + + diff --git a/sf-ui/src/views/goods/goods/index.vue b/sf-ui/src/views/goods/goods/index.vue new file mode 100644 index 0000000..819c794 --- /dev/null +++ b/sf-ui/src/views/goods/goods/index.vue @@ -0,0 +1,348 @@ + + + From cfee6f1704a811853b2c46c03ddbb30241742618 Mon Sep 17 00:00:00 2001 From: pengren Date: Thu, 11 Apr 2024 14:12:59 +0800 Subject: [PATCH 024/118] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-163=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/exception/BusinessException.java | 77 ------------------- .../service/impl/OrderInfoServiceImpl.java | 8 +- 2 files changed, 4 insertions(+), 81 deletions(-) delete mode 100644 sf-common/src/main/java/com/sf/common/exception/BusinessException.java diff --git a/sf-common/src/main/java/com/sf/common/exception/BusinessException.java b/sf-common/src/main/java/com/sf/common/exception/BusinessException.java deleted file mode 100644 index 26ba14a..0000000 --- a/sf-common/src/main/java/com/sf/common/exception/BusinessException.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.sf.common.exception; - - -import com.sf.common.enums.ErrorCodeTypeEnum; - -/** - * @author : yswjme@163.com - * @Title : BusinessException.java - * @Package : com.zsmarter.ai.word.exception - * @Descript : 业务运行时异常 - * @date : 2020-06-29 04:59:44 - * @vsersion : V1.0 - */ -public class BusinessException extends RuntimeException { - - private static final long serialVersionUID = 4693786499059513760L; - - private ErrorCodeTypeEnum errorCodeTypeEnum; - - private final String errorDescription; - - private String errorCode; - - public BusinessException(String errorDescription) { - super(errorDescription); - this.errorDescription = errorDescription; - } - - public BusinessException(String errorDescription, Throwable t) { - super(errorDescription, t); - this.errorDescription = errorDescription; - } - - public BusinessException(String code, String errorDescription) { - super(errorDescription); - this.errorDescription = errorDescription; - this.errorCode = code; - } - - public BusinessException(String code, String errorDescription, Throwable t) { - super(errorDescription, t); - this.errorDescription = errorDescription; - this.errorCode = code; - } - - public BusinessException(ErrorCodeTypeEnum errorCodeTypeEnum, String code, String errorDescription) { - super(errorDescription); - this.errorDescription = errorDescription; - this.errorCode = code; - this.errorCodeTypeEnum = errorCodeTypeEnum; - } - - public BusinessException(ErrorCodeTypeEnum errorCodeTypeEnum, String code, String errorDescription, Throwable t) { - super(errorDescription, t); - this.errorDescription = errorDescription; - this.errorCode = code; - this.errorCodeTypeEnum = errorCodeTypeEnum; - } - - public String getErrorDescription() { - return this.errorDescription; - } - - public String getErrorCode() { - return errorCode; - } - - public String getErrorTitle() { - return "业务校验失败!"; - } - - public ErrorCodeTypeEnum getErrorCodeTypeEnum() { - return errorCodeTypeEnum; - } - - -} diff --git a/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java b/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java index 315b818..38c43c8 100644 --- a/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java +++ b/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java @@ -2,7 +2,7 @@ package com.sf.order.service.impl; import java.util.List; -import com.sf.common.exception.BusinessException; +import com.sf.common.exception.ServiceException; import com.sf.common.utils.DateUtils; import com.sf.common.utils.SnowflakeIdWorker; import com.sf.order.domain.OrderInfo; @@ -97,16 +97,16 @@ public class OrderInfoServiceImpl implements IOrderInfoService public void orderPay(Long orderId) { OrderInfo updateOrder = this.selectOrderInfoById(orderId); if (updateOrder == null) { - throw new BusinessException("订单缺失!"); + throw new ServiceException("订单缺失!"); } // if (!OrderInfoConstant.ORDER_WAITING_FOR_PAYMENT.equals(orderInfo.getOrderStatus())) { -// throw new BusinessException("订单状态异常!"); +// throw new ServiceException("订单状态异常!"); // } updateOrder.setOrderStatus(1L); updateOrder.setPayTime(DateUtils.getNowDate()); // 修改订单状态 if (1>this.updateOrderInfo(updateOrder)) { - throw new BusinessException("支付异常,请联系管理员!"); + throw new ServiceException("支付异常,请联系管理员!"); } } From bf5b5ad0e4be61500d26d7eac429af1b95259f8b Mon Sep 17 00:00:00 2001 From: pengren Date: Thu, 11 Apr 2024 14:21:57 +0800 Subject: [PATCH 025/118] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-163=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9A=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-admin/pom.xml | 6 - .../order/controller/OrderInfoController.java | 109 ++++++ .../java/com/sf/order/domain/OrderInfo.java | 0 .../sf/order/domain/dto/OrderCreateDto.java | 0 .../sf/order/domain/req/OrderListreqVo.java | 1 - .../sf/order/domain/res/OrderListResVo.java | 2 - .../com/sf/order/mapper/OrderInfoMapper.java | 0 .../sf/order/service/IOrderInfoService.java | 0 .../service/impl/OrderInfoServiceImpl.java | 3 +- .../mapper/order/OrderInfoMapper.xml | 342 +++++++++--------- sf-order/pom.xml | 34 -- 11 files changed, 281 insertions(+), 216 deletions(-) create mode 100644 sf-admin/src/main/java/com/sf/order/controller/OrderInfoController.java rename {sf-order => sf-admin}/src/main/java/com/sf/order/domain/OrderInfo.java (100%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java (100%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/domain/req/OrderListreqVo.java (84%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/domain/res/OrderListResVo.java (96%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/mapper/OrderInfoMapper.java (100%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/service/IOrderInfoService.java (100%) rename {sf-order => sf-admin}/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java (99%) rename {sf-order => sf-admin}/src/main/resources/mapper/order/OrderInfoMapper.xml (98%) delete mode 100644 sf-order/pom.xml diff --git a/sf-admin/pom.xml b/sf-admin/pom.xml index 781eeae..f411a21 100644 --- a/sf-admin/pom.xml +++ b/sf-admin/pom.xml @@ -60,12 +60,6 @@ com.smarterFramework sf-file - - com.smarterFramework - sf-order - 1.0.0 - compile - diff --git a/sf-admin/src/main/java/com/sf/order/controller/OrderInfoController.java b/sf-admin/src/main/java/com/sf/order/controller/OrderInfoController.java new file mode 100644 index 0000000..c1e356d --- /dev/null +++ b/sf-admin/src/main/java/com/sf/order/controller/OrderInfoController.java @@ -0,0 +1,109 @@ +package com.sf.order.controller; + +import com.sf.common.annotation.Log; +import com.sf.common.core.controller.BaseController; +import com.sf.common.core.domain.AjaxResult; +import com.sf.common.core.page.TableDataInfo; +import com.sf.common.enums.BusinessType; +import com.sf.common.utils.poi.ExcelUtil; +import com.sf.order.domain.OrderInfo; +import com.sf.order.domain.dto.OrderCreateDto; +import com.sf.order.domain.req.OrderListreqVo; +import com.sf.order.domain.res.OrderListResVo; +import com.sf.order.service.IOrderInfoService; +import io.swagger.v3.oas.annotations.Operation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 订单基础信息Controller + * + * @author ztzh + * @date 2024-04-09 + */ +@RestController +@RequestMapping("/order") +public class OrderInfoController extends BaseController { + + @Autowired + private IOrderInfoService orderInfoService; + + /** + * 查询订单基础信息列表 + */ + @GetMapping("/list") + public TableDataInfo list(OrderInfo orderInfo) { + startPage(); + List list = orderInfoService.selectOrderInfoList(orderInfo); + return getDataTable(list); + } + + /** + * 查询订单基础信息列表 + */ + @GetMapping("/query/list") + public TableDataInfo queryList(OrderListreqVo vo) { + startPage(); + List list = orderInfoService.queryList(vo); + return getDataTable(list); + } + + /** + * 导出订单基础信息列表 + */ + @Log(title = "订单基础信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, OrderInfo orderInfo) { + List list = orderInfoService.selectOrderInfoList(orderInfo); + ExcelUtil util = new ExcelUtil(OrderInfo.class); + util.exportExcel(response, list, "订单基础信息数据"); + } + + /** + * 获取订单基础信息详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(orderInfoService.selectOrderInfoById(id)); + } + + /** + * 新增订单基础信息 + */ + @Log(title = "创建订单基础信息", businessType = BusinessType.INSERT) + @PostMapping(value = "/createOrder") + public AjaxResult createOrder(@RequestBody OrderCreateDto orderCreateDto) { + return toAjax(orderInfoService.createOrder(orderCreateDto)); + } + + /** + * 修改订单基础信息 + */ + @Log(title = "订单基础信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody OrderInfo orderInfo) { + return toAjax(orderInfoService.updateOrderInfo(orderInfo)); + } + + /** + * 支付订单 + */ + @Operation(summary = "支付订单") + @PostMapping(value = "/pay/{orderId}") + private String orderPay(@PathVariable(value = "orderId") Long orderId) { + orderInfoService.orderPay(orderId); + return null; + } + + /** + * 删除订单基础信息 + */ + @Log(title = "订单基础信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(orderInfoService.deleteOrderInfoByIds(ids)); + } +} diff --git a/sf-order/src/main/java/com/sf/order/domain/OrderInfo.java b/sf-admin/src/main/java/com/sf/order/domain/OrderInfo.java similarity index 100% rename from sf-order/src/main/java/com/sf/order/domain/OrderInfo.java rename to sf-admin/src/main/java/com/sf/order/domain/OrderInfo.java diff --git a/sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java b/sf-admin/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java similarity index 100% rename from sf-order/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java rename to sf-admin/src/main/java/com/sf/order/domain/dto/OrderCreateDto.java diff --git a/sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java b/sf-admin/src/main/java/com/sf/order/domain/req/OrderListreqVo.java similarity index 84% rename from sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java rename to sf-admin/src/main/java/com/sf/order/domain/req/OrderListreqVo.java index 3cbbbd8..52b41c9 100644 --- a/sf-order/src/main/java/com/sf/order/domain/req/OrderListreqVo.java +++ b/sf-admin/src/main/java/com/sf/order/domain/req/OrderListreqVo.java @@ -1,6 +1,5 @@ package com.sf.order.domain.req; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data diff --git a/sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java b/sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java similarity index 96% rename from sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java rename to sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java index 502a641..b5cda3e 100644 --- a/sf-order/src/main/java/com/sf/order/domain/res/OrderListResVo.java +++ b/sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java @@ -3,8 +3,6 @@ package com.sf.order.domain.res; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import java.time.LocalDateTime; - /** * 活动信息详情 * diff --git a/sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java b/sf-admin/src/main/java/com/sf/order/mapper/OrderInfoMapper.java similarity index 100% rename from sf-order/src/main/java/com/sf/order/mapper/OrderInfoMapper.java rename to sf-admin/src/main/java/com/sf/order/mapper/OrderInfoMapper.java diff --git a/sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java b/sf-admin/src/main/java/com/sf/order/service/IOrderInfoService.java similarity index 100% rename from sf-order/src/main/java/com/sf/order/service/IOrderInfoService.java rename to sf-admin/src/main/java/com/sf/order/service/IOrderInfoService.java diff --git a/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java b/sf-admin/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java similarity index 99% rename from sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java rename to sf-admin/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java index 38c43c8..b70d05b 100644 --- a/sf-order/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java +++ b/sf-admin/src/main/java/com/sf/order/service/impl/OrderInfoServiceImpl.java @@ -1,7 +1,5 @@ package com.sf.order.service.impl; -import java.util.List; - import com.sf.common.exception.ServiceException; import com.sf.common.utils.DateUtils; import com.sf.common.utils.SnowflakeIdWorker; @@ -14,6 +12,7 @@ import com.sf.order.service.IOrderInfoService; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.List; /** * 订单基础信息Service业务层处理 diff --git a/sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml b/sf-admin/src/main/resources/mapper/order/OrderInfoMapper.xml similarity index 98% rename from sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml rename to sf-admin/src/main/resources/mapper/order/OrderInfoMapper.xml index 811f46a..e9141e7 100644 --- a/sf-order/src/main/resources/mapper/order/OrderInfoMapper.xml +++ b/sf-admin/src/main/resources/mapper/order/OrderInfoMapper.xml @@ -1,172 +1,172 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, order_no, order_status, pay_type, pay_channel, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO - - - select id, order_no, order_status, pay_type, productTitle, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO - - - - - - - - - insert into ORDER_INFO - - id, - order_no, - order_status, - pay_type, - pay_channel, - order_amt, - freight_amt, - pay_amt, - really_amt, - receive_type, - goods_id, - business_id, - receive_addr_id, - create_time, - pay_time, - create_user_id, - update_user_id, - is_delete, - update_time, - track_no, - order_type, - out_order_no, - pay_data, - reduction_amout, - - - #{id}, - #{orderNo}, - #{orderStatus}, - #{payType}, - #{payChannel}, - #{orderAmt}, - #{freightAmt}, - #{payAmt}, - #{reallyAmt}, - #{receiveType}, - #{goodsId}, - #{businessId}, - #{receiveAddrId}, - #{createTime}, - #{payTime}, - #{createUserId}, - #{updateUserId}, - #{isDelete}, - #{updateTime}, - #{trackNo}, - #{orderType}, - #{outOrderNo}, - #{payData}, - #{reductionAmout}, - - - - - update ORDER_INFO - - order_no = #{orderNo}, - order_status = #{orderStatus}, - pay_type = #{payType}, - pay_channel = #{payChannel}, - order_amt = #{orderAmt}, - freight_amt = #{freightAmt}, - pay_amt = #{payAmt}, - really_amt = #{reallyAmt}, - receive_type = #{receiveType}, - goods_id = #{goodsId}, - business_id = #{businessId}, - receive_addr_id = #{receiveAddrId}, - create_time = #{createTime}, - pay_time = #{payTime}, - create_user_id = #{createUserId}, - update_user_id = #{updateUserId}, - is_delete = #{isDelete}, - update_time = #{updateTime}, - track_no = #{trackNo}, - order_type = #{orderType}, - out_order_no = #{outOrderNo}, - pay_data = #{payData}, - reduction_amout = #{reductionAmout}, - - where id = #{id} - - - - delete from ORDER_INFO where id = #{id} - - - - delete from ORDER_INFO where id in - - #{id} - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, order_no, order_status, pay_type, pay_channel, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO + + + select id, order_no, order_status, pay_type, productTitle, order_amt, freight_amt, pay_amt, really_amt, receive_type, goods_id, business_id, receive_addr_id, create_time, pay_time, create_user_id, update_user_id, is_delete, update_time, track_no, order_type, out_order_no, pay_data, reduction_amout from ORDER_INFO + + + + + + + + + insert into ORDER_INFO + + id, + order_no, + order_status, + pay_type, + pay_channel, + order_amt, + freight_amt, + pay_amt, + really_amt, + receive_type, + goods_id, + business_id, + receive_addr_id, + create_time, + pay_time, + create_user_id, + update_user_id, + is_delete, + update_time, + track_no, + order_type, + out_order_no, + pay_data, + reduction_amout, + + + #{id}, + #{orderNo}, + #{orderStatus}, + #{payType}, + #{payChannel}, + #{orderAmt}, + #{freightAmt}, + #{payAmt}, + #{reallyAmt}, + #{receiveType}, + #{goodsId}, + #{businessId}, + #{receiveAddrId}, + #{createTime}, + #{payTime}, + #{createUserId}, + #{updateUserId}, + #{isDelete}, + #{updateTime}, + #{trackNo}, + #{orderType}, + #{outOrderNo}, + #{payData}, + #{reductionAmout}, + + + + + update ORDER_INFO + + order_no = #{orderNo}, + order_status = #{orderStatus}, + pay_type = #{payType}, + pay_channel = #{payChannel}, + order_amt = #{orderAmt}, + freight_amt = #{freightAmt}, + pay_amt = #{payAmt}, + really_amt = #{reallyAmt}, + receive_type = #{receiveType}, + goods_id = #{goodsId}, + business_id = #{businessId}, + receive_addr_id = #{receiveAddrId}, + create_time = #{createTime}, + pay_time = #{payTime}, + create_user_id = #{createUserId}, + update_user_id = #{updateUserId}, + is_delete = #{isDelete}, + update_time = #{updateTime}, + track_no = #{trackNo}, + order_type = #{orderType}, + out_order_no = #{outOrderNo}, + pay_data = #{payData}, + reduction_amout = #{reductionAmout}, + + where id = #{id} + + + + delete from ORDER_INFO where id = #{id} + + + + delete from ORDER_INFO where id in + + #{id} + + \ No newline at end of file diff --git a/sf-order/pom.xml b/sf-order/pom.xml deleted file mode 100644 index 08b9c37..0000000 --- a/sf-order/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - smarterFramework - com.smarterFramework - 1.0.0 - - 4.0.0 - - sf-order - - - order订单模块 - - - - - - - com.smarterFramework - sf-common - - - io.swagger.core.v3 - swagger-annotations - 2.1.2 - compile - - - - - \ No newline at end of file From cbb976637547bd0f92d1cd5ac37951db0454d0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Thu, 11 Apr 2024 14:55:21 +0800 Subject: [PATCH 026/118] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E5=AE=89=E8=A3=85=E5=8C=85=E6=96=B0=E5=A2=9E=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=A0=E9=81=93=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?APP=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=92=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/views/FDS/appManagement/add.vue | 120 +++++++++ sf-ui/src/views/FDS/appManagement/index.vue | 207 +++++++++++++++ sf-ui/src/views/FDS/channelManagement/add.vue | 120 +++++++++ .../src/views/FDS/channelManagement/index.vue | 210 +++++++++++++++ sf-ui/src/views/FDS/installationList/add.vue | 247 +++++++++--------- .../src/views/FDS/installationList/detail.vue | 12 +- .../src/views/FDS/installationList/index.vue | 166 ++++++------ 7 files changed, 857 insertions(+), 225 deletions(-) create mode 100644 sf-ui/src/views/FDS/appManagement/add.vue create mode 100644 sf-ui/src/views/FDS/appManagement/index.vue create mode 100644 sf-ui/src/views/FDS/channelManagement/add.vue create mode 100644 sf-ui/src/views/FDS/channelManagement/index.vue diff --git a/sf-ui/src/views/FDS/appManagement/add.vue b/sf-ui/src/views/FDS/appManagement/add.vue new file mode 100644 index 0000000..b415f0d --- /dev/null +++ b/sf-ui/src/views/FDS/appManagement/add.vue @@ -0,0 +1,120 @@ + + + diff --git a/sf-ui/src/views/FDS/appManagement/index.vue b/sf-ui/src/views/FDS/appManagement/index.vue new file mode 100644 index 0000000..67b220c --- /dev/null +++ b/sf-ui/src/views/FDS/appManagement/index.vue @@ -0,0 +1,207 @@ + + diff --git a/sf-ui/src/views/FDS/channelManagement/add.vue b/sf-ui/src/views/FDS/channelManagement/add.vue new file mode 100644 index 0000000..d80ce25 --- /dev/null +++ b/sf-ui/src/views/FDS/channelManagement/add.vue @@ -0,0 +1,120 @@ + + + diff --git a/sf-ui/src/views/FDS/channelManagement/index.vue b/sf-ui/src/views/FDS/channelManagement/index.vue new file mode 100644 index 0000000..30fadde --- /dev/null +++ b/sf-ui/src/views/FDS/channelManagement/index.vue @@ -0,0 +1,210 @@ + + diff --git a/sf-ui/src/views/FDS/installationList/add.vue b/sf-ui/src/views/FDS/installationList/add.vue index cde38a4..95b9c9c 100644 --- a/sf-ui/src/views/FDS/installationList/add.vue +++ b/sf-ui/src/views/FDS/installationList/add.vue @@ -2,76 +2,53 @@
-
新增文件
+
新增安装包
- - - - 在线上传 - - 离线上传 + + + + {{ item.label }} - - + + + - - + + + - - + + + + + - 上传文件 + 上传文件 - - + + + - - - Android - - 鸿蒙 - - IOS + + + {{ item.label }} - + + + 提交 + 重置 +
- + + + +
-
\ No newline at end of file diff --git a/sf-ui/src/views/components/home/list.vue b/sf-ui/src/views/components/home/list.vue new file mode 100644 index 0000000..f70c78a --- /dev/null +++ b/sf-ui/src/views/components/home/list.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/sf-ui/src/views/indexNew.vue b/sf-ui/src/views/indexNew.vue new file mode 100644 index 0000000..6a2aabf --- /dev/null +++ b/sf-ui/src/views/indexNew.vue @@ -0,0 +1,291 @@ + + + + + \ No newline at end of file From d48e5d8227df4e8472a56801da7153fbc140a7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Fri, 12 Apr 2024 09:27:53 +0800 Subject: [PATCH 033/118] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=A6=BB?= =?UTF-8?q?=E7=BA=BF=E5=8C=85=E6=A8=A1=E5=9D=97=E7=9A=84=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=B8=BA=E6=AD=A3=E7=A1=AE=E7=9A=84=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E5=AD=97=E5=85=B8=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/layout/components/index.js | 2 +- sf-ui/src/views/FDS/installationList/add.vue | 110 +++++++----------- .../src/views/FDS/installationList/index.vue | 2 +- 3 files changed, 47 insertions(+), 67 deletions(-) diff --git a/sf-ui/src/layout/components/index.js b/sf-ui/src/layout/components/index.js index 9d2424c..d60f9ef 100644 --- a/sf-ui/src/layout/components/index.js +++ b/sf-ui/src/layout/components/index.js @@ -1,6 +1,6 @@ export { default as AppMain } from './AppMain' export { default as Navbar } from './Navbar' -export { default as NavbarNew } from './NavbarNew' +// export { default as NavbarNew } from './NavbarNew' export { default as Settings } from './Settings' export { default as Sidebar } from './Sidebar/index.vue' export { default as TagsView } from './TagsView/index.vue' diff --git a/sf-ui/src/views/FDS/installationList/add.vue b/sf-ui/src/views/FDS/installationList/add.vue index 5fb726f..c7c6eb9 100644 --- a/sf-ui/src/views/FDS/installationList/add.vue +++ b/sf-ui/src/views/FDS/installationList/add.vue @@ -8,55 +8,57 @@
- - - + + {{ item.label }} - - + + - - + + + + + + - - - - - - + 上传文件 - - + + - - - + + {{ item.label }} - - - - - + + + + + + + + + + 提交 重置 @@ -73,7 +75,7 @@ import { addINFO, updateINFO } from '@/api/FDS/installList' export default { name: 'InstallAdd', - dicts: ['sys_yes_no'], + dicts: ['sys_apk_uploading_type', 'uploading_status', 'sys_apk_type'], data() { return { formData: { @@ -87,56 +89,34 @@ export default { field108: undefined }, rules: { - field102: [{ - required: true, - message: '上传方式不能为空', - trigger: 'change' - }], - field103: [{ - required: true, - message: '请输入安装包名称', - trigger: 'blur' - }], - field107: [{ - required: true, - message: '请输入模块包名称', - trigger: 'blur' - }], - field105: [], - field106: [] + uploadingType: [ + { required: true, message: '上传类型不能为空', trigger: 'change' } + ], + sysApkName: [ + { required: true, message: '安装包名称不能为空', trigger: 'blur' } + ], + version: [ + { required: true, message: '版本号不能为空', trigger: 'blur' } + ], + sysType: [ + { required: true, message: '安装包类型不能为空', trigger: 'change' } + ] }, field101Action: 'https://jsonplaceholder.typicode.com/posts/', field101fileList: [], - field102Options: [{ - 'label': '在线上传', - 'value': 1 - }, { - 'label': '离线上传', - 'value': 2 - }], - field106Options: [{ - 'label': 'Android', - 'value': 'Android' - }, { - 'label': 'IOS', - 'value': 'IOS' - }, { - 'label': '鸿蒙', - 'value': 'HarmonyOS' - }], activeTabs: '1' } }, computed: {}, mounted() { - this.activeTabs = this.$route.params.activeTabs + this.activeTabs = this.$route.query.activeTabs }, methods: { /** 提交按钮 */ submitForm() { this.$refs['elForm'].validate(valid => { if (valid) { - if (this.form.configId != undefined) { + if (this.form.id != undefined) { updateINFO(this.form).then(response => { this.$modal.msgSuccess('修改成功') this.closeModal() diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue index 6d6546b..24aa39f 100644 --- a/sf-ui/src/views/FDS/installationList/index.vue +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -183,7 +183,7 @@ import { delINFO, listINFO } from '@/api/FDS/installList' export default { name: 'InstallationList', - dicts: ['sys_yes_no'], + dicts: ['sys_apk_uploading_type', 'uploading_status', 'sys_apk_type'], data() { return { // 遮罩层 From 1f7755386d322709160ab1559320b4d77f35e264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Fri, 12 Apr 2024 09:42:28 +0800 Subject: [PATCH 034/118] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/router/index.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sf-ui/src/router/index.js b/sf-ui/src/router/index.js index cf29d37..d892652 100644 --- a/sf-ui/src/router/index.js +++ b/sf-ui/src/router/index.js @@ -100,7 +100,7 @@ export const dynamicRoutes = [ { path: 'role/:userId(\\d+)', // component: () => import('@/views/system/user/authRole'), - component: (resolve) => require(['@/views/system/user/authRole'],resolve), + component: (resolve) => require(['@/views/system/user/authRole'], resolve), name: 'AuthRole', meta: { title: '分配角色', activeMenu: '/system/user' } } @@ -221,46 +221,46 @@ export const dynamicRoutes = [ }, { - path: '/build/WhiteList', + path: '/build/whiteListManagement', component: Layout, hidden: true, - permissions: ['build:WhiteList:add'], + permissions: ['build:whiteListManagement:add'], children: [ { path: 'add', component: () => import('@/views/FDS/whiteListManagement/add'), - name: 'WhiteListAdd', - meta: { title: '新增白名单', activeMenu: '/build/whiteList' } + name: 'WhiteListManagementAdd', + meta: { title: '新增白名单', activeMenu: '/build/whiteListManagement' } } ] }, { - path: '/build/WhiteList', + path: '/build/whiteListManagement', component: Layout, hidden: true, - permissions: ['build:WhiteList:detail'], + permissions: ['build:whiteListManagement:detail'], children: [ { path: 'detail', component: () => import('@/views/FDS/whiteListManagement/detail'), - name: 'WhiteListDetail', - meta: { title: '白名单详情', activeMenu: '/build/whiteList' } + name: 'WhiteListManagementDetail', + meta: { title: '白名单详情', activeMenu: '/build/whiteListManagement' } } ] }, { - path: '/build/WhiteList', + path: '/build/whiteListManagement', component: Layout, hidden: true, - permissions: ['build:WhiteList:addConfig'], + permissions: ['build:whiteListManagement:addConfig'], children: [ { path: 'addConfig', component: () => import('@/views/FDS/whiteListManagement/addConfig'), - name: 'WhiteListAdd', - meta: { title: '新增白名单配置', activeMenu: '/build/whiteList' } + name: 'WhiteListManagementConfigAdd', + meta: { title: '新增白名单配置', activeMenu: '/build/whiteListManagement' } } ] } From 2a908a3b0f7d4772a8fbfa8e819d299a4e122741 Mon Sep 17 00:00:00 2001 From: yin fuxian Date: Fri, 12 Apr 2024 10:51:10 +0800 Subject: [PATCH 035/118] =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8E=E5=82=A8=E5=AD=98=E9=A1=B9=E7=9B=AE=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/store/getters.js | 1 + sf-ui/src/store/modules/user.js | 22 +++++++++++++++-- sf-ui/src/utils/application.js | 30 ++++++++++++++++++++++++ sf-ui/src/views/components/home/card.vue | 5 ++-- sf-ui/src/views/indexNew.vue | 3 +-- 5 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 sf-ui/src/utils/application.js diff --git a/sf-ui/src/store/getters.js b/sf-ui/src/store/getters.js index 5920c6e..46e2bee 100644 --- a/sf-ui/src/store/getters.js +++ b/sf-ui/src/store/getters.js @@ -11,6 +11,7 @@ const getters = { introduction: state => state.user.introduction, roles: state => state.user.roles, permissions: state => state.user.permissions, + applicationId: state => state.user.applicationId, permission_routes: state => state.permission.routes, topbarRouters:state => state.permission.topbarRouters, defaultRoutes:state => state.permission.defaultRoutes, diff --git a/sf-ui/src/store/modules/user.js b/sf-ui/src/store/modules/user.js index 75c0c57..7b8ffd8 100644 --- a/sf-ui/src/store/modules/user.js +++ b/sf-ui/src/store/modules/user.js @@ -1,5 +1,6 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken } from '@/utils/auth' +import { getApplicationId, setApplicationId, removeApplicationId } from '@/utils/application' const user = { state: { @@ -7,7 +8,9 @@ const user = { name: '', avatar: '', roles: [], - permissions: [] + permissions: [], + applicationId: getApplicationId(), + applicationInfo: {}, // 用户选中的项目/应用 }, mutations: { @@ -25,7 +28,12 @@ const user = { }, SET_PERMISSIONS: (state, permissions) => { state.permissions = permissions - } + }, + SET_APPLICATION: (state, applicationInfo) => { + const { id } = applicationInfo; + state.applicationId = id; + state.applicationInfo = applicationInfo; + }, }, actions: { @@ -74,6 +82,8 @@ const user = { commit('SET_TOKEN', '') commit('SET_ROLES', []) commit('SET_PERMISSIONS', []) + commit('SET_APPLICATION', {}) + removeApplicationId() removeToken() resolve() }).catch(error => { @@ -86,9 +96,17 @@ const user = { FedLogOut({ commit }) { return new Promise(resolve => { commit('SET_TOKEN', '') + commit('SET_APPLICATION', {}) + removeApplicationId() removeToken() resolve() }) + }, + + // 设置选中的项目应用信息 + SetApplication({ commit }, applicationInfo) { + commit('SET_APPLICATION', applicationInfo) + setApplicationId(applicationInfo?.id); } } } diff --git a/sf-ui/src/utils/application.js b/sf-ui/src/utils/application.js new file mode 100644 index 0000000..250e16d --- /dev/null +++ b/sf-ui/src/utils/application.js @@ -0,0 +1,30 @@ +import Cookies from "js-cookie"; + +const ApplicationKey = "Admin-Application-Id"; + +/** + * 获取应用项目ID + * 该函数从Cookie中检索与应用项目相关的关键信息。 + * @returns {string} 返回从Cookie中获取的应用项目ID。 + */ +export function getApplicationId() { + return Cookies.get(ApplicationKey); +} + +/** + * 设置应用项目ID到Cookie中 + * @param {string} ApplicationId - 需要设置的应用项目ID。 + * @return {boolean|Object} 返回Cookie设置的结果。成功则返回true,失败则返回设置失败的对象。 + */ +export function setApplicationId(ApplicationId) { + return Cookies.set(ApplicationKey, ApplicationId); +} + +/** + * 移除应用ID的Cookie + * 本函数用于删除与应用相关的ID Cookie。 + * @returns {boolean} 返回删除操作的结果。如果删除成功,则返回true;如果删除失败,则返回false。 + */ +export function removeApplicationId() { + return Cookies.remove(ApplicationKey); +} \ No newline at end of file diff --git a/sf-ui/src/views/components/home/card.vue b/sf-ui/src/views/components/home/card.vue index ba83e37..cf925aa 100644 --- a/sf-ui/src/views/components/home/card.vue +++ b/sf-ui/src/views/components/home/card.vue @@ -15,7 +15,7 @@ :size="100" /> -->
-
{{item.appName}}
+
{{item.appName}}
{{item.createTime}}
@@ -75,12 +75,13 @@ export default { flex-flow: column; justify-content: space-evenly; } - .title { + .card-title { font-size: 16px; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: #707070; } .time { font-size: 14px; diff --git a/sf-ui/src/views/indexNew.vue b/sf-ui/src/views/indexNew.vue index 6a2aabf..ffd9574 100644 --- a/sf-ui/src/views/indexNew.vue +++ b/sf-ui/src/views/indexNew.vue @@ -163,8 +163,7 @@ export default { // }); // }, async handleEnter(row) { - // TODO - // 此处需要储存项目id,供后续的网关服务、部署服务使用 + this.$store.dispatch('SetApplication', row); let routes = this.routes; if (this.routes.length === 0) { routes = await this.$store.dispatch('GenerateRoutes'); From 58e0e2c7aaae8efff9191ce563b1cfec1ebff1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Fri, 12 Apr 2024 11:49:20 +0800 Subject: [PATCH 036/118] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=8C=85=E6=A8=A1=E5=9D=97=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/components/ImageUpload/index.vue | 192 +++++++++--------- sf-ui/src/router/index.js | 22 +- .../src/views/FDS/channelManagement/index.vue | 4 +- sf-ui/src/views/FDS/installationList/add.vue | 79 ++++--- .../src/views/FDS/installationList/detail.vue | 30 ++- sf-ui/src/views/FDS/installationList/edit.vue | 183 +++++++++++++++++ .../src/views/FDS/installationList/index.vue | 39 +++- 7 files changed, 390 insertions(+), 159 deletions(-) create mode 100644 sf-ui/src/views/FDS/installationList/edit.vue diff --git a/sf-ui/src/components/ImageUpload/index.vue b/sf-ui/src/components/ImageUpload/index.vue index e0140f5..bbafc40 100644 --- a/sf-ui/src/components/ImageUpload/index.vue +++ b/sf-ui/src/components/ImageUpload/index.vue @@ -1,49 +1,50 @@ - diff --git a/sf-ui/src/router/index.js b/sf-ui/src/router/index.js index d892652..771b17a 100644 --- a/sf-ui/src/router/index.js +++ b/sf-ui/src/router/index.js @@ -176,6 +176,22 @@ export const dynamicRoutes = [ } ] }, + + { + path: '/build/install', + component: Layout, + hidden: true, + permissions: ['build:install:edit'], + children: [ + { + path: 'edit', + component: () => import('@/views/FDS/installationList/edit'), + name: 'InstallEdit', + meta: { title: '编辑安装包', activeMenu: '/build/installationList' } + } + ] + }, + { path: '/build/install', component: Layout, @@ -221,7 +237,7 @@ export const dynamicRoutes = [ }, { - path: '/build/whiteListManagement', + path: '/build/whiteList', component: Layout, hidden: true, permissions: ['build:whiteListManagement:add'], @@ -236,7 +252,7 @@ export const dynamicRoutes = [ }, { - path: '/build/whiteListManagement', + path: '/build/whiteList', component: Layout, hidden: true, permissions: ['build:whiteListManagement:detail'], @@ -251,7 +267,7 @@ export const dynamicRoutes = [ }, { - path: '/build/whiteListManagement', + path: '/build/whiteList', component: Layout, hidden: true, permissions: ['build:whiteListManagement:addConfig'], diff --git a/sf-ui/src/views/FDS/channelManagement/index.vue b/sf-ui/src/views/FDS/channelManagement/index.vue index 30fadde..9cc325b 100644 --- a/sf-ui/src/views/FDS/channelManagement/index.vue +++ b/sf-ui/src/views/FDS/channelManagement/index.vue @@ -62,7 +62,7 @@ @@ -107,7 +107,7 @@ // import { listINFO, getINFO, delINFO, addINFO, updateINFO } from "@/api/deploy/INFO"; export default { name: 'ChannelManagement', - dicts: ['sys_yes_no'], + dicts: ['sys_yes_no', 'uploading_status'], data() { return { // 遮罩层 diff --git a/sf-ui/src/views/FDS/installationList/add.vue b/sf-ui/src/views/FDS/installationList/add.vue index c7c6eb9..09ef41f 100644 --- a/sf-ui/src/views/FDS/installationList/add.vue +++ b/sf-ui/src/views/FDS/installationList/add.vue @@ -30,15 +30,21 @@ - - 上传文件 - + + + + + + + + + - + @@ -61,7 +67,7 @@ 提交 - 重置 + 取 消 @@ -71,7 +77,7 @@ + diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue index 24aa39f..1ac9418 100644 --- a/sf-ui/src/views/FDS/installationList/index.vue +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -129,14 +129,14 @@ + diff --git a/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue b/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue index dbb9e8c..4cd8978 100644 --- a/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue +++ b/sf-ui/src/views/FDS/whiteListManagement/equepDetail.vue @@ -3,11 +3,11 @@ @@ -19,13 +19,13 @@ 批量删除 @@ -39,41 +39,45 @@ - + - From d6d992ca44a021c3d44dcb6856b74b83f11fc508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Tue, 23 Apr 2024 16:38:09 +0800 Subject: [PATCH 079/118] =?UTF-8?q?fix:=20=E5=AF=B9=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=8C=85=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/store/modules/user.js | 35 ++- sf-ui/src/utils/application.js | 41 ++- sf-ui/src/views/FDS/installationList/add.vue | 22 +- .../src/views/FDS/installationList/detail.vue | 8 +- sf-ui/src/views/FDS/installationList/edit.vue | 22 +- .../src/views/FDS/installationList/index.vue | 68 ++--- .../FDS/publishList/components/addPack.vue | 24 +- sf-ui/src/views/deployment/module/index.vue | 153 ++++++------ .../deployment/publish/component/detail.vue | 235 ++++++++++++++++++ sf-ui/src/views/deployment/publish/index.vue | 112 +++++++-- 10 files changed, 526 insertions(+), 194 deletions(-) create mode 100644 sf-ui/src/views/deployment/publish/component/detail.vue diff --git a/sf-ui/src/store/modules/user.js b/sf-ui/src/store/modules/user.js index a53c413..70fa8da 100644 --- a/sf-ui/src/store/modules/user.js +++ b/sf-ui/src/store/modules/user.js @@ -1,6 +1,12 @@ -import { login, logout, getInfo } from '@/api/login' -import { getToken, setToken, removeToken } from '@/utils/auth' -import { getApplicationId, setApplicationId, removeApplicationId } from '@/utils/application' +import { getInfo, login, logout } from '@/api/login' +import { getToken, removeToken, setToken } from '@/utils/auth' +import { + getApplicationId, + removeApplicationId, + removeApplicationName, + setApplicationId, + setApplicationName +} from '@/utils/application' const user = { state: { @@ -10,7 +16,7 @@ const user = { roles: [], permissions: [], applicationId: getApplicationId(), - applicationInfo: {}, // 用户选中的项目/应用 + applicationInfo: {} // 用户选中的项目/应用 }, mutations: { @@ -30,10 +36,10 @@ const user = { state.permissions = permissions }, SET_APPLICATION: (state, applicationInfo) => { - const { id } = applicationInfo; - state.applicationId = id || ''; - state.applicationInfo = applicationInfo; - }, + const { id } = applicationInfo + state.applicationId = id || '' + state.applicationInfo = applicationInfo + } }, actions: { @@ -59,7 +65,7 @@ const user = { return new Promise((resolve, reject) => { getInfo().then(res => { const user = res.user - const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; + const avatar = (user.avatar == '' || user.avatar == null) ? require('@/assets/images/profile.jpg') : process.env.VUE_APP_BASE_API + user.avatar if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 commit('SET_ROLES', res.roles) commit('SET_PERMISSIONS', res.permissions) @@ -106,11 +112,16 @@ const user = { // 设置选中的项目应用信息 SetApplication({ commit }, applicationInfo) { commit('SET_APPLICATION', applicationInfo) - const { id } = applicationInfo || {}; + const { id, appName } = applicationInfo || {} if (id) { - setApplicationId(applicationInfo.id); + setApplicationId(applicationInfo.id) } else { - removeApplicationId(); + removeApplicationId() + } + if (appName) { + setApplicationName(applicationInfo.appName) + } else { + removeApplicationName() } } } diff --git a/sf-ui/src/utils/application.js b/sf-ui/src/utils/application.js index 250e16d..bb027b2 100644 --- a/sf-ui/src/utils/application.js +++ b/sf-ui/src/utils/application.js @@ -1,6 +1,7 @@ -import Cookies from "js-cookie"; +import Cookies from 'js-cookie' -const ApplicationKey = "Admin-Application-Id"; +const ApplicationKey = 'Admin-Application-Id' +const ApplicationKeywords = 'Admin-Application-Name' /** * 获取应用项目ID @@ -8,7 +9,16 @@ const ApplicationKey = "Admin-Application-Id"; * @returns {string} 返回从Cookie中获取的应用项目ID。 */ export function getApplicationId() { - return Cookies.get(ApplicationKey); + return Cookies.get(ApplicationKey) +} + +/** + * 获取应用项目ID + * 该函数从Cookie中检索与应用项目相关的关键信息。 + * @returns {string} 返回从Cookie中获取的应用项目ID。 + */ +export function getApplicationName() { + return Cookies.get(ApplicationKeywords) } /** @@ -17,7 +27,16 @@ export function getApplicationId() { * @return {boolean|Object} 返回Cookie设置的结果。成功则返回true,失败则返回设置失败的对象。 */ export function setApplicationId(ApplicationId) { - return Cookies.set(ApplicationKey, ApplicationId); + return Cookies.set(ApplicationKey, ApplicationId) +} + +/** + * 设置应用项目名称到Cookie中 + * @param {string} ApplicationId - 需要设置的应用项目名称。 + * @return {boolean|Object} 返回Cookie设置的结果。成功则返回true,失败则返回设置失败的对象。 + */ +export function setApplicationName(ApplicationName) { + return Cookies.set(ApplicationKeywords, ApplicationName) } /** @@ -26,5 +45,15 @@ export function setApplicationId(ApplicationId) { * @returns {boolean} 返回删除操作的结果。如果删除成功,则返回true;如果删除失败,则返回false。 */ export function removeApplicationId() { - return Cookies.remove(ApplicationKey); -} \ No newline at end of file + return Cookies.remove(ApplicationKey) +} + +/** + * 移除应用Name的Cookie + * 本函数用于删除与应用相关的Name Cookie。 + * @returns {boolean} 返回删除操作的结果。如果删除成功,则返回true;如果删除失败,则返回false。 + */ +export function removeApplicationName() { + return Cookies.remove(ApplicationKeywords) +} + diff --git a/sf-ui/src/views/FDS/installationList/add.vue b/sf-ui/src/views/FDS/installationList/add.vue index df18c95..3f20339 100644 --- a/sf-ui/src/views/FDS/installationList/add.vue +++ b/sf-ui/src/views/FDS/installationList/add.vue @@ -8,15 +8,15 @@
- - - {{ item.label }} - - - + + + + + + + + + @@ -26,7 +26,7 @@ - @@ -64,7 +64,7 @@ export default { data() { return { formData: { - uploadingType: 'OffLineUploading', + uploadingType: 'OnLineUploading', sysApkName: undefined, version: undefined, sysApk: null, diff --git a/sf-ui/src/views/FDS/installationList/detail.vue b/sf-ui/src/views/FDS/installationList/detail.vue index 2213aa4..8e93a32 100644 --- a/sf-ui/src/views/FDS/installationList/detail.vue +++ b/sf-ui/src/views/FDS/installationList/detail.vue @@ -27,11 +27,11 @@ 登录模块 {{ form.createTime }} - - - + + + {{ form.created }} - 日志日志 + 关 闭 diff --git a/sf-ui/src/views/FDS/installationList/edit.vue b/sf-ui/src/views/FDS/installationList/edit.vue index 42fb55c..a3cdea0 100644 --- a/sf-ui/src/views/FDS/installationList/edit.vue +++ b/sf-ui/src/views/FDS/installationList/edit.vue @@ -8,15 +8,15 @@
- - - {{ item.label }} - - - + + + + + + + + + @@ -27,8 +27,8 @@ - diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue index 1ac9418..2eed7b7 100644 --- a/sf-ui/src/views/FDS/installationList/index.vue +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -1,25 +1,25 @@ diff --git a/sf-ui/src/views/deployment/publish/index.vue b/sf-ui/src/views/deployment/publish/index.vue index 144cfd4..5094cc1 100644 --- a/sf-ui/src/views/deployment/publish/index.vue +++ b/sf-ui/src/views/deployment/publish/index.vue @@ -65,6 +65,19 @@ >修改 + + + 批量发布 + + + 删除 - - - - 导出 + >批量删除 @@ -93,8 +95,8 @@ - - + + @@ -130,6 +132,36 @@ @@ -294,13 +332,16 @@ import { addPublish, delPublish, getPublish, listPublish, updatePublish } from '@/api/deployment/publish' import Cookies from 'js-cookie' import AddPack from '@/views/FDS/publishList/components/addPack.vue' +import DetailModal from './component/detail.vue' import { listEnvironment } from '@/api/deployment/environment' +import { getApplicationName } from '@/utils/application' export default { name: 'Publish', dicts: ['release_environment', 'sys_yes_no', 'release_strategy', 'release_user_type'], components: { - AddPack + AddPack, + DetailModal }, data() { return { @@ -323,6 +364,8 @@ export default { // 是否显示弹出层 open: false, packOpen: false, + openDetail: false, + detailId: '', environmentList: [], // 查询参数 queryParams: { @@ -396,14 +439,16 @@ export default { // 取消按钮 cancel() { this.open = false + this.loading = false this.reset() + }, // 表单重置 reset() { this.form = { id: null, applyId: Cookies.get('Admin-Application-Id'), - appName: null, + appName: getApplicationName(), systemType: null, apkId: null, appStoreAddress: null, @@ -471,12 +516,14 @@ export default { delete data.explain updatePublish(data).then(response => { this.$modal.msgSuccess('修改成功') + this.loading = false this.open = false this.getList() }) } else { addPublish(this.form).then(response => { this.$modal.msgSuccess('新增成功') + this.loading = false this.open = false this.getList() }) @@ -516,6 +563,7 @@ export default { /** 关闭包选择框*/ closeAddPack() { + this.packOpen = false }, @@ -530,8 +578,24 @@ export default { // 选择系统做一些逻辑判断 changeSys(sysType) { this.form.systemType = sysType - } + }, + /**下载安装包*/ + handleDownload() { + }, + /**下架*/ + handleDown() { + + }, + /**发布*/ + handlePublish() { + + }, + /**详情*/ + handleDetail(row) { + this.detailId = row.id + this.openDetail = true + } } } From de01e86e76e3f191730a03b46a614720a13d6d2f Mon Sep 17 00:00:00 2001 From: pengren Date: Tue, 23 Apr 2024 16:41:37 +0800 Subject: [PATCH 080/118] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-585=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9A=E5=AE=89=E8=A3=85=E5=8C=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysApkInfoController.java | 3 + .../java/com/sf/deploy/domain/SysApkInfo.java | 206 ++++++++++-------- .../service/impl/SysApkInfoServiceImpl.java | 1 + sf-admin/src/main/resources/application.yml | 4 +- .../mapper/deploy/SysApkInfoMapper.xml | 7 +- 5 files changed, 132 insertions(+), 89 deletions(-) diff --git a/sf-admin/src/main/java/com/sf/deploy/controller/SysApkInfoController.java b/sf-admin/src/main/java/com/sf/deploy/controller/SysApkInfoController.java index 5ac20f9..6239438 100644 --- a/sf-admin/src/main/java/com/sf/deploy/controller/SysApkInfoController.java +++ b/sf-admin/src/main/java/com/sf/deploy/controller/SysApkInfoController.java @@ -77,6 +77,8 @@ public class SysApkInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody SysApkInfo sysApkInfo) { + sysApkInfo.setCreated(getUsername()); + sysApkInfo.setModified(getUsername()); return toAjax(sysApkInfoService.insertSysApkInfo(sysApkInfo)); } @@ -88,6 +90,7 @@ public class SysApkInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody SysApkInfo sysApkInfo) { + sysApkInfo.setModified(getUsername()); return toAjax(sysApkInfoService.updateSysApkInfo(sysApkInfo)); } diff --git a/sf-admin/src/main/java/com/sf/deploy/domain/SysApkInfo.java b/sf-admin/src/main/java/com/sf/deploy/domain/SysApkInfo.java index fe06f86..8b09ef0 100644 --- a/sf-admin/src/main/java/com/sf/deploy/domain/SysApkInfo.java +++ b/sf-admin/src/main/java/com/sf/deploy/domain/SysApkInfo.java @@ -7,196 +7,232 @@ import com.sf.common.core.domain.BaseEntity; /** * 安装包管理(新)对象 SYS_APK_INFO - * + * * @author ztzh * @date 2024-04-11 */ -public class SysApkInfo extends BaseEntity -{ +public class SysApkInfo extends BaseEntity { private static final long serialVersionUID = 1L; - /** 主键 */ + /** + * 主键 + */ private Long id; - /** 上传类型 */ + /** + * 上传类型 + */ + private String appId; + + + private String appCode; + + /** + * 上传类型 + */ @Excel(name = "上传类型") private String uploadingType; - /** 安装包名称 */ + /** + * 安装包名称 + */ @Excel(name = "安装包名称") private String sysApkName; - /** 版本号 */ + /** + * 版本号 + */ @Excel(name = "版本号") private String version; - /** 安装包 */ + /** + * 安装包 + */ @Excel(name = "安装包") private String sysApk; - /** 安装包大小 */ + /** + * 安装包大小 + */ @Excel(name = "安装包大小") private String sysApkSize; - /** 安装包类型 */ + /** + * 安装包类型 + */ @Excel(name = "安装包类型") private String sysType; - /** 上传状态 */ + /** + * 上传状态 + */ private Long uploadingStatus; - /** 日志id */ + /** + * 日志id + */ private Long uploadingLogId; - /** 排序 */ + /** + * 排序 + */ private Long orderNum; - /** 逻辑删除,0:未删除,1:删除 */ + /** + * 逻辑删除,0:未删除,1:删除 + */ private Long isDelete; - /** 创建人 */ + /** + * 创建人 + */ @Excel(name = "创建人") private String created; - /** 更新人 */ + /** + * 更新人 + */ private String modified; - public void setId(Long id) - { + public void setId(Long id) { this.id = id; } - public Long getId() - { + public Long getId() { return id; } - public void setUploadingType(String uploadingType) - { + + public void setUploadingType(String uploadingType) { this.uploadingType = uploadingType; } - public String getUploadingType() - { + public String getUploadingType() { return uploadingType; } - public void setSysApkName(String sysApkName) - { + + public void setSysApkName(String sysApkName) { this.sysApkName = sysApkName; } - public String getSysApkName() - { + public String getSysApkName() { return sysApkName; } - public void setVersion(String version) - { + + public void setVersion(String version) { this.version = version; } - public String getVersion() - { + public String getVersion() { return version; } - public void setSysApk(String sysApk) - { + + public void setSysApk(String sysApk) { this.sysApk = sysApk; } - public String getSysApk() - { + public String getSysApk() { return sysApk; } - public void setSysApkSize(String sysApkSize) - { + + public void setSysApkSize(String sysApkSize) { this.sysApkSize = sysApkSize; } - public String getSysApkSize() - { + public String getSysApkSize() { return sysApkSize; } - public void setSysType(String sysType) - { + + public void setSysType(String sysType) { this.sysType = sysType; } - public String getSysType() - { + public String getSysType() { return sysType; } - public void setUploadingStatus(Long uploadingStatus) - { + + public void setUploadingStatus(Long uploadingStatus) { this.uploadingStatus = uploadingStatus; } - public Long getUploadingStatus() - { + public Long getUploadingStatus() { return uploadingStatus; } - public void setUploadingLogId(Long uploadingLogId) - { + + public void setUploadingLogId(Long uploadingLogId) { this.uploadingLogId = uploadingLogId; } - public Long getUploadingLogId() - { + public Long getUploadingLogId() { return uploadingLogId; } - public void setOrderNum(Long orderNum) - { + + public void setOrderNum(Long orderNum) { this.orderNum = orderNum; } - public Long getOrderNum() - { + public Long getOrderNum() { return orderNum; } - public void setIsDelete(Long isDelete) - { + + public void setIsDelete(Long isDelete) { this.isDelete = isDelete; } - public Long getIsDelete() - { + public Long getIsDelete() { return isDelete; } - public void setCreated(String created) - { + + public void setCreated(String created) { this.created = created; } - public String getCreated() - { + public String getCreated() { return created; } - public void setModified(String modified) - { + + public void setModified(String modified) { this.modified = modified; } - public String getModified() - { + public String getModified() { return modified; } + public String getAppCode() { + return appCode; + } + + public void setAppCode(String appCode) { + this.appCode = appCode; + } + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("uploadingType", getUploadingType()) - .append("sysApkName", getSysApkName()) - .append("version", getVersion()) - .append("sysApk", getSysApk()) - .append("sysApkSize", getSysApkSize()) - .append("sysType", getSysType()) - .append("uploadingStatus", getUploadingStatus()) - .append("uploadingLogId", getUploadingLogId()) - .append("orderNum", getOrderNum()) - .append("isDelete", getIsDelete()) - .append("created", getCreated()) - .append("modified", getModified()) - .append("createTime", getCreateTime()) - .append("updateTime", getUpdateTime()) - .toString(); + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("uploadingType", getUploadingType()) + .append("sysApkName", getSysApkName()) + .append("version", getVersion()) + .append("sysApk", getSysApk()) + .append("sysApkSize", getSysApkSize()) + .append("sysType", getSysType()) + .append("uploadingStatus", getUploadingStatus()) + .append("uploadingLogId", getUploadingLogId()) + .append("orderNum", getOrderNum()) + .append("isDelete", getIsDelete()) + .append("created", getCreated()) + .append("modified", getModified()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("appCode", getAppId()) + .append("appId", getAppCode()) + .toString(); } } diff --git a/sf-admin/src/main/java/com/sf/deploy/service/impl/SysApkInfoServiceImpl.java b/sf-admin/src/main/java/com/sf/deploy/service/impl/SysApkInfoServiceImpl.java index 3d3bc69..4821588 100644 --- a/sf-admin/src/main/java/com/sf/deploy/service/impl/SysApkInfoServiceImpl.java +++ b/sf-admin/src/main/java/com/sf/deploy/service/impl/SysApkInfoServiceImpl.java @@ -54,6 +54,7 @@ public class SysApkInfoServiceImpl implements ISysApkInfoService public int insertSysApkInfo(SysApkInfo sysApkInfo) { sysApkInfo.setCreateTime(DateUtils.getNowDate()); + sysApkInfo.setUpdateTime(DateUtils.getNowDate()); return sysApkInfoMapper.insertSysApkInfo(sysApkInfo); } diff --git a/sf-admin/src/main/resources/application.yml b/sf-admin/src/main/resources/application.yml index 1a466e0..4a496a5 100644 --- a/sf-admin/src/main/resources/application.yml +++ b/sf-admin/src/main/resources/application.yml @@ -59,9 +59,9 @@ spring: servlet: multipart: # 单个文件大小 - max-file-size: 10MB + max-file-size: 100MB # 设置总上传的文件大小 - max-request-size: 20MB + max-request-size: 200MB # 服务模块 devtools: restart: diff --git a/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml b/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml index d1a60cf..7d55141 100644 --- a/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml +++ b/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml @@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -23,12 +25,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO + select id, app_id,app_code, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO @@ -109,6 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" apply_id = #{applyId}, app_name = #{appName}, + app_code = #{appCode}, + quick_mark = #{quickMark}, system_type = #{systemType}, apk_id = #{apkId}, app_store_address = #{appStoreAddress}, diff --git a/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml b/sf-system/src/main/resources/mapper/system/deployment/SysApkInfoMapper.xml similarity index 97% rename from sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml rename to sf-system/src/main/resources/mapper/system/deployment/SysApkInfoMapper.xml index 7d55141..956360b 100644 --- a/sf-admin/src/main/resources/mapper/deploy/SysApkInfoMapper.xml +++ b/sf-system/src/main/resources/mapper/system/deployment/SysApkInfoMapper.xml @@ -1,116 +1,116 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - select id, app_id,app_code, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO - - - - - - - - insert into SYS_APK_INFO - - uploading_type, - sys_apk_name, - version, - sys_apk, - sys_apk_size, - sys_type, - uploading_status, - uploading_log_id, - order_num, - is_delete, - created, - modified, - create_time, - update_time, - - - #{uploadingType}, - #{sysApkName}, - #{version}, - #{sysApk}, - #{sysApkSize}, - #{sysType}, - #{uploadingStatus}, - #{uploadingLogId}, - #{orderNum}, - #{isDelete}, - #{created}, - #{modified}, - #{createTime}, - #{updateTime}, - - - - - update SYS_APK_INFO - - uploading_type = #{uploadingType}, - sys_apk_name = #{sysApkName}, - version = #{version}, - sys_apk = #{sysApk}, - sys_apk_size = #{sysApkSize}, - sys_type = #{sysType}, - uploading_status = #{uploadingStatus}, - uploading_log_id = #{uploadingLogId}, - order_num = #{orderNum}, - is_delete = #{isDelete}, - created = #{created}, - modified = #{modified}, - create_time = #{createTime}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from SYS_APK_INFO where id = #{id} - - - - delete from SYS_APK_INFO where id in - - #{id} - - + + + + + + + + + + + + + + + + + + + + + + + + + + select id, app_id,app_code, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO + + + + + + + + insert into SYS_APK_INFO + + uploading_type, + sys_apk_name, + version, + sys_apk, + sys_apk_size, + sys_type, + uploading_status, + uploading_log_id, + order_num, + is_delete, + created, + modified, + create_time, + update_time, + + + #{uploadingType}, + #{sysApkName}, + #{version}, + #{sysApk}, + #{sysApkSize}, + #{sysType}, + #{uploadingStatus}, + #{uploadingLogId}, + #{orderNum}, + #{isDelete}, + #{created}, + #{modified}, + #{createTime}, + #{updateTime}, + + + + + update SYS_APK_INFO + + uploading_type = #{uploadingType}, + sys_apk_name = #{sysApkName}, + version = #{version}, + sys_apk = #{sysApk}, + sys_apk_size = #{sysApkSize}, + sys_type = #{sysType}, + uploading_status = #{uploadingStatus}, + uploading_log_id = #{uploadingLogId}, + order_num = #{orderNum}, + is_delete = #{isDelete}, + created = #{created}, + modified = #{modified}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from SYS_APK_INFO where id = #{id} + + + + delete from SYS_APK_INFO where id in + + #{id} + + \ No newline at end of file diff --git a/sf-ui/src/api/deployment/publish.js b/sf-ui/src/api/deployment/publish.js index a944419..7bf0295 100644 --- a/sf-ui/src/api/deployment/publish.js +++ b/sf-ui/src/api/deployment/publish.js @@ -42,3 +42,17 @@ export function delPublish(id) { method: 'delete' }) } +// 发布 +export function publish(id) { + return request({ + url: '/deployment/publish/' + id, + method: 'get' + }) +} +// 下架 +export function delPublish(id) { + return request({ + url: '/deployment/sold/out/' + id, + method: 'get' + }) +} From 7c5b4657e1b9bbc0d9f04c39461de8ccbc661a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Wed, 24 Apr 2024 09:09:11 +0800 Subject: [PATCH 083/118] =?UTF-8?q?fix:=20=E5=AF=B9=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=8C=85=E7=9A=84=E5=AD=97=E6=AE=B5,?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/package.json | 181 +++++----- sf-ui/src/api/deployment/publish.js | 8 +- .../FDS/publishList/components/addPack.vue | 24 +- sf-ui/src/views/deployment/module/index.vue | 13 +- .../deployment/publish/component/detail.vue | 230 +++++++------ sf-ui/src/views/deployment/publish/index.vue | 311 ++++++++++-------- 6 files changed, 425 insertions(+), 342 deletions(-) diff --git a/sf-ui/package.json b/sf-ui/package.json index 060a9b0..c31e76e 100644 --- a/sf-ui/package.json +++ b/sf-ui/package.json @@ -1,90 +1,91 @@ -{ - "name": "ruoyi", - "version": "3.8.6", - "description": "SAC管理系统", - "author": "SAC", - "license": "MIT", - "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", - "preview": "node build/index.js --preview", - "lint": "eslint --ext .js,.vue src" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "src/**/*.{js,vue}": [ - "eslint --fix", - "git add" - ] - }, - "keywords": [ - "vue", - "admin", - "dashboard", - "element-ui", - "boilerplate", - "admin-template", - "management-system" - ], - "repository": { - "type": "git", - "url": "https://gitee.com/y_project/RuoYi-Vue.git" - }, - "dependencies": { - "@riophae/vue-treeselect": "0.4.0", - "axios": "0.24.0", - "clipboard": "2.0.8", - "core-js": "3.25.3", - "echarts": "5.4.0", - "element-ui": "2.15.13", - "file-saver": "2.0.5", - "fuse.js": "6.4.3", - "highlight.js": "9.18.5", - "js-beautify": "1.13.0", - "js-cookie": "3.0.1", - "jsencrypt": "3.0.0-rc.1", - "nprogress": "0.2.0", - "quill": "1.3.7", - "screenfull": "5.0.2", - "sortablejs": "1.10.2", - "vue": "2.6.12", - "vue-count-to": "1.0.13", - "vue-cropper": "0.5.5", - "vue-meta": "2.4.0", - "vue-router": "3.4.9", - "vuedraggable": "2.24.3", - "vuex": "3.6.0" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "4.4.6", - "@vue/cli-plugin-eslint": "4.4.6", - "@vue/cli-service": "4.4.6", - "babel-eslint": "10.1.0", - "babel-plugin-dynamic-import-node": "2.3.3", - "chalk": "4.1.0", - "compression-webpack-plugin": "5.0.2", - "connect": "3.6.6", - "eslint": "7.15.0", - "eslint-plugin-vue": "7.2.0", - "lint-staged": "10.5.3", - "runjs": "4.4.2", - "sass": "1.32.13", - "sass-loader": "10.1.1", - "script-ext-html-webpack-plugin": "2.1.5", - "svg-sprite-loader": "5.1.1", - "vue-template-compiler": "2.6.12" - }, - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions" - ] -} +{ + "name": "ruoyi", + "version": "3.8.6", + "description": "SAC管理系统", + "author": "SAC", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.24.0", + "clipboard": "2.0.8", + "core-js": "3.25.3", + "echarts": "5.4.0", + "element-ui": "2.15.13", + "file-saver": "2.0.5", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "3.0.1", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "1.3.7", + "react-copy-to-clipboard": "^5.1.0", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-meta": "2.4.0", + "vue-router": "3.4.9", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-plugin-eslint": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-eslint": "10.1.0", + "babel-plugin-dynamic-import-node": "2.3.3", + "chalk": "4.1.0", + "compression-webpack-plugin": "5.0.2", + "connect": "3.6.6", + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "runjs": "4.4.2", + "sass": "1.32.13", + "sass-loader": "10.1.1", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} diff --git a/sf-ui/src/api/deployment/publish.js b/sf-ui/src/api/deployment/publish.js index 7bf0295..10545af 100644 --- a/sf-ui/src/api/deployment/publish.js +++ b/sf-ui/src/api/deployment/publish.js @@ -42,17 +42,19 @@ export function delPublish(id) { method: 'delete' }) } + // 发布 export function publish(id) { return request({ - url: '/deployment/publish/' + id, + url: '/deployment/publish/publish/' + id, method: 'get' }) } + // 下架 -export function delPublish(id) { +export function soldPublish(id) { return request({ - url: '/deployment/sold/out/' + id, + url: '/deployment/publish/sold/out/' + id, method: 'get' }) } diff --git a/sf-ui/src/views/FDS/publishList/components/addPack.vue b/sf-ui/src/views/FDS/publishList/components/addPack.vue index 4abdcfa..891f169 100644 --- a/sf-ui/src/views/FDS/publishList/components/addPack.vue +++ b/sf-ui/src/views/FDS/publishList/components/addPack.vue @@ -1,5 +1,6 @@ diff --git a/sf-ui/src/views/deployment/module/index.vue b/sf-ui/src/views/deployment/module/index.vue index c197010..a079a4b 100644 --- a/sf-ui/src/views/deployment/module/index.vue +++ b/sf-ui/src/views/deployment/module/index.vue @@ -3,18 +3,18 @@ @@ -35,47 +35,47 @@ 新增 修改 删除 导出 @@ -103,36 +103,36 @@ @@ -140,11 +140,11 @@ @@ -160,30 +160,30 @@ - + system/oss/upload diff --git a/sf-ui/src/views/deployment/publish/component/detail.vue b/sf-ui/src/views/deployment/publish/component/detail.vue index c9dc5d1..1b609cf 100644 --- a/sf-ui/src/views/deployment/publish/component/detail.vue +++ b/sf-ui/src/views/deployment/publish/component/detail.vue @@ -128,10 +128,19 @@ 复制 + + + {{ form.created }} + + + {{ form.updateTime }} + + + @@ -142,7 +151,7 @@ import { listEnvironment } from '@/api/deployment/environment' export default { name: 'AddPack', - dicts: ['release_environment', 'sys_yes_no', 'release_strategy', 'release_user_type'], + dicts: ['release_environment', 'sys_yes_no', 'release_strategy', 'release_user_type', 'release_status'], props: { detailId: { type: String | Number, diff --git a/sf-ui/src/views/deployment/publish/index.vue b/sf-ui/src/views/deployment/publish/index.vue index 5200d24..086d229 100644 --- a/sf-ui/src/views/deployment/publish/index.vue +++ b/sf-ui/src/views/deployment/publish/index.vue @@ -69,10 +69,10 @@ 批量发布 @@ -121,7 +121,10 @@ width="180" > @@ -193,7 +196,7 @@ Date: Wed, 24 Apr 2024 11:07:09 +0800 Subject: [PATCH 088/118] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=9B=A0?= =?UTF-8?q?=E4=B8=BAAPPCode=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/FDS/installationList/index.vue | 2 ++ sf-ui/src/views/deployment/module/index.vue | 4 ++- sf-ui/src/views/deployment/publish/index.vue | 31 ++++++++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/sf-ui/src/views/FDS/installationList/index.vue b/sf-ui/src/views/FDS/installationList/index.vue index 1d03122..20c0f16 100644 --- a/sf-ui/src/views/FDS/installationList/index.vue +++ b/sf-ui/src/views/FDS/installationList/index.vue @@ -409,6 +409,8 @@ export default { if (valid) { if (this.form.id != null) { let data = Object.assign({}, this.form) + console.log(data) + data.appCode = '000000' delete data.explain updateINFO(data).then(response => { this.$modal.msgSuccess('修改成功') diff --git a/sf-ui/src/views/deployment/module/index.vue b/sf-ui/src/views/deployment/module/index.vue index a079a4b..189a854 100644 --- a/sf-ui/src/views/deployment/module/index.vue +++ b/sf-ui/src/views/deployment/module/index.vue @@ -368,7 +368,8 @@ export default { created: null, modified: null, createTime: null, - updateTime: null + updateTime: null, + appCode: '000000' } this.resetForm('form') }, @@ -423,6 +424,7 @@ export default { if (valid) { if (this.form.id != null) { let data = Object.assign({}, this.form) + data.appCode = '000000' delete data.explain updateModule(data).then(response => { this.$modal.msgSuccess('修改成功') diff --git a/sf-ui/src/views/deployment/publish/index.vue b/sf-ui/src/views/deployment/publish/index.vue index 086d229..d3d2cb4 100644 --- a/sf-ui/src/views/deployment/publish/index.vue +++ b/sf-ui/src/views/deployment/publish/index.vue @@ -368,7 +368,7 @@