Ver código fonte

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

Dun.Jason 23 horas atrás
pai
commit
d7ac4ab35f
44 arquivos alterados com 271 adições e 79 exclusões
  1. 2 2
      src/Hotline.Api/Controllers/IdentityController.cs
  2. 1 1
      src/Hotline.Api/Controllers/Snapshot/BiSnapshotController.cs
  3. 12 3
      src/Hotline.Api/Controllers/Snapshot/SnapshotBulletinController.cs
  4. 1 0
      src/Hotline.Api/Controllers/Snapshot/SnapshotController.cs
  5. 1 6
      src/Hotline.Application/Exam/Service/ExamManages/ExtractRuleService.cs
  6. 0 5
      src/Hotline.Application/Exam/Service/Questions/QuestionService.cs
  7. 2 2
      src/Hotline.Application/Exam/Service/TestPapers/TestPaperService.cs
  8. 17 10
      src/Hotline.Application/Exam/Service/Trains/TrainRecordService.cs
  9. 2 2
      src/Hotline.Application/Identity/IIdentityAppService.cs
  10. 3 3
      src/Hotline.Application/Identity/IdentityAppService.cs
  11. 5 0
      src/Hotline.Application/Knowledge/KnowApplication.cs
  12. 1 0
      src/Hotline.Application/Snapshot/Contracts/ISnapshotApplication.cs
  13. 0 0
      src/Hotline.Application/Snapshot/DefaultSnapshotApplication.cs
  14. 2 1
      src/Hotline.Application/Snapshot/RedPackApplication.cs
  15. 42 1
      src/Hotline.Application/Snapshot/SnapshotApplicationBase.cs
  16. 6 9
      src/Hotline.Application/Snapshot/SnapshotBulletinApplication.cs
  17. 0 1
      src/Hotline.Repository.SqlSugar/Exam/Validators/Sourcewares/SourcewareCategoryValidator.cs
  18. 1 0
      src/Hotline.Share/Dtos/Knowledge/KnowedgeStatisticsDto.cs
  19. 5 1
      src/Hotline.Share/Dtos/Snapshot/NotifyDto.cs
  20. 64 0
      src/Hotline.Share/Dtos/Snapshot/PointsDto.cs
  21. 10 2
      src/Hotline.Share/Dtos/Snapshot/SnapshotBulletinDto.cs
  22. 6 0
      src/Hotline.Share/Dtos/Sourcewares/SourcewareCategoryDto.cs
  23. 1 1
      src/Hotline.Share/Dtos/Sourcewares/SourcewareDto.cs
  24. 28 0
      src/Hotline.Share/Enums/Snapshot/EBulletinShape.cs
  25. 6 0
      src/Hotline.Share/Enums/Snapshot/ENotificationType.cs
  26. 6 0
      src/Hotline.Share/Enums/Snapshot/EPointsSource.cs
  27. 5 0
      src/Hotline.Share/Tools/DataMaskExtensions.cs
  28. 2 1
      src/Hotline/Snapshot/Contracts/ISnapshotPointsDomainService.cs
  29. 7 0
      src/Hotline/Snapshot/Notification.cs
  30. 12 2
      src/Hotline/Snapshot/Services/SnapshotPointsDomainService.cs
  31. 4 3
      src/Hotline/Snapshot/SnapshotBulletin.cs
  32. 5 0
      src/Hotline/Snapshot/SnapshotPointsRecord.cs
  33. 0 1
      src/Hotline/Validators/Exams/ExamManages/UpdateRuleTagDtoValidator.cs
  34. 0 1
      src/Hotline/Validators/Exams/ExamManages/UpdateTagQuestionDtoValidator.cs
  35. 0 1
      src/Hotline/Validators/Exams/Questions/UpdateQuestionOptionsDtoValidator.cs
  36. 0 1
      src/Hotline/Validators/Exams/Questions/UpdateQuestionSourcewareDtoValidator.cs
  37. 0 2
      src/Hotline/Validators/Exams/Sourcewares/AddSourcewareDtoValidator.cs
  38. 0 1
      src/Hotline/Validators/Exams/Sourcewares/UpdateSourcewareDtoValidator.cs
  39. 0 2
      src/Hotline/Validators/Exams/TestPapers/UpdateTestPaperItemDtoValidator.cs
  40. 0 2
      src/Hotline/Validators/Exams/TestPapers/UpdateTestPaperRuleDtoValidator.cs
  41. 1 1
      src/Hotline/Validators/Order/AddOrderDtoValidator.cs
  42. 4 4
      test/Hotline.Tests/Application/PointsRecordApplicationTest.cs
  43. 2 2
      test/Hotline.Tests/Application/SnapshotApplicationTest.cs
  44. 5 5
      test/Hotline.Tests/Application/SnapshotBulletionApplicationTest.cs

+ 2 - 2
src/Hotline.Api/Controllers/IdentityController.cs

@@ -119,7 +119,7 @@ jxrWXHbT1FB6DqkdOnBbQqS1Azqz5HxLlSyEK3F60e3SgB5iZsDZ
     [AllowAnonymous]
     [HttpPost("third/token")]
     public async Task<Dictionary<string, object>> GetThirdTokenAsync([FromBody] ThirdTokenInDto dto)
-        => await _identityAppService.GetThredTokenAsync(dto, HttpContext.RequestAborted);
+        => await _identityAppService.GetThirdTokenAsync(dto, HttpContext.RequestAborted);
 
 
     /// <summary>
@@ -130,7 +130,7 @@ jxrWXHbT1FB6DqkdOnBbQqS1Azqz5HxLlSyEK3F60e3SgB5iZsDZ
     [LogFilterAlpha("老系统微信用户登录")]
     [HttpPost("third/login")]
     public async Task<Dictionary<string, object>> GetThirdLoginAsync([FromBody] ThirdOpenIdInDto dto)
-            => await _identityAppService.GetThredTokenAsync(dto, HttpContext.RequestAborted);
+            => await _identityAppService.GetThirdTokenAsync(dto, HttpContext.RequestAborted);
 
     /// <summary>
     /// 根据OpenId刷新令牌

