增加 BaseEntity 解决 created_time 不赋值问题

master
lxw 6 months ago
parent c8e3334bdb
commit f9671aa275

@ -0,0 +1,43 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// 业务model 基类
/// </summary>
public class BaseModel
{
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
/// [SugarColumn(IsPrimaryKey = false, , ColumnDescription = "创建时间")]
[SugarColumn(ColumnName = "created_time", InsertServerTime = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time", UpdateServerTime = true)]
public DateTime? UpdatedTime { get; set; } = DateTime.Now;
}

@ -9,43 +9,12 @@ namespace Entity.DbModel.Station
///电池信息表
///</summary>
[SugarTable("battery_info")]
public partial class BatteryInfo
public partial class BatteryInfo : BaseModel
{
public BatteryInfo(){
}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电池运营模型
///</summary>
[SugarTable("battery_op_model")]
public partial class BatteryOpModel
public partial class BatteryOpModel : BaseModel
{
public BatteryOpModel(){
@ -31,37 +31,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="model_id")]
public int? ModelId {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电池运营模型详情
///</summary>
[SugarTable("battery_op_model_detail")]
public partial class BatteryOpModelDetail
public partial class BatteryOpModelDetail : BaseModel
{
public BatteryOpModelDetail(){
@ -63,37 +63,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="battery_type")]
public string BatteryType {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///仓位信息表
///</summary>
[SugarTable("bin_info")]
public partial class BinInfo
public partial class BinInfo : BaseModel
{
public BinInfo()
{
@ -162,37 +162,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "status")]
public int? Status { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// 缓存仓标记 0:不是 1:是

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///充电订单;充电订单表
///</summary>
[SugarTable("charge_order")]
public partial class ChargeOrder
public partial class ChargeOrder : BaseModel
{
public ChargeOrder()
{
@ -260,37 +260,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "cloud_report_status")]
public int? CloudReportStatus { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// Desc:云平台订单编号

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///电价模型板板;电价模型版本表,生失效时间左开右闭且不能重叠
///</summary>
[SugarTable("elec_price_model_version")]
public partial class ElecPriceModelVersion
public partial class ElecPriceModelVersion : BaseModel
{
public ElecPriceModelVersion(){
@ -47,37 +47,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="end_time")]
public DateTime? EndTime {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -6,7 +6,7 @@ namespace Entity.DbModel.Station
///电价模型详情
///</summary>
[SugarTable("elec_price_model_version_detail")]
public partial class ElecPriceModelVersionDetail
public partial class ElecPriceModelVersionDetail : BaseModel
{
public ElecPriceModelVersionDetail()
{
@ -84,36 +84,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "battery_count")]
public int BatteryCount { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备信息表
///</summary>
[SugarTable("equip_info")]
public partial class EquipInfo
public partial class EquipInfo : BaseModel
{
public EquipInfo(){
@ -55,37 +55,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="status")]
public int? Status {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
/// <summary>
/// Desc:0-手动;1-自动充电

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备通信信息表
///</summary>
[SugarTable("equip_net_info")]
public partial class EquipNetInfo
public partial class EquipNetInfo : BaseModel
{
public EquipNetInfo(){
@ -55,37 +55,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="dest_addr")]
public string DestAddr {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///设备类型表
///</summary>
[SugarTable("equip_type")]
public partial class EquipType
public partial class EquipType : BaseModel
{
public EquipType(){
@ -47,37 +47,7 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName="enabled")]
public int? Enabled {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_by")]
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="created_time")]
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_by")]
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName="updated_time")]
public DateTime? UpdatedTime {get;set;}
}
}

@ -9,7 +9,7 @@ namespace Entity.DbModel.Station
///换电订单电池
///</summary>
[SugarTable("swap_order_battery")]
public partial class SwapOrderBattery
public partial class SwapOrderBattery : BaseModel
{
/// <summary>
@ -204,37 +204,6 @@ namespace Entity.DbModel.Station
[SugarColumn(ColumnName = "up_battery_bin_no")]
public int? UpBatteryBinNo { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_by")]
public string? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "created_time")]
public DateTime CreatedTime { get; set; }
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_by")]
public string? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
public DateTime? UpdatedTime { get; set; }
}
}

@ -1,16 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
[SugarTable("sys_battery_replace_log")]
public class sysBatteryReplaceLog
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int? f_id { get; set; }
public string? f_new_battery_no { get; set; }
public string? f_old_battery_no { get; set; }
public string? f_new_battery_position { get; set; }
public string? f_old_battery_position { get; set; }
public string? f_start_time { get; set; }
}

@ -1,15 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
public class sysDataSource
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
public string ConnectName { get; set; }
public string Host { get; set; }
public string DataBaseName { get; set; }
public string Username { get; set; }
public string Password { get; set; }
}

@ -1,38 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sysDicData")]
public class sysDicData
{
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:字典类型ID
/// Default:
/// Nullable:True
/// </summary>
public int? DicTypeID { get; set; }
/// <summary>
/// Desc:内容
/// Default:
/// Nullable:True
/// </summary>
public string DicData { get; set; }
/// <summary>
/// Desc:备注
/// Default:
/// Nullable:True
/// </summary>
public string Remark { get; set; }
}

@ -1,38 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sysDicType")]
public class sysDicType
{
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:字典类型名称
/// Default:
/// Nullable:True
/// </summary>
public string DicTypeName { get; set; }
/// <summary>
/// Desc:字典类型编码
/// Default:
/// Nullable:True
/// </summary>
public string DicTypeCode { get; set; }
/// <summary>
/// Desc:备注
/// Default:
/// Nullable:True
/// </summary>
public string Remark { get; set; }
}

@ -1,101 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
public class sysMenu
{
/// <summary>
/// Desc:菜单ID
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:父菜单ID
/// Default:
/// Nullable:True
/// </summary>
public int? ParentID { get; set; }
/// <summary>
/// Desc:菜单标题
/// Default:
/// Nullable:True
/// </summary>
public string Title { get; set; }
/// <summary>
/// Desc:菜单链接地址
/// Default:
/// Nullable:True
/// </summary>
public string URL { get; set; }
/// <summary>
/// Desc:菜单图标
/// Default:
/// Nullable:True
/// </summary>
public string Icon { get; set; }
/// <summary>
/// Desc:菜单排序顺序
/// Default:
/// Nullable:True
/// </summary>
public int? SortOrder { get; set; }
/// <summary>
/// Desc:菜单类型
/// Default:
/// Nullable:True
/// </summary>
public string MenuType { get; set; }
/// <summary>
/// Desc:菜单编码
/// Default:
/// Nullable:True
/// </summary>
public string MenuCode { get; set; }
/// <summary>
/// Desc:菜单权限标识
/// Default:
/// Nullable:True
/// </summary>
public string PermissionCode { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
public int? CreatedBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? CreatedDate { get; set; }
/// <summary>
/// Desc:更新者
/// Default:
/// Nullable:True
/// </summary>
public int? UpdatedBy { get; set; }
/// <summary>
/// Desc:更新时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? UpdatedDate { get; set; }
}

@ -1,67 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sys_message")]
public class sysMessage
{
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:消息标题
/// Default:
/// Nullable:True
/// </summary>
public string Title { get; set; }
/// <summary>
/// Desc:消息内容
/// Default:
/// Nullable:True
/// </summary>
public string Content { get; set; }
/// <summary>
/// Desc:发送人
/// Default:
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "from_user_id")]
public int? FromUserID { get; set; }
/// <summary>
/// Desc:接收人
/// Default:
/// Nullable:True
/// </summary>
public int? ToUserID { get; set; }
/// <summary>
/// Desc:是否发送
/// Default:
/// Nullable:True
/// </summary>
public bool? IsSend { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// Desc:发送时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? SendTime { get; set; }
}

@ -1,59 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sysRole")]
public class sysRole
{
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:角色名称
/// Default:
/// Nullable:True
/// </summary>
public string RoleName { get; set; }
/// <summary>
/// Desc:备注
/// Default:
/// Nullable:True
/// </summary>
public string Remark { get; set; }
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
public int? CreateBy { get; set; }
/// <summary>
/// Desc:创建时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// Desc:修改人
/// Default:
/// Nullable:True
/// </summary>
public int? UpdateBy { get; set; }
/// <summary>
/// Desc:修改时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? UpdateTime { get; set; }
}

@ -1,23 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sysRoleMenu")]
public class sysRoleMenu
{
/// <summary>
/// Desc:角色ID
/// Default:
/// Nullable:True
/// </summary>
public int? RoleID { get; set; }
/// <summary>
/// Desc:菜单ID
/// Default:
/// Nullable:True
/// </summary>
public int? MenuID { get; set; }
}

@ -1,79 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
public class sysUser
{
/// <summary>
/// Desc:唯一标识用户的主键
/// Default:
/// Nullable:False
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int ID { get; set; }
/// <summary>
/// Desc:用户登录名
/// Default:
/// Nullable:True
/// </summary>
public string Username { get; set; }
/// <summary>
/// Desc:用户登录密码
/// Default:
/// Nullable:True
/// </summary>
public string Password { get; set; }
/// <summary>
/// Desc:用户姓名
/// Default:
/// Nullable:True
/// </summary>
public string Fullname { get; set; }
/// <summary>
/// Desc:性别
/// Default:
/// Nullable:True
/// </summary>
public string Sex { get; set; }
/// <summary>
/// Desc:用户电子邮件
/// Default:
/// Nullable:True
/// </summary>
public string Email { get; set; }
/// <summary>
/// Desc:用户手机号码
/// Default:
/// Nullable:True
/// </summary>
public string PhoneNumber { get; set; }
/// <summary>
/// Desc:账号创建时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// Desc:最后登陆时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? LastLoginTime { get; set; }
/// <summary>
/// Desc:用户状态 启用 禁用
/// Default:
/// Nullable:True
/// </summary>
public bool? Status { get; set; }
}

@ -1,23 +0,0 @@
using SqlSugar;
namespace Entity.DbModel;
/// <summary>
/// </summary>
[SugarTable("sysUserRole")]
public class sysUserRole
{
/// <summary>
/// Desc:用户ID
/// Default:
/// Nullable:True
/// </summary>
public int? UserID { get; set; }
/// <summary>
/// Desc:角色ID
/// Default:
/// Nullable:True
/// </summary>
public int? RoleID { get; set; }
}

@ -1,5 +0,0 @@
namespace Repository.System;
internal class Class1
{
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class SysBatteryReplaceLogRepository : BaseRepository<sysBatteryReplaceLog>
{
public SysBatteryReplaceLogRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class SysDataSourceRepository : BaseRepository<sysDataSource>
{
public SysDataSourceRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysDicDataRepository : BaseRepository<sysDicData>
{
public sysDicDataRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysDicTypeRepository : BaseRepository<sysDicType>
{
public sysDicTypeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class SysMenuRepository : BaseRepository<sysMenu>
{
public SysMenuRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysMessageRepository : BaseRepository<sysMessage>
{
public sysMessageRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysRoleMenuRepository : BaseRepository<sysRoleMenu>
{
public sysRoleMenuRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysRoleRepository : BaseRepository<sysRole>
{
public sysRoleRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,13 +0,0 @@
using Entity.DbModel;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
namespace Repository.System;
[Scope("SingleInstance")]
public class SysUserRepository : BaseRepository<sysUser>
{
public SysUserRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,11 +0,0 @@
using Entity.DbModel;
using SqlSugar;
namespace Repository.System;
public class sysUserRoleRepository : BaseRepository<sysUserRole>
{
public sysUserRoleRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
}

@ -1,29 +0,0 @@
using Entity.DbModel;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
namespace Service.System;
[Scope("SingleInstance")]
public class SysBatteryReplaceLogServices : BaseServices<sysBatteryReplaceLog>
{
private readonly SysBatteryReplaceLogRepository _dal;
public SysBatteryReplaceLogServices(SysBatteryReplaceLogRepository dal)
{
_dal = dal;
BaseDal = dal;
}
public bool AddReplaceOrser(sysBatteryReplaceLog _sysBatteryReplaceLog)
{
var result = false;
if (_sysBatteryReplaceLog != null)
{
_dal.Insert(_sysBatteryReplaceLog);
result = true;
}
return result;
}
}

@ -1,20 +0,0 @@
using Entity.DbModel;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
[Scope("SingleInstance")]
public class SysDataSourceServices : BaseServices<sysDataSource>
{
private readonly SysDataSourceRepository _dal;
private readonly UnitOfWork _unitOfWork;
public SysDataSourceServices(UnitOfWork unitOfWork, SysDataSourceRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysDicDataServices : BaseServices<sysDicData>
{
private readonly sysDicDataRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysDicDataServices(UnitOfWork unitOfWork, sysDicDataRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysDicTypeServices : BaseServices<sysDicType>
{
private readonly sysDicTypeRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysDicTypeServices(UnitOfWork unitOfWork, sysDicTypeRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class SysMenuServices : BaseServices<sysMenu>
{
private readonly SysMenuRepository _dal;
private readonly UnitOfWork _unitOfWork;
public SysMenuServices(UnitOfWork unitOfWork, SysMenuRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysMessageServices : BaseServices<sysMessage>
{
private readonly sysMessageRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysMessageServices(UnitOfWork unitOfWork, sysMessageRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysRoleMenuServices : BaseServices<sysRoleMenu>
{
private readonly sysRoleMenuRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysRoleMenuServices(UnitOfWork unitOfWork, sysRoleMenuRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysRoleServices : BaseServices<sysRole>
{
private readonly sysRoleRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysRoleServices(UnitOfWork unitOfWork, sysRoleRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,18 +0,0 @@
using Entity.DbModel;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
public class sysUserRoleServices : BaseServices<sysUserRole>
{
private readonly sysUserRoleRepository _dal;
private readonly UnitOfWork _unitOfWork;
public sysUserRoleServices(UnitOfWork unitOfWork, sysUserRoleRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -1,20 +0,0 @@
using Entity.DbModel;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Repository.UnitOfWork;
namespace Service.System;
[Scope("SingleInstance")]
public class SysUserServices : BaseServices<sysUser>
{
private readonly SysUserRepository _dal;
private readonly UnitOfWork _unitOfWork;
public SysUserServices(UnitOfWork unitOfWork, SysUserRepository dal)
{
_dal = dal;
BaseDal = dal;
_unitOfWork = unitOfWork;
}
}

@ -21,12 +21,10 @@ public class WeatherForecastController : ControllerBase
private readonly ILogger<WeatherForecastController> _logger;
private readonly SysUserServices _sysUserServices;
public WeatherForecastController(ILogger<WeatherForecastController> logger, SysUserServices sysUserServices)
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
_sysUserServices = sysUserServices;
}
[HttpGet(Name = "GetWeatherForecast")]

@ -13,17 +13,17 @@ public partial class MainWindow : Window
{
private static readonly ILog Log = LogManager.GetLogger(typeof(MainWindow));
private readonly SysUserServices _sysUserServices;
private readonly SysConfigService _sysConfigService;
public MainWindow()
{
InitializeComponent();
_sysUserServices = AppInfo.Container.Resolve<SysUserServices>();
_sysConfigService = AppInfo.Container.Resolve<SysConfigService>();
}
private void TestClick(object sender, RoutedEventArgs e)
{
var sysUsers = _sysUserServices.Query();
var sysUsers = _sysConfigService.Query();
MessageBox.Show($"count={sysUsers.Count}");
Log.Info($"count={sysUsers.Count}");
}

Loading…
Cancel
Save