qinchaoyue 4 months ago
parent
commit
363329e442
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/TianQue.Sdk/TiqnQueService.cs

+ 6 - 1
src/TianQue.Sdk/TiqnQueService.cs

@@ -3,6 +3,7 @@ using Hotline.Share.Dtos.Snapshot;
 using Hotline.Share.Tools;
 using Hotline.Snapshot;
 using Hotline.Snapshot.Interfaces;
+using Hotline.Tools;
 using Mapster;
 using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
@@ -36,7 +37,6 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
         acceptInfo.ReplyCode = order.No!; // 唯一标识
         acceptInfo.TypeName = order.AcceptType!; // 诉求类型名称
         acceptInfo.OccurDate = order.CreationTime; // 事发时间
-        //acceptInfo.OccurDate = DateTime.Now; // 事发时间
         acceptInfo.DetailAddress = order.FullAddress!; // 详细地址
         acceptInfo.Topic = order.Title!; // 线索主题
         acceptInfo.DetailContent = order.Content!; // 详细内容
@@ -45,7 +45,11 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
         acceptInfo.RootCategoryInfo = ""; // order.HotspotName!; // 热点分类(大类)
         acceptInfo.CategoryInfo = "";// order.HotspotSpliceName!; // 热点分类(小类)
         acceptInfo.DeadLine = orderSnapshot.DeadLine!.Value; // 截止时间
+#if DEBUG
         acceptInfo.Prod = false; // 正式/测试
+#else
+        acceptInfo.Prod = true; // 正式/测试
+#endif
 
         // 反映人信息
         acceptInfo.PersonList = new List<PersonInfo>
@@ -56,6 +60,7 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
                 ReflectUserName = order.FromName!, // 姓名
             } 
         };
+        acceptInfo.ValidateObject();
         var result = await httpClient.PostAsync<ApiReponse<AcceptInfoSuccessDto>>(new Uri(_url), acceptInfo);
         return result.ToJson();
     }