+ 1 - 1
src/Hotline.Api/Controllers/Snapshot/BiSnapshotController.cs

@@ -334,6 +334,6 @@ public class BiSnapshotController : BaseController
     /// <param name="dto"></param>
     /// <returns></returns>
     [HttpGet("county_points")]
-    public async Task<IList<SnapshotCountyPointsStatisticsOutDto>> Get([FromQuery] SnapshotCountyPointsStatisticsInDto dto)
+    public async Task<IList<SnapshotCountyPointsStatisticsOutDto>> GetAreaPointsStatistics([FromQuery] SnapshotCountyPointsStatisticsInDto dto)
         => await _biSnapshotApplication.GetAreaPointsStatistics(dto).ToListAsync(HttpContext.RequestAborted);
 }

+ 12 - 3
src/Hotline.Api/Controllers/Snapshot/SnapshotBulletinController.cs

@@ -57,12 +57,21 @@ public class SnapshotBulletinController : BaseController
     {
         var model = await _bulletinRepository.Queryable()
             .Includes(x => x.ExaminMan)
-            .FirstAsync(x => x.Id == id, HttpContext.RequestAborted);
+            .FirstAsync(x => x.Id == id, HttpContext.RequestAborted)
+            ?? throw UserFriendlyException.SameMessage("公告不存在");
 
         if (model != null && !string.IsNullOrEmpty(model.Content))
             model.Content = _bulletinApplication.GetSiteUrls(model.Content);
 
-        return model.Adapt<SnapshotBulletinDetailOutDto>();
+        var outDto = model.Adapt<SnapshotBulletinDetailOutDto>();
+        if (outDto.SafetyTypeId.NotNullOrEmpty())
+        {
+            outDto.SafetyTypeNames = await _safetyTypeRepository.Queryable()
+                .Where(m => outDto.SafetyTypeId.Contains(m.Id))
+                .Select(m => m.Name)
+                .ToListAsync();
+        }
+        return outDto;
     }
 
     /// <summary>
@@ -180,7 +189,7 @@ public class SnapshotBulletinController : BaseController
     public async Task<object> BulletinAddBaseData()
     {
         var safetyTypes = await _safetyTypeRepository.Queryable()
-            .Select(m => new SystemDicDataOutDto { Id =  m.Id, DicDataName = m.Name , DicDataValue = m.Id})
+            .Select(m => new SystemDicDataOutDto { Id = m.Id, DicDataName = m.Name, DicDataValue = m.Id })
             .ToListAsync(HttpContext.RequestAborted);
         var rsp = new
         {

+ 1 - 0
src/Hotline.Api/Controllers/Snapshot/SnapshotController.cs

@@ -32,6 +32,7 @@ using XF.Domain.Authentications;
 using XF.Domain.Exceptions;
 using XF.Domain.Filters;
 using XF.Domain.Repository;
+using BulletinOutDto = Hotline.Share.Dtos.Article.BulletinOutDto;
 
 namespace Hotline.Api.Controllers.Snapshot;
 

+ 1 - 6
src/Hotline.Application/Exam/Service/ExamManages/ExtractRuleService.cs

@@ -211,7 +211,6 @@ namespace Hotline.Application.Exam.Service.ExamManages
             var expression = tagQuestionRequest.GetExpression();
             var questionTagTable = new ExamRepository<ExamQuestionTag>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable().Where(expression);
             var questionTable = new ExamRepository<ExamQuestion>(_uow, _dataPermissionFilterBuilder, _serviceProvider).Queryable();
-
             var queryable = questionTagTable.LeftJoin(questionTable, (t, q) => t.QuestionId == q.Id)
                 .GroupBy((t, q) => new { t.TagId, q.QuestionType })
                 .OrderBy((t, q) => t.TagId)
@@ -219,11 +218,7 @@ namespace Hotline.Application.Exam.Service.ExamManages
                 {
                     TagId = t.TagId,
                     QuestionType = q.QuestionType,
-                    TotalCount = SqlFunc.AggregateCount(new
-                    {
-                        TagId = t.TagId,
-                        QuestionType = q.QuestionType,
-                    })
+                    TotalCount = SqlFunc.AggregateCount(q.Id!=null)
                 });
 
             return await queryable.ToListAsync();

+ 0 - 5
src/Hotline.Application/Exam/Service/Questions/QuestionService.cs

@@ -36,11 +36,6 @@ using Hotline.Exams.ExamManages;
 using Hotline.Exams.Questions;
 using Hotline.Repository.SqlSugar.Exam.Repositories;
 using Hotline.Share.Dtos.TestPapers;
-using ExamQuestion = Hotline.Exams.Questions.ExamQuestion;
-using ExamQuestionAnswer = Hotline.Exams.Questions.ExamQuestionAnswer;
-using ExamQuestionKnowladge = Hotline.Exams.Questions.ExamQuestionKnowladge;
-using ExamQuestionOptions = Hotline.Exams.Questions.ExamQuestionOptions;
-using ExamQuestionSourceware = Hotline.Exams.Questions.ExamQuestionSourceware;
 using Hotline.Repository.SqlSugar.Exam.Service;
 using Hotline.Repository.SqlSugar.Exam.Extensions;
 

+ 2 - 2
src/Hotline.Application/Exam/Service/TestPapers/TestPaperService.cs

@@ -394,10 +394,10 @@ namespace Hotline.Application.Exam.Service.TestPapers
             var tagQuestionTable = tagQuestionRepository.Queryable().Where(expression);
             var questionTable = quesitonRepository.Queryable().Where(questionExpression);
 
-            var taqQuestions = await tagQuestionTable.LeftJoin(questionTable, (t, q) => t.QuestionId == q.Id)
+            var taqQuestions = await tagQuestionTable.InnerJoin(questionTable, (t, q) => t.QuestionId == q.Id)
                 .Select((t, q) => new TagQuestionCountViewResponse
                 {
-                    TotalCount = SqlFunc.AggregateCount(t.Id)
+                    TotalCount = SqlFunc.AggregateCount(q.Id!=null)
                 })
                 .ToListAsync();
 

+ 17 - 10
src/Hotline.Application/Exam/Service/Trains/TrainRecordService.cs

@@ -296,6 +296,18 @@ namespace Hotline.Application.Exam.Service.Trains
         }
 
         private SqlSugar.ISugarQueryable<SimpleQuestionDto> QueryQuestions(EntityQueryRequest entityQueryRequest)
