瀏覽代碼

Merge branch 'feature/snapshot' into test

qinchaoyue 1 月之前
父節點
當前提交
033ccbcd9a

+ 1 - 0
src/Hotline.Application/Snapshot/SnapshotApplicationBase.cs

@@ -338,6 +338,7 @@ public abstract class SnapshotApplicationBase
             .WhereIF(dto.Status == EOrderQueryStatus.NoReply, (snapshot, order) => order.Status < EOrderStatus.Filed)
             .WhereIF(dto.Status == EOrderQueryStatus.Reply, (snapshot, order) => order.Status >= EOrderStatus.Filed)
             .WhereIF(dto.KeyWords.NotNullOrEmpty(), (snapshot, order) => order.Title.Contains(dto.KeyWords) || order.No.Contains(dto.KeyWords))
+            .OrderByDescending((snapshot, order) => snapshot.CreationTime)
             .Select((snapshot, order) => new OrderOutDto
             {
                 Id = snapshot.Id,

+ 5 - 0
src/Hotline.Share/Dtos/Snapshot/OrderPublishDto.cs

@@ -120,6 +120,11 @@ public class OrderPublishDetailOutDto : OrderPublishOutDto
     /// 线索名称
     /// </summary>
     public string HotspotSpliceName { get; set; }
+
+    /// <summary>
+    /// 上报时间
+    /// </summary>
+    public DateTime CreationTime { get; set; }
 }
 
 public class SnapshotWorkflow

+ 6 - 0
test/Hotline.Tests/Application/OrderApplicationTest.cs

@@ -3,7 +3,9 @@ using Hotline.Caching.Interfaces;
 using Hotline.Orders;
 using Hotline.Push.FWMessage;
 using Hotline.Push.Notifies;
+using Hotline.Settings;
 using Hotline.Share.Dtos.Order;
+using Hotline.Share.Dtos.Settings;
 using Hotline.Share.Enums.Order;
 using Mapster;
 using Shouldly;
@@ -55,5 +57,9 @@ public class OrderApplicationTest
         var m = data.Adapt<ReceiveMessageNotify>();
         m.NotifyDto.Name.ShouldBe(data.Name);
         m.NotifyDto.PushBusiness.ShouldBe(data.PushBusiness);
+
+        var a = new SystemDicData { Id = "123"};
+        var b = a.Adapt<SystemDicDataOutDto>();
+        b.ShouldNotBeNull();
     }
 }