Browse Source

Merge branch 'feature/snapshot' into dev

qinchaoyue 3 weeks ago
parent
commit
fc4e41ef0d

+ 9 - 4
src/Hotline.Share/Dtos/Snapshot/IndustryDto.cs

@@ -178,22 +178,27 @@ public class IndustryOutDto
     /// <summary>
     /// 上报积分
     /// </summary>
-    public int ReportPoints { get; set; }
+    public int? ReportPoints { get; set; }
 
     /// <summary>
     /// 审核同意积分
     /// </summary>
-    public int ArgeePoints { get; set; }
+    public int? ArgeePoints { get; set; }
 
     /// <summary>
     /// 审核不同意扣除积分
     /// </summary>
-    public int RefusePoints { get; set; }
+    public int? RefusePoints { get; set; }
 
     /// <summary>
     /// 额外扣除积分
     /// </summary>
-    public int ExtraDeductedPoints { get; set; }
+    public int? ExtraDeductedPoints { get; set; }
+
+    /// <summary>
+    /// 是否开启积分
+    /// </summary>
+    public bool? IsPoints { get; set; }
 
 }
 

+ 7 - 5
test/Hotline.Tests/Application/SnapshotApplicationTest.cs

@@ -471,17 +471,19 @@ public class SnapshotApplicationTest : TestBase
             ArgeePoints = 3,
             ExtraDeductedPoints = 2,
             RefusePoints = 1,
-            ReportPoints = 4
+            ReportPoints = 4,
+            IsPoints = false
         };
         var industryId = await _industryApplication.AddIndustryAsync(industry, CancellationToken.None);
         var pageDto = await _snapshotApplication.GetIndustryBaseAsync(industryId, CancellationToken.None);
         var industryOut = await _industryApplication.GetIndustryDetailAsync(industryId, CancellationToken.None);
         try
         {
-            industryOut.ArgeePoints.ShouldBe(industry.ArgeePoints);
-            industryOut.ExtraDeductedPoints.ShouldBe(industry.ExtraDeductedPoints);
-            industryOut.RefusePoints.ShouldBe(industry.RefusePoints);
-            industryOut.ReportPoints.ShouldBe(industry.ReportPoints);
+            industryOut.ArgeePoints.Value.ShouldBe(industry.ArgeePoints.Value);
+            industryOut.ExtraDeductedPoints.Value.ShouldBe(industry.ExtraDeductedPoints.Value);
+            industryOut.RefusePoints.Value.ShouldBe(industry.RefusePoints.Value);
+            industryOut.ReportPoints.Value.ShouldBe(industry.ReportPoints.Value);
+            industryOut.IsPoints.ShouldBe(industry.IsPoints);
             pageDto.ShouldNotBeNull();
             pageDto.Files.ShouldNotBeNull();
             foreach (var file in pageDto.Files)