+        {
+            SqlSugar.ISugarQueryable<ExamTrainRecord, ExamTrainPlan, ExamTrainPlanTemplate, ExamTrainPractice> queryable = QuestionQueryable(entityQueryRequest);
+
+            var result = queryable.Select((r, p, tpt, tp) => new SimpleQuestionDto
+            {
+                Title = tp.Title,
+                Id = tp.Id
+            });
+            return result;
+        }
+
+        private SqlSugar.ISugarQueryable<ExamTrainRecord, ExamTrainPlan, ExamTrainPlanTemplate, ExamTrainPractice> QuestionQueryable(EntityQueryRequest entityQueryRequest)
         {
             var trainPlanRepository = new ExamRepository<ExamTrainPlan>(_uow, _dataPermissionFilterBuilder, _serviceProvider);
             var trainPracticeRepository = new ExamRepository<ExamTrainPractice>(_uow, _dataPermissionFilterBuilder, _serviceProvider);
@@ -308,26 +320,21 @@ namespace Hotline.Application.Exam.Service.Trains
 
             var queryable = trainRecordTable.InnerJoin(trainPlanTable, (r, p) => r.TrainPlanId == p.Id)
                 .InnerJoin(trainPlanTemplateTable, (r, p, tpt) => p.Id == tpt.TrainPlanId)
-                .InnerJoin(trainPracticeTable, (r, p, tpt, tp) => tpt.Id == tp.TrainTemplateId)
-                .Select((r, p, tpt, tp) => new SimpleQuestionDto
-                {
-                    Title = tp.Title,
-                    Id = tp.Id
-                });
+                .InnerJoin(trainPracticeTable, (r, p, tpt, tp) => tpt.TrainTemplateId == tp.TrainTemplateId);
             return queryable;
         }
 
         private async Task<List<SimpleKnowladgeDto>> GetKnowladges(EntityQueryRequest entityQueryRequest)
         {
-            var questionTable = QueryQuestions(entityQueryRequest);
+            var questionTable = QuestionQueryable(entityQueryRequest);
             var questionSourcewareRepository = new ExamRepository<ExamPracticeQuestionSourceware>(_uow, _dataPermissionFilterBuilder, _serviceProvider);
             var sourcewareRepository = new ExamRepository<KnowledgeBase.Knowledge>(_uow, _dataPermissionFilterBuilder, _serviceProvider);
             var questionSourcewareTable = questionSourcewareRepository.Queryable();
             var sourcewareTable = sourcewareRepository.Queryable();
 
-            var queryable = questionTable.InnerJoin(questionSourcewareTable, (r, p) => r.Id == p.QuestionId)
-                .InnerJoin(sourcewareTable, (r, p, sw) => p.SourcewareId == sw.Id)
-                .Select((r, p, sw) => new SimpleKnowladgeDto
+            var queryable = questionTable.InnerJoin(questionSourcewareTable, (r, p, tpt, tp, ExamPracticeQuestionSourceware) => r.Id == ExamPracticeQuestionSourceware.QuestionId)
+                .InnerJoin(sourcewareTable, (r, p, tpt, tp, ExamPracticeQuestionSourceware,sw) => ExamPracticeQuestionSourceware.SourcewareId == sw.Id)
+                .Select((r, p, tpt, tp, ExamPracticeQuestionSourceware, sw) => new SimpleKnowladgeDto
                 {
                     Title = sw.Title,
                     Id = sw.Id

+ 2 - 2
src/Hotline.Application/Identity/IIdentityAppService.cs

@@ -20,7 +20,7 @@ namespace Hotline.Application.Identity
         /// <param name="dto"></param>
         /// <returns></returns>
         /// <exception cref="UserFriendlyException"></exception>
-        Task<Dictionary<string, object>> GetThredTokenAsync(ThirdTokenInDto dto, CancellationToken token);
+        Task<Dictionary<string, object>> GetThirdTokenAsync(ThirdTokenInDto dto, CancellationToken token);
 
         /// <summary>
         /// 第三方登录
@@ -28,7 +28,7 @@ namespace Hotline.Application.Identity
         /// <param name="dto"></param>
         /// <param name="token"></param>
         /// <returns></returns>
-        Task<Dictionary<string, object>> GetThredTokenAsync(ThirdOpenIdInDto dto, CancellationToken token);
+        Task<Dictionary<string, object>> GetThirdTokenAsync(ThirdOpenIdInDto dto, CancellationToken token);
 
         /// <summary>
         /// 根据OpenId刷新令牌

+ 3 - 3
src/Hotline.Application/Identity/IdentityAppService.cs

@@ -330,7 +330,7 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
     /// <param name="dto"></param>
     /// <returns></returns>
     /// <exception cref="UserFriendlyException"></exception>
-    public async Task<Dictionary<string, object>> GetThredTokenAsync(ThirdTokenInDto dto, CancellationToken token)
+    public async Task<Dictionary<string, object>> GetThirdTokenAsync(ThirdTokenInDto dto, CancellationToken token)
     {
         var thirdDto = dto.Adapt<ThirdTokenDto>();
         thirdDto = await _thirdAccountDomainFactory.GetThirdParameterAsync(thirdDto, token);
@@ -345,10 +345,10 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
             ThirdType = dto.ThirdType,
             PhoneNumber = phone.PhoneNumber
         };
-        return await GetThredTokenAsync(inDto, token);
+        return await GetThirdTokenAsync(inDto, token);
     }
 
-    public async Task<Dictionary<string, object>> GetThredTokenAsync(ThirdOpenIdInDto dto, CancellationToken token)
+    public async Task<Dictionary<string, object>> GetThirdTokenAsync(ThirdOpenIdInDto dto, CancellationToken token)
     {
         var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(dto.OpenId, token);
 

+ 5 - 0
src/Hotline.Application/Knowledge/KnowApplication.cs

@@ -523,11 +523,16 @@ namespace Hotline.Application.Knowledge
                     .WhereIF(dto.StartTime.HasValue, p => p.LastModificationTime >= dto.StartTime)
                     .WhereIF(dto.EndTime.HasValue, p => p.LastModificationTime <= dto.EndTime)
                     .WhereIF(!string.IsNullOrEmpty(dto.Keyword), p => p.SourceOrganize.Name.Contains(dto.Keyword))
+                  //  .GroupBy(p => new { p.SourceOrganize.Name, p.LastModificationTime })
                     .Select(p => new KnowedgeStatisticsDto
                     {
+                       // Index = SqlFunc.RowNumber($"{p.LastModificationTime} desc "),\
+                       Index= SqlFunc.RowNumber($"{p.LastModificationTime} desc ", $"{p.SourceOrganize.Name}"),
                         LastModificationTime = p.LastModificationTime,
                         OrgName = p.SourceOrganize.Name
                     })
+                    .MergeTable()
+                    .Where(p => p.Index == 1)
                     .OrderByDescending(p => p.LastModificationTime);
         }
     }

+ 1 - 0
src/Hotline.Application/Snapshot/Contracts/ISnapshotApplication.cs

@@ -2,6 +2,7 @@
 using Hotline.Share.Dtos.Article;
 using Hotline.Share.Dtos.Snapshot;
 using Hotline.Snapshot;
+using BulletinOutDto = Hotline.Share.Dtos.Article.BulletinOutDto;
 
 namespace Hotline.Application.Snapshot.Contracts;
 public interface ISnapshotApplication

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/Hotline.Application/Snapshot/DefaultSnapshotApplication.cs


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

@@ -148,7 +148,8 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
             await _redPackRecordRepository.AddAsync(entity);
         }
         await _redPackAuditRepository.UpdateAsync(redPackAudit, token);
-        await _snapshotPointsDomainService.AddPointsAsync(order.Id, EPointsSource.Audit, dto.PointsStatus, dto.ExtraDeductedPoints);
+        await _snapshotPointsDomainService
+            .AddPointsAsync(order.Id, EPointsSource.Audit, dto.PointsStatus, dto.ExtraDeductedPoints, dto.ExtraDeductionPointsTypeName);
         if (dto.IsSendSms)
         {
             var smsTemplate = await _snapshotSMSTemplateRepository.GetAsync(dto.SMSTemplateId);

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

@@ -41,6 +41,7 @@ using Hotline.Settings.Hotspots;
 using Microsoft.Extensions.Options;
 using XF.Utility.MQ;
 using System.Threading;
+using BulletinOutDto = Hotline.Share.Dtos.Article.BulletinOutDto;
 using NPOI.SS.Formula.Functions;
 
 namespace Hotline.Application.Snapshot;
@@ -398,7 +399,7 @@ public abstract class SnapshotApplicationBase
     {
         var items = await _notificationReceiverRepository.Queryable()
             .LeftJoin<Notification>((m , notify) => m.NotificationId == notify.Id)
-            .Where(m => m.ReceiverId == _sessionContext.UserId)
+            .Where((m, notify) => m.ReceiverId == _sessionContext.UserId && dto.NotifyType == notify.NotifyType)
             .Select((m, notify) => new GetNotifyOutDto 
             {
                 NotificationId = m.NotificationId,
@@ -1058,6 +1059,46 @@ public abstract class SnapshotApplicationBase
             item.Insert(0, my);
         }
         outDto.Ranks = item;
+
+
+        outDto.VideoBulletin = await _notificationReceiverRepository.Queryable()
+            .LeftJoin<Notification>((receiver, notify) => notify.Id == receiver.NotificationId)
+            .LeftJoin<SnapshotBulletin>((receiver, notify, bulletin) => bulletin.Id == notify.ExternalId)
+            .Where((receiver, notify) => receiver.ReceiverId == _sessionContext.UserId)
+            .GroupBy((receiver, notify, bulletin) => new 
+            {
+                notify.Title,
+                notify.ExternalId,
+                bulletin.SnapshotBulletinTypeName,
+                bulletin.VideoCoverImgUrl,
+                notify.CreationTime
+            })
+            .OrderByDescending((receiver, notify) => notify.CreationTime)
+            .Select((receiver, notify, bulletin) => new VideoBulletinOutDto
+            {
+                Title = notify.Title,
+                BulletinId = notify.ExternalId,
+                UnReadCount = SqlFunc.AggregateSum(SqlFunc.IIF( receiver.IsRead == false, 1, 0)),
+                SnapshotBulletinTypeName = bulletin.SnapshotBulletinTypeName,
+                VideoCoverImgUrl = bulletin.VideoCoverImgUrl,
+            }).FirstAsync();
+
+        outDto.Bulletins = new PointsBulletinOutDto
+        {
+            Items = await _notificationReceiverRepository.Queryable()
+                .LeftJoin<Notification>((receiver, notify) => notify.Id == receiver.NotificationId)
+                .Select((receiver, notify) => new PointsBulletinItemsOutDto
+                {
+                    BulletinId = notify.ExternalId,
+                    Title = notify.Title,
+                }, true)
+                .Take(2)
+                .ToListAsync(),
+            UnReadCount = await _notificationReceiverRepository.Queryable()
+            .Where(m => m.IsRead == false && m.ReceiverId == _sessionContext.UserId)
+            .CountAsync()
+        };
+
         return outDto;
     }
     #endregion

+ 6 - 9
src/Hotline.Application/Snapshot/SnapshotBulletinApplication.cs

@@ -1,5 +1,4 @@
-using DocumentFormat.OpenXml.Vml.Office;
-using DotNetCore.CAP;
+using DotNetCore.CAP;
 using Hotline.Application.Snapshot.Contracts;
 using Hotline.Caching.Interfaces;
 using Hotline.Orders;
@@ -14,14 +13,9 @@ using Hotline.Snapshot;
 using Hotline.Snapshot.Contracts;
 using Hotline.Snapshot.IRepository;
 using Mapster;
-using Microsoft.AspNetCore.Http;
 using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Threading.Tasks;
 using XF.Domain.Authentications;
 using XF.Domain.Dependency;
 using XF.Domain.Exceptions;
@@ -85,7 +79,7 @@ public class SnapshotBulletinApplication : ISnapshotBulletinApplication, IScopeD
         await _bulletinRepository.GetAsync(bullutionId, token)
             .Then(async bulletion =>
             {
-                if (bulletion!.IsSnapshot == false) return;
+                if (bulletion!.SnapshotBulletinTypeId != "aqws") return;
                 if (bulletion!.SafetyTypeId!.IsNullOrEmpty()) return;
                 foreach (var safetyTypeId in bulletion!.SafetyTypeId!)
                 {
@@ -99,10 +93,11 @@ public class SnapshotBulletinApplication : ISnapshotBulletinApplication, IScopeD
                         {
                             var inDto = bulletion.Adapt<AddNotifyInDto>();
                             inDto.UserIds = citizenIds;
-                            if (bulletion.VideoPath.NotNullOrEmpty())
+                            if (bulletion.Shape != null && bulletion.Shape == EBulletinShape.Video)
                             {
                                 inDto.NotifyType = ENotificationType.Video;
                             }
+                            inDto.ExternalId = bulletion.Id;
                             await _notificationDomainService.AddNotifyAsync(inDto, token);
                         });
                 }
@@ -192,6 +187,8 @@ public class SnapshotBulletinApplication : ISnapshotBulletinApplication, IScopeD
         var model = dto.Adapt<SnapshotBulletin>();
         model.BulletinState = EBulletinState.Draft;
         model.ReadedNum = 0;
+        if (model.Content.IsNullOrEmpty())
+            model.Content = " ";
         if (model.BulletinTime.HasValue == false) model.BulletinTime = DateTime.Now;
         return await _bulletinRepository.AddAsync(model, token);
     }

+ 0 - 1
src/Hotline.Repository.SqlSugar/Exam/Validators/Sourcewares/SourcewareCategoryValidator.cs

@@ -46,7 +46,6 @@ namespace Exam.Repository.Sqlsugar.Validators.Sourcewares
         {
             base.BaseValidateRule();
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Name))));
-            RuleFor(m => m.SortIndex).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.SortIndex))));
         }
 
         protected override void ValidateRuleWithAdd()

