浏览代码

Merge branch 'feature/snapshot' into test

qinchaoyue 3 月之前
父节点
当前提交
6e5aefcc62
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/Hotline.Application/Snapshot/IndustryApplication.cs

+ 5 - 0
src/Hotline.Application/Snapshot/IndustryApplication.cs

@@ -55,6 +55,11 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     /// <exception cref="NotImplementedException"></exception>
     public async Task<string> AddIndustryAsync(AddIndustryDto dto, CancellationToken cancellationToken)
     {
+        if (dto.ApproveOrgId.NotNullOrEmpty() && dto.ApproveOrgName.IsNullOrEmpty())
+        {
+            await _systemOrganizeRepository.GetAsync(dto.ApproveOrgId, cancellationToken)
+                .Then(async org => { dto.ApproveOrgName = org.Name; });
+        }
         var entity = dto.Adapt<Industry>();
         var id = await _industryRepository.AddAsync(entity, cancellationToken);
         if (dto.Files.NotNullOrEmpty())