Ver código fonte

增加返回字段

qinchaoyue 4 meses atrás
pai
commit
5996395da0

+ 9 - 15
src/Hotline.Application/Snapshot/IndustryApplication.cs

@@ -70,7 +70,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
             .WhereIF(dto.ApproveOrgName.NotNullOrEmpty(), m => m.ApproveOrgName.Contains(dto.ApproveOrgName))
             .OrderByDescending(m => m.CreationTime)
             .Select<IndustryItemsOutDto>();
-        
+
 
         return query;
     }
@@ -83,14 +83,6 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
         var files = await _fileRepository.GetByKeyAsync(id, CancellationToken.None);
         var outDto = industry.Adapt<IndustryDetailOutDto>();
         outDto.Files = files.Adapt<IList<IndustryFileDto>>();
-        if (outDto.BackgroundImgUrl.NotNullOrEmpty())
-            outDto.BackgroundImgUrl = fileDownloadApi + outDto.BackgroundImgUrl;
-        if (outDto.BannerImgUrl.NotNullOrEmpty())
-            outDto.BannerImgUrl = fileDownloadApi + outDto.BannerImgUrl;
-        if (outDto.CareCellImgUrl.NotNullOrEmpty())
-            outDto.CareCellImgUrl = fileDownloadApi + outDto.CareCellImgUrl;
-        if (outDto.CellImgUrl.NotNullOrEmpty())
-            outDto.CellImgUrl = fileDownloadApi + outDto.CellImgUrl;
         return outDto;
     }
 
@@ -118,18 +110,20 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
 
     #region 行业线索
     public ISugarQueryable<IndustryCaseItemOutDto> GetIndustryCaseItems(IndustryCaseItemInDto dto)
-    { 
+    {
         var query = _industryCaseRepository.Queryable()
             .LeftJoin<Industry>((c, i) => c.IndustryId == i.Id)
             .WhereIF(dto.IndustryName.NotNullOrEmpty(), (c, i) => i.Name.Contains(dto.IndustryName))
             .WhereIF(dto.CaseName.NotNullOrEmpty(), (c, i) => c.Name.Contains(dto.CaseName))
             .OrderByDescending((c, i) => c.CreationTime)
-            .Select<IndustryCaseItemOutDto>((c, i) => 
-            new IndustryCaseItemOutDto {
+            .Select<IndustryCaseItemOutDto>((c, i) =>
+            new IndustryCaseItemOutDto
+            {
                 Id = c.Id,
                 Name = c.Name,
-            IndustryId = i.Id, 
-            IndustryName = i.Name}, true);
+                IndustryId = i.Id,
+                IndustryName = i.Name
+            }, true);
         return query;
     }
 
@@ -155,7 +149,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     public async Task UpdateIndustryCaseAsync(UpdateIndustryCaseDto dto)
     {
         dto.ValidateObject();
-        var entity = await _industryCaseRepository.GetAsync(dto.Id) 
+        var entity = await _industryCaseRepository.GetAsync(dto.Id)
             ?? throw UserFriendlyException.SameMessage($"行业线索不存在 {dto.Id}");
         dto.Adapt(entity);
         await _industryCaseRepository.UpdateAsync(entity);

+ 34 - 0
src/Hotline.Share/Dtos/Snapshot/IndustryDto.cs

@@ -43,6 +43,40 @@ public class IndustryDetailOutDto : IndustryItemsOutDto
     /// 附件集合(小程序上面可以下载的 doc 文件)
     /// </summary>
     public IList<IndustryFileDto> Files { get; set; }
+
+    /// <summary>
+    /// 阶段性回复间隔时间(小时)
+    /// </summary>
+    public int IntervalTime { get; set; } = 0;
+
+    /// <summary>
+    /// 关联宣传学习
+    /// 从字典中取"公告类型"
+    /// </summary>
+    public string BulletinTypePublicityId { get; set; }
+
+    /// <summary>
+    /// 关联宣传学习
+    /// 从字典中取"公告类型"
+    /// </summary>
+    public string BulletinTypePublicityName { get; set; }
+
+    /// <summary>
+    /// 关联操作指引
+    /// 从字典中取"公告类型"
+    /// </summary>
+    public string BulletinTypeGuideId { get; set; }
+
+    /// <summary>
+    /// 关联操作指引
+    /// 从字典中取"公告类型"
+    /// </summary>
+    public string BulletinTypeGuideame { get; set; }
+
+    /// <summary>
+    /// App是否启用
+    /// </summary>
+    public bool IsAppEnable { get; set; }
 }
 
 public class IndustryItemsOutDto : IndustryOutDto