+ 1 - 0
src/Hotline.Share/Dtos/Knowledge/KnowedgeStatisticsDto.cs

@@ -2,6 +2,7 @@
 {
     public class KnowedgeStatisticsDto
     {
+        public int Index { get; set; }
         public string? OrgName { get; set; }
 
         public DateTime? LastModificationTime { get; set; }

+ 5 - 1
src/Hotline.Share/Dtos/Snapshot/NotifyDto.cs

@@ -29,6 +29,8 @@ public class AddNotifyInDto
     /// </summary>
     public ENotificationType NotifyType { get; set; }
 
+    public string ExternalId { get; set; }
+
     /// <summary>
     /// 用户
     /// </summary>
@@ -38,7 +40,9 @@ public class AddNotifyInDto
 public class GetNotifyInDto : QueryFixedDto
 {
     /// <summary>
-    /// 消息类型
+    /// 消息类型:
+    /// 0: 通知公告
+    /// 1: 宣传视频
     /// </summary>
     public ENotificationType NotifyType { get; set; }
 }

+ 64 - 0
src/Hotline.Share/Dtos/Snapshot/PointsDto.cs

@@ -115,6 +115,70 @@ public class PointsRankOutDto
     /// 排行
     /// </summary>
     public IList<PointsRankUserDto> Ranks { get; set; }
+
+    /// <summary>
+    /// 视频公告
+    /// </summary>
+    public VideoBulletinOutDto VideoBulletin { get; set; }
+
+    /// <summary>
+    /// 通知公告
+    /// </summary>
+    public PointsBulletinOutDto Bulletins { get; set; }
+}
+
+public class PointsBulletinOutDto
+{
+    /// <summary>
+    /// 未读个数
+    /// </summary>
+    public int UnReadCount { get; set; }
+
+    /// <summary>
+    /// Summary
+    /// </summary>
+    public IList<PointsBulletinItemsOutDto> Items { get; set; }
+}
+
+public class PointsBulletinItemsOutDto
+{
+    /// <summary>
+    /// Id
+    /// </summary>
+    public string BulletinId { get; set; }
+
+    /// <summary>
+    /// 标题
+    /// </summary>
+    public string Title { get; set; }
+}
+
+public class VideoBulletinOutDto
+{
+    /// <summary>
+    /// Id
+    /// </summary>
+    public string BulletinId { get; set; }
+
+    /// <summary>
+    /// 标题
+    /// </summary>
+    public string Title { get; set; }
+
+    /// <summary>
+    /// 栏目
+    /// </summary>
+    public string SnapshotBulletinTypeName { get; set; }
+
+    /// <summary>
+    /// 视频封面
+    /// </summary>
+    public string VideoCoverImgUrl { get; set; }
+
+    /// <summary>
+    /// 未读个数
+    /// </summary>
+    public int UnReadCount { get; set; }
 }
 
 public class PointsRankUserDto

+ 10 - 2
src/Hotline.Share/Dtos/Snapshot/SnapshotBulletinDto.cs

@@ -1,5 +1,6 @@
 using Hotline.Share.Dtos.Users;
 using Hotline.Share.Enums.Article;
+using Hotline.Share.Enums.Snapshot;
 using Hotline.Share.Requests;
 using System;
 using System.Collections.Generic;
@@ -163,6 +164,11 @@ public class SnapshotBulletinDetailOutDto : UpdateSnapshotBulletinInDto
     /// 上下架
     /// </summary>
     public bool IsArrive { get; set; }
+
+    /// <summary>
+    /// 类型
+    /// </summary>
+    public IList<string> SafetyTypeNames { get; set; }
 }
 
 public class UpdateSnapshotBulletinInDto : AddSnapshotBulletinInDto
