Explorar el Código

Merge branch 'feature/snapshot' into test

qinchaoyue hace 1 semana
padre
commit
c6d15adbf1

+ 6 - 1
src/Hotline.Application/Snapshot/RedPackApplication.cs

@@ -247,9 +247,14 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
         var industry = await _industryRepository.Queryable(includeDeleted: true)
             .LeftJoin<OrderSnapshot>((i, o) => i.Id == o.IndustryId)
             .Where((i, o) => o.Id == id)
-            .Select((i, o) => new { i.Id, i.CitizenReadPackAmount, i.ArgeePoints, i.ExtraDeductedPoints, i.RefusePoints, i.IsPoints })
+            .Select((i, o) => new { i.Id, i.CitizenReadPackAmount, i.ArgeePoints, i.ExtraDeductedPoints, i.RefusePoints, i.IsPoints,
+            o.IsSafetyDepartment, i.Name})
             .FirstAsync();
         outDto.Amount = industry.CitizenReadPackAmount;
+        if (industry.Name == "安全隐患" && industry.IsSafetyDepartment.HasValue && industry.IsSafetyDepartment == true)
+        {
+            outDto.Amount = 20;
+        }
         outDto.ArgeePoints = industry.ArgeePoints;
         outDto.ExtraDeductedPoints = industry.ExtraDeductedPoints;
         outDto.RefusePoints = industry.RefusePoints;

+ 8 - 0
src/Hotline/Snapshot/Contracts/ISnapshotPointsDomainService.cs

@@ -12,5 +12,13 @@ namespace Hotline.Snapshot.Contracts;
 /// </summary>
 public interface ISnapshotPointsDomainService
 {
+    /// <summary>
+    /// 新增积分
+    /// </summary>
+    /// <param name="orderId"></param>
+    /// <param name="source"></param>
+    /// <param name="status"></param>
+    /// <param name="extraDeductedPoints"></param>
+    /// <returns></returns>
     Task AddPointsAsync(string orderId, EPointsSource source, ESnapshotSMSStatus? status, int? extraDeductedPoints);
 }