From f569a16f60d3139ea672260f0e9bf9070e6d6f2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9F=B3=E6=96=87=E7=BF=94?= <878130837@qq.com>
Date: Sat, 2 Mar 2024 10:44:24 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=89=E4=B8=AD?=
=?UTF-8?q?=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs | 2 +-
.../Dtos/TrackTemplate/GetTrackTemplateContentPageInputVO.cs | 5 +++++
.../Repositories/TrackTemplateRepository.cs | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs b/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
index f46e3c41..8cbe4413 100644
--- a/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
@@ -15,5 +15,5 @@ public class KeywordsInputVO : PageInfoInput
///
/// 选中项
///
- public List? SelectedId { get; set; }
+ public List? SelectedIds { get; set; }
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentPageInputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentPageInputVO.cs
index 09e8f51f..14b1f0ee 100644
--- a/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentPageInputVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentPageInputVO.cs
@@ -6,4 +6,9 @@ public class GetTrackTemplateContentPageInputVO : PageInfoInput
/// 轨迹模板id
///
public List TrackTemplateIds { get; set; }
+
+ ///
+ /// 选中项
+ ///
+ public List? SelectedIds { get; set; }
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/Repositories/TrackTemplateRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackTemplateRepository.cs
index 21eef31e..0bcc56c2 100644
--- a/src/SJZY.Track.Repository/Repositories/TrackTemplateRepository.cs
+++ b/src/SJZY.Track.Repository/Repositories/TrackTemplateRepository.cs
@@ -85,7 +85,8 @@ public class TrackTemplateRepository : BasicRepository, ITr
templateContent.UpdateUserId == updateUser.Id && !updateUser.IsDeleted)
.Filter(null, true)
.Where(templateContent => input.TrackTemplateIds.Contains(templateContent.TrackTemplateId) && !templateContent.IsDeleted)
- .OrderByDescending(templateContent => templateContent.CreateTime)
+ .OrderByIF(input.SelectedIds.IsNullOrEmpty(), templateContent => templateContent.CreateTime, OrderByType.Desc)
+ .OrderByIF(!input.SelectedIds.IsNullOrEmpty(), templateContent => SqlFunc.IIF(input.SelectedIds.Contains(templateContent.TrackContentId), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), templateContent.CreateTime), OrderByType.Desc)
.Select((templateContent, trackContent, trackStatus, enumValue, trackFlag, createUser, updateUser) =>
new GetTrackTemplateContentPageOutputVO
{
From 925bf307b96b9d81e7955ed7f51a056d48ef6b7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9F=B3=E6=96=87=E7=BF=94?= <878130837@qq.com>
Date: Sat, 2 Mar 2024 11:03:12 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E?=
=?UTF-8?q?=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/SJZY.Track.Api/appsettings.json | 14 +++++++-------
.../GetTrackTemplateContentDetailOutputVO.cs | 5 +++++
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/SJZY.Track.Api/appsettings.json b/src/SJZY.Track.Api/appsettings.json
index 17cba222..676973d6 100644
--- a/src/SJZY.Track.Api/appsettings.json
+++ b/src/SJZY.Track.Api/appsettings.json
@@ -1,6 +1,6 @@
{
"Configuration": {
- "UseLocalConfiguration": true, //是否使用本地配置文件
+ "UseLocalConfiguration": false, //是否使用本地配置文件
"ConfiguraFileName": "appsettings.Development.json", //指定配置文件名称,开启UseLocalConfiguration时生效
"Apollo": {
"AppId": "SJZY.Track.Configuration",
@@ -9,12 +9,12 @@
"MetaServer": "http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080",
"ConfigServer": [ "http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080" ]
}
- },
- "Kestrel": {
- "EndPoints": {
- "Http": {
- "Url": "http://*:5056"
- }
+ },
+ "Kestrel": {
+ "EndPoints": {
+ "Http": {
+ "Url": "http://*:5056"
}
}
}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentDetailOutputVO.cs
index 4e8a8f45..c4474ba2 100644
--- a/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentDetailOutputVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/TrackTemplate/GetTrackTemplateContentDetailOutputVO.cs
@@ -38,4 +38,9 @@ public class GetTrackTemplateContentDetailOutputVO
/// 轨迹状态id
///
public int TrackStatusId { get; set; }
+
+ ///
+ /// 轨迹模板id
+ ///
+ public int TrackTemplateId { get; set; }
}
\ No newline at end of file