@@ -256,9 +262,11 @@ public class AddSnapshotBulletinInDto
     public bool IsPopup { get; set; }
 
     /// <summary>
-    /// 是否随手拍
+    /// 公告形式
+    /// 0: 消息
+    /// 1: 视频
     /// </summary>
-    public bool? IsSnapshot { get; set; }
+    public EBulletinShape? Shape { get; set; }
 
     /// <summary>
     /// 志愿者类型Id

+ 6 - 0
src/Hotline.Share/Dtos/Sourcewares/SourcewareCategoryDto.cs

@@ -27,6 +27,12 @@ namespace Hotline.Share.Dtos.Sourcewares
         /// </summary>
         [Description("父级ID")]
         public string ParentId { get; set; }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        [Description("排序")]
+        public int? SortIndex { get; set; }
     }
 
     /// <summary>

+ 1 - 1
src/Hotline.Share/Dtos/Sourcewares/SourcewareDto.cs

@@ -33,7 +33,7 @@ namespace Hotline.Share.Dtos.Sourcewares
         /// 课件分类Id
         /// </summary>
         [Description("课件分类Id")]
-        public string CategoryId { get; set; }
+        public string? CategoryId { get; set; }
 
         /// <summary>
         /// 附件Id

+ 28 - 0
src/Hotline.Share/Enums/Snapshot/EBulletinShape.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Enums.Snapshot;
+
+/// <summary>
+/// 公告形式
+/// 0: 消息
+/// 1: 视频
+/// </summary>
+public enum EBulletinShape
+{
+    /// <summary>
+    /// 消息
+    /// </summary>
+    [Description("消息")]
+    Message = 0,
+
+    /// <summary>
+    /// 视频
+    /// </summary>
+    [Description("视频")]
+    Video = 1
+}

