From f92a509183fa57421ae6244308f086201b2f1f10 Mon Sep 17 00:00:00 2001 From: qxa Date: Fri, 29 Mar 2024 16:58:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/push-master.yaml | 28 +++++++++++++++++++-------- .gitea/workflows/release-version.yaml | 22 +++++++++++++++++++-- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/push-master.yaml b/.gitea/workflows/push-master.yaml index 93595ac..db7d89e 100644 --- a/.gitea/workflows/push-master.yaml +++ b/.gitea/workflows/push-master.yaml @@ -35,16 +35,18 @@ jobs: volumes: - /opt/.runner/nuget_packages:/root/.nuget/packages + env: + run_cmd: | + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + steps: - name: 下载源码 uses: actions/checkout@v3 - - name: 使用缓存 - uses: actions/cache@master - with: - mount: | - node_modules - - name: 编译后端 uses: actions/aspnet@8.0 with: @@ -84,7 +86,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 启动生产环境106 uses: docker://appleboy/drone-ssh @@ -101,7 +108,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 发送构建通知 if: ${{ always() }} diff --git a/.gitea/workflows/release-version.yaml b/.gitea/workflows/release-version.yaml index 64db7bc..6146e40 100644 --- a/.gitea/workflows/release-version.yaml +++ b/.gitea/workflows/release-version.yaml @@ -22,6 +22,14 @@ jobs: volumes: - /opt/.runner/nuget_packages:/root/.nuget/packages + env: + run_cmd: | + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + steps: - name: 下载源码 uses: actions/checkout@v3 @@ -75,7 +83,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 启动生产环境106 uses: docker://appleboy/drone-ssh @@ -92,7 +105,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 发送构建通知 if: ${{ always() }} From 23ac9dbd97d73a50661c048e64c5fbb1c963e035 Mon Sep 17 00:00:00 2001 From: qxa Date: Fri, 29 Mar 2024 17:17:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8cmd?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/push-master.yaml | 13 ++++++++----- .gitea/workflows/release-version.yaml | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/push-master.yaml b/.gitea/workflows/push-master.yaml index db7d89e..b0a7271 100644 --- a/.gitea/workflows/push-master.yaml +++ b/.gitea/workflows/push-master.yaml @@ -37,11 +37,14 @@ jobs: env: run_cmd: | - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + + cd D:/marking.cut.service/publish + + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" steps: - name: 下载源码 diff --git a/.gitea/workflows/release-version.yaml b/.gitea/workflows/release-version.yaml index 6146e40..6ca53c6 100644 --- a/.gitea/workflows/release-version.yaml +++ b/.gitea/workflows/release-version.yaml @@ -24,11 +24,14 @@ jobs: env: run_cmd: | - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" - dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + + cd D:/marking.cut.service/publish + + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" steps: - name: 下载源码 From c67424492ad1001bbb968580f74ffaeba14c771f Mon Sep 17 00:00:00 2001 From: lyndonliu Date: Fri, 29 Mar 2024 18:05:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E6=9F=A5=E4=BA=86=E5=86=8D=E5=88=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Exams/ExamManager.cs | 14 +++++++++++--- .../DolphinExamPictureCutHttpApiHostModule.cs | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs b/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs index aee40b1..7464b60 100644 --- a/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs +++ b/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs @@ -105,7 +105,7 @@ public class ExamManager : DomainService, IExamManager }).ToListAsync(); var gotoCount = 0; -dotPenOriginalImg: + dotPenOriginalImg: var zgtSettingDtls = await DbBiz.Queryable().Where(w => w.ExamSubjectId == eto.ExamSubjectId).ToListAsync(); // 割原题 @@ -413,11 +413,19 @@ dotPenOriginalImg: await DbBiz.BeginTranAsync(); // 删除 - await DbBiz.Deleteable().Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial).ExecuteCommandAsync(); + var delObjectiveIds = await DbBiz.Queryable() + .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial) + .Select(s => s.Id).ToListAsync(); + await DbBiz.Deleteable().Where(w => delObjectiveIds.Contains(w.Id)).ExecuteCommandAsync(); + + var delSubjectiveIds = await DbBiz.Queryable() + .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentExamNum == penSerial && w.IsDeleted == false) + .Select(s => s.Id).ToListAsync(); await DbBiz.Updateable() .SetColumns(s => new SubjectiveMarkingResult { IsDeleted = true, UpdateDate = Clock.Now }) - .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentExamNum == penSerial && w.IsDeleted == false) + .Where(w => delSubjectiveIds.Contains(w.Id)) .ExecuteCommandAsync(); + // 新增 await DbBiz.Insertable(kgtDtls).ExecuteCommandAsync(); await DbBiz.Insertable(zgtDtls).ExecuteCommandAsync(); diff --git a/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs b/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs index d441447..f69d096 100644 --- a/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs +++ b/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs @@ -63,7 +63,7 @@ public class DolphinExamPictureCutHttpApiHostModule : AbpModule }, db => { - db.QueryFilter.AddTableFilter(s => s.IsDeleted == false); + //db.QueryFilter.AddTableFilter(s => s.IsDeleted == false); var config = new SqlSugarConfig(); db.Aop.DataExecuting = config.DataExecuting(context.Services);