浏览代码

修复错误

qinchaoyue 4 月之前
父节点
当前提交
ec4ecfffd2

+ 1 - 1
src/Hotline.Application/Snapshot/IndustryApplication.cs

@@ -117,7 +117,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
                 Id = c.Id,
                 Name = c.Name,
             IndustryId = i.Id, 
-            IndustryName = i.Name});
+            IndustryName = i.Name}, true);
         return query;
     }
 

+ 6 - 17
src/Hotline.Share/Dtos/Snapshot/IndustryDto.cs

@@ -70,14 +70,14 @@ public class IndustryItemsOutDto : IndustryOutDto
     public string? ApproveOrgName { get; set; }
 
     /// <summary>
-    /// 市民发放红包金额(单位:)
+    /// 市民发放红包金额(单位:)
     /// </summary>
-    public int CitizenReadPackAmount { get; set; }
+    public double CitizenReadPackAmount { get; set; }
 
     /// <summary>
-    /// 网络员发放红包金额(单位:)
+    /// 网络员发放红包金额(单位:)
     /// </summary>
-    public int GuiderReadPackAmount { get; set; }
+    public double GuiderReadPackAmount { get; set; }
 
     /// <summary>
     /// 是否启用
@@ -356,17 +356,6 @@ public class IndustryCaseItemOutDto : AddIndustryCaseDto
     /// 网络员发放红包金额(单位:元)
     /// </summary>
     public string GuiderReadPackAmountTxt => GuiderReadPackAmount.ToYuanFinance();
-
-    /// <summary>
-    /// 市民发放红包金额(单位:分)
-    /// </summary>
-    new public int CitizenReadPackAmount { get; set; }
-
-    /// <summary>
-    /// 网络员发放红包金额(单位:分)
-    /// </summary>
-    new public int GuiderReadPackAmount { get; set; }
-
 }
 
 public class UpdateIndustryCaseDto : AddIndustryCaseDto
@@ -395,12 +384,12 @@ public class AddIndustryCaseDto
     /// <summary>
     /// 市民发放红包金额(单位:元)
     /// </summary>
-    public int CitizenReadPackAmount { get; set; }
+    public double CitizenReadPackAmount { get; set; }
 
     /// <summary>
     /// 网络员发放红包金额(单位:元)
     /// </summary>
-    public int GuiderReadPackAmount { get; set; }
+    public double GuiderReadPackAmount { get; set; }
 
     /// <summary>
     /// 是否启用

+ 4 - 4
src/Hotline.Share/Dtos/Snapshot/RedPackDto.cs

@@ -16,9 +16,9 @@ public class RedPackOutDto
     public string AmountTxt => Amount.ToYuanFinance();
 
     /// <summary>
-    /// 金额(单位:)
+    /// 金额(单位:)
     /// </summary>
-    public int Amount { get; set; }
+    public double Amount { get; set; }
 }
 
 public class RedPacksInDto : QueryFixedDto
@@ -53,9 +53,9 @@ public class RedPackDateOutDto
     public string CreationTimeText => CreationTime.ToString("yyyy-MM");
 
     /// <summary>
-    /// 金额(单位:)
+    /// 金额(单位:)
     /// </summary>
-    public int Amount { get; set; }
+    public double Amount { get; set; }
 
     /// <summary>
     /// 金额(单位:元)

+ 9 - 3
src/Hotline.Share/Dtos/Snapshot/SnapshotUserInfoDto.cs

@@ -13,14 +13,20 @@ public class SnapshotUserInfoOutDto
     /// </summary>
     public string PhoneNumberMask => PhoneNumber.MaskPhoneNumber();
 
-    public int DayAmount { get; set; }
+    /// <summary>
+    /// 当日奖励(单位:元)
+    /// </summary>
+    public double DayAmount { get; set; }
 
     /// <summary>
-    /// 当日奖励(单元: 元)
+    /// 当日奖励(单位:元)
     /// </summary>
     public string DayAmountTxt => DayAmount.ToYuanFinance();
 
-    public int TotalAmount { get; set; }
+    /// <summary>
+    /// 总奖励(单位:元)
+    /// </summary>
+    public double TotalAmount { get; set; }
 
     /// <summary>
     /// 总奖励(单位:元)

+ 2 - 2
src/Hotline.Share/Tools/DoubleExtensions.cs

@@ -48,8 +48,8 @@ public static class DoubleExtensions
         return value.Value.SecondsToString();
     }
 
-    public static string ToYuanFinance(this int value)
+    public static string ToYuanFinance(this double value)
     {
-        return (value / 100.0).ToString("F2");
+        return value.ToString("F2");
     }
 }

+ 6 - 6
src/Hotline/Snapshot/Industry.cs

@@ -50,16 +50,16 @@ public class Industry : CreationSoftDeleteEntity
     public string? AcceptTypeCode { get; set; }
 
     /// <summary>
-    /// 市民发放红包金额(单位:)
+    /// 市民发放红包金额(单位:)
     /// </summary>
-    [SugarColumn(ColumnDescription = "市民发放红包金额(单位:)")]
-    public int CitizenReadPackAmount { get; set; }
+    [SugarColumn(ColumnDescription = "市民发放红包金额(单位:)")]
+    public double CitizenReadPackAmount { get; set; }
 
     /// <summary>
-    /// 网络员发放红包金额(单位:)
+    /// 网络员发放红包金额(单位:)
     /// </summary>
-    [SugarColumn(ColumnDescription = "网络员发放红包金额(单位:)")]
-    public int GuiderReadPackAmount { get; set; }
+    [SugarColumn(ColumnDescription = "网络员发放红包金额(单位:)")]
+    public double GuiderReadPackAmount { get; set; }
 
     /// <summary>
     /// 是否启用

+ 6 - 6
src/Hotline/Snapshot/IndustryCase.cs

@@ -28,16 +28,16 @@ public class IndustryCase : CreationSoftDeleteEntity
     public string Name { get; set; }
 
     /// <summary>
-    /// 市民发放红包金额(单位:)
+    /// 市民发放红包金额(单位:)
     /// </summary>
-    [SugarColumn(ColumnDescription = "市民发放红包金额(单位:)")]
-    public int CitizenReadPackAmount { get; set; }
+    [SugarColumn(ColumnDescription = "市民发放红包金额(单位:)")]
+    public double CitizenReadPackAmount { get; set; }
 
     /// <summary>
-    /// 网络员发放红包金额(单位:)
+    /// 网络员发放红包金额(单位:)
     /// </summary>
-    [SugarColumn(ColumnDescription = "网络员发放红包金额(单位:)")]
-    public int GuiderReadPackAmount { get; set; }
+    [SugarColumn(ColumnDescription = "网络员发放红包金额(单位:)")]
+    public double GuiderReadPackAmount { get; set; }
 
     /// <summary>
     /// 是否启用

+ 3 - 3
src/Hotline/Snapshot/ThirdAccount.cs

@@ -54,10 +54,10 @@ public class ThirdAccount : CreationSoftDeleteEntity
     public EThirdType AccountType { get; set; }
 
     /// <summary>
-    /// 历史已经领取金额总和()
+    /// 历史已经领取金额总和(单位:元)
     /// </summary>
-    [SugarColumn(ColumnDescription = "历史已经领取金额总和()")]
-    public int TotalAmount { get; set; }
+    [SugarColumn(ColumnDescription = "历史已经领取金额总和(单位:元)")]
+    public double TotalAmount { get; set; }
 
     /// <summary>
     /// 用户头像Url