+ 6 - 0
src/Hotline.Share/Enums/Snapshot/ENotificationType.cs

@@ -9,9 +9,15 @@ namespace Hotline.Share.Enums.Snapshot;
 
 public enum ENotificationType
 {
+    /// <summary>
+    /// 通知公告
+    /// </summary>
     [Description("消息")]
     Message = 0,
 
+    /// <summary>
+    /// 宣传视频
+    /// </summary>
     [Description("视频")]
     Video = 1
 }

+ 6 - 0
src/Hotline.Share/Enums/Snapshot/EPointsSource.cs

@@ -21,6 +21,12 @@ public enum EPointsSource
     [Description("审核积分")]
     Audit = 1,
 
+    /// <summary>
+    /// 额外扣除
+    /// </summary>
+    [Description("额外扣除")]
+    AuditDeduct = 2,
+
     /// <summary>
     /// 积分兑换
     /// </summary>

+ 5 - 0
src/Hotline.Share/Tools/DataMaskExtensions.cs

@@ -10,6 +10,9 @@ public static class DataMaskExtensions
 {
     public static string Mask(this string original, int startIndex = 0, int length = 4)
     {
+        if (original.IsNullOrEmpty()) return original;
+        if (original.Length <= startIndex + length) return original;
+
         var headStr = original.Substring(0, startIndex);
         var tailStr = original.Substring(startIndex + length);
         var sb = new StringBuilder(length);
@@ -23,12 +26,14 @@ public static class DataMaskExtensions
 
     public static string MaskPhoneNumber(this string original)
     {
+        if (original.IsNullOrEmpty()) return original;
         if (original.Length < 11) return string.Empty;
         return original.Mask(3, 4);
     }
 
     public static string MaskIdCard(this string original)
     {
+        if (original.IsNullOrEmpty()) return original;
         return original.Mask(3, 12);
     }
 }

+ 2 - 1
src/Hotline/Snapshot/Contracts/ISnapshotPointsDomainService.cs

@@ -19,6 +19,7 @@ public interface ISnapshotPointsDomainService
     /// <param name="source"></param>
     /// <param name="status"></param>
     /// <param name="extraDeductedPoints"></param>
+    /// <param name="extraDeductionPointsTypeName">额外扣除原因</param>
     /// <returns></returns>
-    Task AddPointsAsync(string orderId, EPointsSource source, ESnapshotSMSStatus? status, int? extraDeductedPoints);
+    Task AddPointsAsync(string orderId, EPointsSource source, ESnapshotSMSStatus? status, int? extraDeductedPoints, string? extraDeductionPointsTypeName = "");
 }

+ 7 - 0
src/Hotline/Snapshot/Notification.cs

@@ -1,4 +1,5 @@
 using Hotline.Share.Enums.Snapshot;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -24,4 +25,10 @@ public class Notification : CreationSoftDeleteEntity
     /// 类型
     /// </summary>
     public ENotificationType NotifyType { get; set; }
+
+    /// <summary>
+    /// 外部业务唯一标识
+    /// </summary>
+    [SugarColumn(ColumnDescription = "外部业务唯一标识")]
+    public string? ExternalId { get; set; }
 }

+ 12 - 2
src/Hotline/Snapshot/Services/SnapshotPointsDomainService.cs

@@ -1,5 +1,6 @@
 using Hotline.Orders;
 using Hotline.Share.Enums.Snapshot;
+using Hotline.Share.Tools;
 using Hotline.Snapshot.Contracts;
 using Hotline.Snapshot.IRepository;
 using System;
@@ -23,7 +24,7 @@ public class SnapshotPointsDomainService : ISnapshotPointsDomainService, IScopeD
         _pointsRecordRepository = snapshotPointsRecordRepository;
     }
 
