From 07e7077d251c0efac283eff89f74052ecdafe1a4 Mon Sep 17 00:00:00 2001
From: smartwyy <645583145@qq.com>
Date: Thu, 30 May 2024 18:45:53 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E8=AE=A2=E5=8D=95=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Entity/DbModel/Station/ChargeOrder.cs | 590 +++++++++---------
Entity/DbModel/Station/SwapOrderBattery.cs | 240 +++++++
HybirdFrameworkCore/Entity/Result.cs | 2 +-
HybirdFrameworkCore/Utils/ObjUtils.cs | 71 +++
Repository/Station/ChargeOrderRepository.cs | 29 +-
.../Station/SwapOrderBatteryRepository.cs | 28 +
Service/Charger/Client/ChargerClient.cs | 9 +-
.../Handler/FinishStartChargingHandler.cs | 42 ++
.../Handler/FinishStopChargingHandler.cs | 20 +
9 files changed, 738 insertions(+), 293 deletions(-)
create mode 100644 Entity/DbModel/Station/SwapOrderBattery.cs
create mode 100644 HybirdFrameworkCore/Utils/ObjUtils.cs
create mode 100644 Repository/Station/SwapOrderBatteryRepository.cs
diff --git a/Entity/DbModel/Station/ChargeOrder.cs b/Entity/DbModel/Station/ChargeOrder.cs
index 668f865..c8bed15 100644
--- a/Entity/DbModel/Station/ChargeOrder.cs
+++ b/Entity/DbModel/Station/ChargeOrder.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Linq;
-using System.Text;
-using SqlSugar;
+using SqlSugar;
namespace Entity.DbModel.Station
{
@@ -11,289 +8,304 @@ namespace Entity.DbModel.Station
[SugarTable("charge_order")]
public partial class ChargeOrder
{
- public ChargeOrder(){
-
-
- }
- ///
- /// Desc:id
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
- public int Id {get;set;}
-
- ///
- /// Desc:订单编号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="sn")]
- public string Sn {get;set;}
-
- ///
- /// Desc:电池编号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="battery_no")]
- public string BatteryNo {get;set;}
-
- ///
- /// Desc:启动报文状态;0-初始化;1-启动成功
- /// Default:0
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="cmd_status")]
- public int? CmdStatus {get;set;}
-
- ///
- /// Desc:充电机编号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="charger_no")]
- public string ChargerNo {get;set;}
-
- ///
- /// Desc:充电枪编号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="charger_gun_no")]
- public string ChargerGunNo {get;set;}
-
- ///
- /// Desc:0:站内充电 1:站外充电
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="charge_mode")]
- public int? ChargeMode {get;set;}
-
- ///
- /// Desc:1:站控启动 2:本地启动
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="start_mode")]
- public int? StartMode {get;set;}
-
- ///
- /// Desc:充电开始时间
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="start_time")]
- public DateTime? StartTime {get;set;}
-
- ///
- /// Desc:充电结束时间
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="end_time")]
- public DateTime? EndTime {get;set;}
-
- ///
- /// Desc:充电开始soc
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="start_soc")]
- public int? StartSoc {get;set;}
-
- ///
- /// Desc:充电结束soc
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="stop_soc")]
- public int? StopSoc {get;set;}
-
- ///
- /// Desc:充电时长
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="charge_time_count")]
- public int? ChargeTimeCount {get;set;}
-
- ///
- /// Desc:充电电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="elec_count")]
- public decimal? ElecCount {get;set;}
-
- ///
- /// Desc:交流电表量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="ac_elec_count")]
- public decimal? AcElecCount {get;set;}
-
- ///
- /// Desc:充电开始交流表电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="start_ac_elec")]
- public decimal? StartAcElec {get;set;}
-
- ///
- /// Desc:充电结束交流表电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="stop_ac_elec")]
- public decimal? StopAcElec {get;set;}
-
- ///
- /// Desc:充电开始直流表电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="start_dc_elec")]
- public decimal? StartDcElec {get;set;}
-
- ///
- /// Desc:充电结束直流表电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="stop_dc_elec")]
- public decimal? StopDcElec {get;set;}
-
- ///
- /// Desc:停止原因;0:满电自动停止;1-人工停止
- /// Default:0
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="stop_reason")]
- public int? StopReason {get;set;}
-
- ///
- /// Desc:尖时段电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="sharp_elec_count")]
- public decimal? SharpElecCount {get;set;}
-
- ///
- /// Desc:峰时段电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="peak_elec_count")]
- public decimal? PeakElecCount {get;set;}
-
- ///
- /// Desc:平时段电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="flat_elec_count")]
- public decimal? FlatElecCount {get;set;}
-
- ///
- /// Desc:谷时段电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="valley_elec_count")]
- public decimal? ValleyElecCount {get;set;}
-
- ///
- /// Desc:尖时段交流电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="ac_sharp_elec_count")]
- public decimal? AcSharpElecCount {get;set;}
-
- ///
- /// Desc:峰时段交流电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="ac_peak_elec_count")]
- public decimal? AcPeakElecCount {get;set;}
-
- ///
- /// Desc:平时段交流电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="ac_flat_elec_count")]
- public decimal? AcFlatElecCount {get;set;}
-
- ///
- /// Desc:谷时段交流电量
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="ac_valley_elec_count")]
- public decimal? AcValleyElecCount {get;set;}
-
- ///
- /// Desc:电价版本号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="elec_price_model_version")]
- public string ElecPriceModelVersion {get;set;}
-
- ///
- /// Desc:换电订单编号
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="swap_order_sn")]
- public string SwapOrderSn {get;set;}
-
- ///
- /// Desc:上传云平台状态;0-未上传;1-已上传
- /// Default:0
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="cloud_report_status")]
- public int? CloudReportStatus {get;set;}
-
- ///
- /// Desc:创建人
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="created_by")]
- public string CreatedBy {get;set;}
-
- ///
- /// Desc:创建时间
- /// Default:CURRENT_TIMESTAMP
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="created_time")]
- public DateTime? CreatedTime {get;set;}
-
- ///
- /// Desc:更新人
- /// Default:
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="updated_by")]
- public string UpdatedBy {get;set;}
-
- ///
- /// Desc:更新时间
- /// Default:CURRENT_TIMESTAMP
- /// Nullable:True
- ///
- [SugarColumn(ColumnName="updated_time")]
- public DateTime? UpdatedTime {get;set;}
-
+ public ChargeOrder()
+ {
+ }
+
+ ///
+ /// Desc:id
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
+ public int Id { get; set; }
+
+ ///
+ /// Desc:订单编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "sn")]
+ public string Sn { get; set; }
+
+ ///
+ /// Desc:电池编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "battery_no")]
+ public string BatteryNo { get; set; }
+
+ ///
+ /// Desc:启动报文状态;0-初始化;1-启动成功
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "cmd_status")]
+ public int? CmdStatus { get; set; }
+
+ ///
+ /// Desc:充电机编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "charger_no")]
+ public string ChargerNo { get; set; }
+
+ ///
+ /// Desc:充电枪编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "charger_gun_no")]
+ public string ChargerGunNo { get; set; }
+
+ ///
+ /// Desc:0:站内充电 1:站外充电
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "charge_mode")]
+ public int? ChargeMode { get; set; }
+
+ ///
+ /// Desc:1:站控启动 2:本地启动
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "start_mode")]
+ public int? StartMode { get; set; }
+
+ ///
+ /// Desc:充电开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "start_time")]
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// Desc:充电结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "end_time")]
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// Desc:充电开始soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "start_soc")]
+ public int? StartSoc { get; set; }
+
+ ///
+ /// Desc:充电结束soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "stop_soc")]
+ public int? StopSoc { get; set; }
+
+ ///
+ /// Desc:充电时长
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "charge_time_count")]
+ public int? ChargeTimeCount { get; set; }
+
+ ///
+ /// Desc:充电电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "elec_count")]
+ public decimal? ElecCount { get; set; }
+
+ ///
+ /// Desc:交流电表量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ac_elec_count")]
+ public decimal? AcElecCount { get; set; }
+
+ ///
+ /// Desc:充电开始交流表电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "start_ac_elec")]
+ public decimal? StartAcElec { get; set; }
+
+ ///
+ /// Desc:充电结束交流表电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "stop_ac_elec")]
+ public decimal? StopAcElec { get; set; }
+
+ ///
+ /// Desc:充电开始直流表电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "start_dc_elec")]
+ public decimal? StartDcElec { get; set; }
+
+ ///
+ /// Desc:充电结束直流表电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "stop_dc_elec")]
+ public decimal? StopDcElec { get; set; }
+
+ ///
+ /// Desc:停止原因;0:满电自动停止;1-人工停止
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "stop_reason")]
+ public int? StopReason { get; set; }
+
+ ///
+ /// Desc:尖时段电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "sharp_elec_count")]
+ public decimal? SharpElecCount { get; set; }
+
+ ///
+ /// Desc:峰时段电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "peak_elec_count")]
+ public decimal? PeakElecCount { get; set; }
+
+ ///
+ /// Desc:平时段电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "flat_elec_count")]
+ public decimal? FlatElecCount { get; set; }
+
+ ///
+ /// Desc:谷时段电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "valley_elec_count")]
+ public decimal? ValleyElecCount { get; set; }
+
+ ///
+ /// Desc:尖时段交流电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ac_sharp_elec_count")]
+ public decimal? AcSharpElecCount { get; set; }
+
+ ///
+ /// Desc:峰时段交流电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ac_peak_elec_count")]
+ public decimal? AcPeakElecCount { get; set; }
+
+ ///
+ /// Desc:平时段交流电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ac_flat_elec_count")]
+ public decimal? AcFlatElecCount { get; set; }
+
+ ///
+ /// Desc:谷时段交流电量
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "ac_valley_elec_count")]
+ public decimal? AcValleyElecCount { get; set; }
+
+ ///
+ /// Desc:电价版本号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "elec_price_model_version")]
+ public string ElecPriceModelVersion { get; set; }
+
+ ///
+ /// Desc:换电订单编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "swap_order_sn")]
+ public string SwapOrderSn { get; set; }
+
+ ///
+ /// Desc:上传云平台状态;0-未上传;1-已上传
+ /// Default:0
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "cloud_report_status")]
+ public int? CloudReportStatus { get; set; }
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "created_by")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Desc:创建时间
+ /// Default:CURRENT_TIMESTAMP
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "created_time")]
+ public DateTime CreatedTime { get; set; }
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "updated_by")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// Desc:更新时间
+ /// Default:CURRENT_TIMESTAMP
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "updated_time")]
+ public DateTime? UpdatedTime { get; set; }
+
+ ///
+ /// Desc:云平台订单编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "cloud_charge_order")]
+ public string CloudChargeOrder { get; set; }
+
+ ///
+ /// Desc:是否可以上传云平台
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "can_upload")]
+ public int? CanUpload { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/Entity/DbModel/Station/SwapOrderBattery.cs b/Entity/DbModel/Station/SwapOrderBattery.cs
new file mode 100644
index 0000000..989f054
--- /dev/null
+++ b/Entity/DbModel/Station/SwapOrderBattery.cs
@@ -0,0 +1,240 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace Entity.DbModel.Station
+{
+ ///
+ ///换电订单电池
+ ///
+ [SugarTable("swap_order_battery")]
+ public partial class SwapOrderBattery
+ {
+
+ ///
+ /// Desc:id
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
+ public int Id { get; set; }
+
+ ///
+ /// Desc:换电订单编号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "swap_order_sn")]
+ public string? SwapOrderSn { get; set; }
+
+ ///
+ /// Desc:亏电包编码
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_no")]
+ public string? DownBatteryNo { get; set; }
+
+ ///
+ /// Desc:亏电包soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_soc")]
+ public decimal? DownBatterySoc { get; set; }
+
+ ///
+ /// Desc:亏电包soe
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_soe")]
+ public decimal? DownBatterySoe { get; set; }
+
+ ///
+ /// Desc:亏电包真实soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_real_soc")]
+ public decimal? DownBatteryRealSoc { get; set; }
+
+ ///
+ /// Desc:亏电包上次换电结算时soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_last_soc")]
+ public decimal? DownBatteryLastSoc { get; set; }
+
+ ///
+ /// Desc:亏电包上次换电结算时soe
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_last_soe")]
+ public decimal? DownBatteryLastSoe { get; set; }
+
+ ///
+ /// Desc:亏电包站内充电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_in_chage_elec_count")]
+ public decimal? DownBatteryInChageElecCount { get; set; }
+
+ ///
+ /// Desc:亏电包站外插枪充电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_out_chage_elec_count")]
+ public decimal? DownBatteryOutChageElecCount { get; set; }
+
+ ///
+ /// Desc:亏电包站外回充能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_out_re_chagre_count")]
+ public decimal? DownBatteryOutReChagreCount { get; set; }
+
+ ///
+ /// Desc:亏电包站外放电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_in_dischage_elec_count")]
+ public decimal? DownBatteryInDischageElecCount { get; set; }
+
+ ///
+ /// Desc:亏电包站内放电电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_out_dischage_elec_count")]
+ public decimal? DownBatteryOutDischageElecCount { get; set; }
+
+ ///
+ /// Desc:放电池仓位号 亏电包仓号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "down_battery_bin_no")]
+ public int? DownBatteryBinNo { get; set; }
+
+ ///
+ /// Desc:满电包编码
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_no")]
+ public string? UpBatteryNo { get; set; }
+
+ ///
+ /// Desc:满电包soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_soc")]
+ public decimal? UpBatterySoc { get; set; }
+
+ ///
+ /// Desc:满电包soe
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_soe")]
+ public decimal? UpBatterySoe { get; set; }
+
+ ///
+ /// Desc:满电包真实soc
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_real_soc")]
+ public decimal? UpBatteryRealSoc { get; set; }
+
+ ///
+ /// Desc:满电包站内充电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_in_chage_elec_count")]
+ public decimal? UpBatteryInChageElecCount { get; set; }
+
+ ///
+ /// Desc:满电包站外插枪充电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_out_chage_elec_count")]
+ public decimal? UpBatteryOutChageElecCount { get; set; }
+
+ ///
+ /// Desc:满电包站外回充能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_out_re_chagre_count")]
+ public decimal? UpBatteryOutReChagreCount { get; set; }
+
+ ///
+ /// Desc:满电包站外放电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_in_dischage_elec_count")]
+ public decimal? UpBatteryInDischageElecCount { get; set; }
+
+ ///
+ /// Desc:满电包站内放电电能量(累计)
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_out_dischage_elec_count")]
+ public decimal? UpBatteryOutDischageElecCount { get; set; }
+
+ ///
+ /// Desc:取电池仓位号 满电包仓号
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "up_battery_bin_no")]
+ public int? UpBatteryBinNo { get; set; }
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "created_by")]
+ public string? CreatedBy { get; set; }
+
+ ///
+ /// Desc:创建时间
+ /// Default:CURRENT_TIMESTAMP
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "created_time")]
+ public DateTime CreatedTime { get; set; }
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "updated_by")]
+ public string? UpdatedBy { get; set; }
+
+ ///
+ /// Desc:更新时间
+ /// Default:CURRENT_TIMESTAMP
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName = "updated_time")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
diff --git a/HybirdFrameworkCore/Entity/Result.cs b/HybirdFrameworkCore/Entity/Result.cs
index 3bc3134..3cd3831 100644
--- a/HybirdFrameworkCore/Entity/Result.cs
+++ b/HybirdFrameworkCore/Entity/Result.cs
@@ -54,7 +54,7 @@
///
/// 消息
///
- public static Result Fail(string msg = "失败")
+ public static Result Fail(string? msg = "失败")
{
return Message(false, msg, default);
}
diff --git a/HybirdFrameworkCore/Utils/ObjUtils.cs b/HybirdFrameworkCore/Utils/ObjUtils.cs
new file mode 100644
index 0000000..fb39f97
--- /dev/null
+++ b/HybirdFrameworkCore/Utils/ObjUtils.cs
@@ -0,0 +1,71 @@
+namespace HybirdFrameworkCore.Utils;
+
+///
+///
+///
+public static class ObjUtils
+{
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsNull(object? o)
+ {
+ return o == null;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsNotNull(object? o)
+ {
+ return o != null;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsEmpty(List? list)
+ {
+ return list == null || list.Count == 0;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsNotEmpty(List? list)
+ {
+ return list is { Count: >= 0 };
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsNullOrWhiteSpace(string? o)
+ {
+ return string.IsNullOrWhiteSpace(o);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsNotNullOrWhiteSpace(string? o)
+ {
+ return !string.IsNullOrWhiteSpace(o);
+ }
+
+ public static readonly List