-    public async Task AddPointsAsync(string orderId, EPointsSource source, ESnapshotSMSStatus? status, int? extraDeductedPoints)
+    public async Task AddPointsAsync(string orderId, EPointsSource source, ESnapshotSMSStatus? status, int? extraDeductedPoints, string? extraDeductionPointsTypeName = "")
     {
         if (status == null) return;
         var order = await _orderSnapshotRepository.Queryable()
@@ -62,8 +63,17 @@ public class SnapshotPointsDomainService : ISnapshotPointsDomainService, IScopeD
         if (source == EPointsSource.Audit && status == ESnapshotSMSStatus.Refuse)
         {
             points.Direction = Share.Enums.CallCenter.EPointsDirection.Out;
-            points.Points = order.RefusePoints ?? 0 + extraDeductedPoints ?? 0;
+            points.Points = order.RefusePoints ?? 0;
             points.Points *= -1;
+
+            if (extraDeductionPointsTypeName.NotNullOrEmpty() && extraDeductedPoints != null && extraDeductedPoints != 0)
+            {
+                var ex = points.ToJson().FromJson<SnapshotPointsRecord>();
+                ex.Source = EPointsSource.AuditDeduct;
+                ex.Points = extraDeductedPoints.Value * -1;
+                ex.Remark = extraDeductionPointsTypeName;
+                await _pointsRecordRepository.AddAsync(ex);
+            }
         }
         await _pointsRecordRepository.AddAsync(points);
     }

+ 4 - 3
src/Hotline/Snapshot/SnapshotBulletin.cs

@@ -1,5 +1,6 @@
 using Hotline.Share.Dtos;
 using Hotline.Share.Enums.Article;
+using Hotline.Share.Enums.Snapshot;
 using Hotline.Users;
 using SqlSugar;
 using System.ComponentModel;
@@ -177,10 +178,10 @@ public class SnapshotBulletin : CreationEntity
     }
 
     /// <summary>
-    /// 是否随手拍
+    /// 公告形式
     /// </summary>
-    [SugarColumn(ColumnDescription = "是否随手拍")]
-    public bool? IsSnapshot { get; set; }
+    [SugarColumn(ColumnDescription = "公告形式")]
+    public EBulletinShape? Shape { get; set; }
 
     /// <summary>
     /// 志愿者类型Id

+ 5 - 0
src/Hotline/Snapshot/SnapshotPointsRecord.cs

@@ -37,4 +37,9 @@ public class SnapshotPointsRecord : CreationEntity
     public int Points { get; set; }
 
     public string OrderId { get; set; }
+
+    /// <summary>
+    /// 备注
+    /// </summary>
+    public string? Remark { get; set; }
 }

+ 0 - 1
src/Hotline/Validators/Exams/ExamManages/UpdateRuleTagDtoValidator.cs

@@ -11,7 +11,6 @@ namespace Hotline.Validators.Exams.ExamManages
     {
         public UpdateRuleTagDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTag.Id))));
             RuleFor(m => m.TagId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamTag).GetDescription()));
         }
     }

+ 0 - 1
src/Hotline/Validators/Exams/ExamManages/UpdateTagQuestionDtoValidator.cs

@@ -11,7 +11,6 @@ namespace Hotline.Validators.Exams.ExamManages
     {
         public UpdateTagQuestionDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Id))));
             RuleFor(m => m.QuestionType).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.QuestionType))));
             RuleFor(m => m.Count).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Count))));
             RuleFor(m => m.TagId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamTag).GetDescription()));

+ 0 - 1
src/Hotline/Validators/Exams/Questions/UpdateQuestionOptionsDtoValidator.cs

@@ -11,7 +11,6 @@ namespace Hotline.Validators.Exams
         public UpdateQuestionOptionsDtoValidator()
         {
             RuleFor(m => m.Content).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestionOptions.Content))));
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestionOptions.Id))));
         }
     }
 }

+ 0 - 1
src/Hotline/Validators/Exams/Questions/UpdateQuestionSourcewareDtoValidator.cs

@@ -13,7 +13,6 @@ namespace Hotline.Validators.Exams.Questions
         public UpdateQuestionSourcewareDtoValidator()
         {
             RuleFor(m => m.SourcewareId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourceware).GetDescription()));
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamPracticeQuestionSourceware.Id))));
         }
     }
 }

+ 0 - 2
src/Hotline/Validators/Exams/Sourcewares/AddSourcewareDtoValidator.cs

@@ -16,8 +16,6 @@ namespace Hotline.Validators.Exams
         public AddSourcewareDtoValidator()
         {
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
-            RuleFor(m => m.CategoryId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourcewareCategory).GetDescription()));
-
         }
     }
 }

+ 0 - 1
src/Hotline/Validators/Exams/Sourcewares/UpdateSourcewareDtoValidator.cs

@@ -12,7 +12,6 @@ namespace Hotline.Validators.Exams
         {
             RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Id))));
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
-            RuleFor(m => m.CategoryId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourcewareCategory).GetDescription()));   
         }
     }
 }

+ 0 - 2
src/Hotline/Validators/Exams/TestPapers/UpdateTestPaperItemDtoValidator.cs

@@ -13,8 +13,6 @@ namespace Hotline.Validators.Exams.TestPapers
         public UpdateTestPaperItemDtoValidator()
         {
             RuleFor(m => m.QuestionId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamQuestion).GetDescription()));
-
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTestPaperItem.Id))));
         }
     }
 }

+ 0 - 2
src/Hotline/Validators/Exams/TestPapers/UpdateTestPaperRuleDtoValidator.cs

@@ -14,8 +14,6 @@ namespace Hotline.Validators.Exams.TestPapers
             RuleFor(m => m.QuestionType).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTestPaperRule.QuestionType))));
 
             RuleFor(m => m.Count).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTestPaperRule.QuestionType))));
-
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTestPaperRule.Id))));
         }
     }
 }

+ 1 - 1
src/Hotline/Validators/Order/AddOrderDtoValidator.cs

@@ -114,7 +114,7 @@ public class AddOrderDtoValidator : AbstractValidator<AddOrderDto>
         #endregion
 
         #region 投诉详情
-        RuleFor(d => d.OrderExtension.ExternalOrderNo).MaximumLength(15).When(d => d.OrderExtension != null).WithMessage("订单号最多15字符");
+        RuleFor(d => d.OrderExtension.ExternalOrderNo).MaxLengthWithChineseChar(45).When(d => d.OrderExtension != null).WithMessage("订单号最多45字符");
         RuleFor(d => d.OrderExtension.Patentee).MaxLengthWithChineseChar(50).When(d => d.OrderExtension != null).WithMessage("专利权人最多50字符");
         RuleFor(d => d.OrderExtension.PatentName).MaxLengthWithChineseChar(200).When(d => d.OrderExtension != null).WithMessage("专利名称最多200字符");
         RuleFor(d => d.OrderExtension.PatentNo).MaxLengthWithChineseChar(50).When(d => d.OrderExtension != null).WithMessage("专利号最多50字符");

+ 4 - 4
test/Hotline.Tests/Application/PointsRecordApplicationTest.cs

@@ -5,6 +5,7 @@ using Hotline.Identity.Roles;
 using Hotline.Orders;
 using Hotline.Settings;
 using Hotline.Share.Dtos.Snapshot;
+using Hotline.Share.Tools;
 using Hotline.Snapshot.IRepository;
 using Hotline.ThirdAccountDomainServices;
 using Hotline.ThirdAccountDomainServices.Interfaces;
@@ -83,9 +84,8 @@ public class PointsRecordApplicationTest : TestBase
         SetWeiXin();
         var item = await _snapshotApplication.GetPointsRankAsync();
         item.ShouldNotBeNull();
-        foreach (var a in item.Ranks)
-        {
-            var s = a.PhoneNumber;
-        }
+        item.Bulletins.Items.Any(m => m.Title.IsNullOrEmpty()).ShouldBeFalse();
+        item.Bulletins.Items.Any(m => m.BulletinId.IsNullOrEmpty()).ShouldBeFalse();
+        item.VideoBulletin.ShouldNotBeNull();
     }
 }

+ 2 - 2
test/Hotline.Tests/Application/SnapshotApplicationTest.cs

@@ -251,7 +251,7 @@ public class SnapshotApplicationTest : TestBase
     [Fact]
     public async Task RefreshTokenAsync()
     {
-        var token = await _identityAppService.GetThredTokenAsync(new ThirdTokenInDto(), CancellationToken.None);
+        var token = await _identityAppService.GetThirdTokenAsync(new ThirdTokenInDto(), CancellationToken.None);
         var newToken = await _identityAppService.RefreshTokenAsync(token["OpenId"].ToString(), CancellationToken.None);
         newToken.ShouldNotBeNull();
         newToken["OpenId"].ShouldBe(token["OpenId"].ToString());
@@ -265,7 +265,7 @@ public class SnapshotApplicationTest : TestBase
     [Fact]
     public async Task GetThirdToken_Test()
     {
-        var result = await _identityAppService.GetThredTokenAsync(new ThirdTokenInDto { AppType = EAppType.Snapshot, ThirdType = EThirdType.WeChat, LoginCode = "0c3Adhll2zDMBe413rnl2KvEym2AdhlH" }, CancellationToken.None);
+        var result = await _identityAppService.GetThirdTokenAsync(new ThirdTokenInDto { AppType = EAppType.Snapshot, ThirdType = EThirdType.WeChat,   LoginCode = "0c3Adhll2zDMBe413rnl2KvEym2AdhlH" }, CancellationToken.None);
         result["PhoneNumber"].ToString().ShouldNotBeNullOrEmpty();
     }
 

+ 5 - 5
test/Hotline.Tests/Application/SnapshotBulletionApplicationTest.cs

@@ -51,7 +51,7 @@ public class SnapshotBulletionApplicationTest : TestBase
     public async Task Bulletin_Test()
     {
         SetWeiXin();
-        var bulletinType =  _systemDicDataCacheManager.SnapshotBulletinType.First();
+        var bulletinType =  _systemDicDataCacheManager.SnapshotBulletinType.First(m => m.DicDataName == "安全卫士");
         var safetyType = await _safetyTypeRepository.Queryable().FirstAsync();
         var addRelationInDto = new AddCitizenRelationSafetyTypeInDto { SafetyTypeId = safetyType.Id, CitizenIds = [_sessionContext.UserId] };
         await _snapshotUserApplication.AddCitizenRelationSafetyType(addRelationInDto, CancellationToken.None);
@@ -60,7 +60,7 @@ public class SnapshotBulletionApplicationTest : TestBase
             Title = "测试公告" + DateTime.Now.ToLongDateTimeString(),
             Content = "没什么内容",
             BulletinTime = DateTime.Now,
-            IsSnapshot = true,
+            Shape = Share.Enums.Snapshot.EBulletinShape.Video,
             BulletinTypeId = bulletinType.DicDataValue,
             BulletinTypeName = bulletinType.DicDataName,
             SafetyTypeId = [safetyType.Id],
@@ -69,7 +69,7 @@ public class SnapshotBulletionApplicationTest : TestBase
         };
         var bulletinId = await _snapshotBulletinApplication.AddBulletinAsync(inDto, CancellationToken.None);
         var bulletin = await _bulletinRepository.GetAsync(bulletinId);
-        bulletin.IsSnapshot.ShouldBe(true);
+        bulletin.Shape.ShouldBe(Share.Enums.Snapshot.EBulletinShape.Video);
         bulletin.SafetyTypeId.First().ShouldBe(safetyType.Id);
         bulletin.VideoPath.ShouldBe(inDto.VideoPath);
         bulletin.VideoCoverImgUrl.ShouldBe(inDto.VideoCoverImgUrl);
@@ -81,11 +81,11 @@ public class SnapshotBulletionApplicationTest : TestBase
             Reason = "审核通过"
         };
         await _snapshotBulletinApplication.ExamineBulletinAsync(examineDto, CancellationToken.None);
-        Thread.Sleep(5 * 1000);
+        Thread.Sleep(10 * 1000);
         //await _snapshotBulletinApplication.NotifyUserAsync(bulletinId, CancellationToken.None);
 
 
-        var notifyItems = await _snapshotApplication.GetNotificationAsync(new GetNotifyInDto(), CancellationToken.None);
+        var notifyItems = await _snapshotApplication.GetNotificationAsync(new GetNotifyInDto { NotifyType = Share.Enums.Snapshot.ENotificationType.Video}, CancellationToken.None);
         notifyItems.Any(m => m.Title == inDto.Title).ShouldBeTrue();
     }
 }

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff