From 8e0a7802528fb37dfbad14b63bcdc5d9449aa303 Mon Sep 17 00:00:00 2001
From: smartwyy <645583145@qq.com>
Date: Fri, 31 May 2024 17:18:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=A1=86=E6=9E=B6=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Common/Common.csproj | 1 -
Common/Util/JwtUtil.cs | 9 +-
Common/Util/UploadOptions.cs | 13 +--
Entity/DbModel/System/SysConfig.cs | 2 +-
Entity/DbModel/System/SysDictData.cs | 2 +-
Entity/DbModel/System/SysDictType.cs | 2 +-
Entity/DbModel/System/SysFile.cs | 2 +-
Entity/DbModel/System/SysLogDiff.cs | 2 +-
Entity/DbModel/System/SysLogEx.cs | 11 +--
Entity/DbModel/System/SysLogOp.cs | 11 +--
Entity/DbModel/System/SysLogVis.cs | 2 +-
Entity/DbModel/System/SysMenu.cs | 2 +-
Entity/DbModel/System/SysNotice.cs | 2 +-
Entity/DbModel/System/SysNoticeUser.cs | 2 +-
Entity/DbModel/System/SysRole.cs | 2 +-
Entity/DbModel/System/SysRoleMenu.cs | 7 +-
Entity/DbModel/System/SysUser.cs | 2 +-
Entity/DbModel/System/SysUserRole.cs | 7 +-
Entity/Dto/Req/ConfigReq.cs | 2 +-
Entity/Dto/Req/MenuReq.cs | 2 +-
Entity/Dto/Req/PageAmmeterReq.cs | 12 +++
Entity/Dto/Req/PageDictDataReq.cs | 2 +-
Entity/Dto/Req/PageDictTypeReq.cs | 2 +-
Entity/Dto/Req/PageNoticeReq.cs | 2 +-
Entity/Dto/Req/PageRoleReq.cs | 2 +-
Entity/Dto/Req/UserReq.cs | 2 +-
Entity/Dto/Resp/MenuResp.cs | 2 +-
Entity/Dto/Resp/UserResp.cs | 2 +-
.../Autofac/Attribute/PropertyAttribute.cs | 10 ++-
HybirdFrameworkCore/Entity/IPage.cs | 2 +-
HybirdFrameworkCore/Entity/QueryPageModel.cs | 19 -----
HybirdFrameworkCore/Entity/Result.cs | 3 +-
.../Extensions/AppConfigurtaionServices.cs | 25 ------
HybirdFrameworkCore/Redis/RedisHelper.cs | 22 ++++-
HybirdFrameworkCore/Utils/IEnum.cs | 9 ++
Repository/BaseRepository.cs | 1 -
Repository/System/SysConfigRepository.cs | 4 +-
Repository/System/SysDicDataRepository.cs | 2 +-
Repository/System/SysDicTypeRepository.cs | 2 +-
Repository/System/SysFileRepository.cs | 2 +-
Repository/System/SysLogDiffRepository.cs | 4 +-
Repository/System/SysLogExRepository.cs | 4 +-
Repository/System/SysLogOpRepository.cs | 4 +-
Repository/System/SysLogVisRepository.cs | 4 +-
Repository/System/SysMenuRepository.cs | 2 +-
Repository/System/SysNoticeRepository.cs | 2 +-
Repository/System/SysNoticeUserRepository.cs | 2 +-
Repository/System/SysRoleMenuRepository.cs | 2 +-
Repository/System/SysRoleRepository.cs | 2 +-
Repository/System/SysUserRepository.cs | 4 +-
Repository/System/SysUserRoleRepository.cs | 2 +-
Service/Ammeter/EmeterDayEnergyService.cs | 3 +-
Service/Ammeter/EmeterHourEnergyService.cs | 3 +-
.../EmeterMinutesEnergyChangeService.cs | 10 +--
Service/Ammeter/EmeterMinutesEnergyService.cs | 3 +-
Service/Cloud/Client/CloudClientMgr.cs | 83 ++++++++++---------
Service/Mgr/SysDictDataMgr.cs | 2 +-
Service/Mgr/SysFileMgr.cs | 22 +----
Service/Mgr/SysRoleMenuMgr.cs | 2 +-
Service/Mgr/SysUserRoleMgr.cs | 2 +-
Service/Mgr/UserManager.cs | 4 +-
Service/Station/BinInfoService.cs | 1 -
Service/System/Dict/SysDictDataService.cs | 2 +-
Service/System/Dict/SysDictTypeService.cs | 2 +-
Service/System/LoginService.cs | 2 +-
Service/System/Roles/SysRoleMenuService.cs | 2 +-
Service/System/Roles/SysRoleService.cs | 2 +-
Service/System/Roles/SysUserRoleService.cs | 2 +-
Service/System/SysConfigService.cs | 3 +-
Service/System/SysFileServices.cs | 2 +-
Service/System/SysLog/SysLogDiffService.cs | 2 +-
Service/System/SysLog/SysLogExService.cs | 2 +-
Service/System/SysLog/SysLogOpService.cs | 2 +-
Service/System/SysLog/SysLogVisService.cs | 2 +-
Service/System/SysMenuService.cs | 2 +-
Service/System/SysNoticeService.cs | 2 +-
Service/System/SysNoticeUserService.cs | 2 +-
Service/System/SysUserService.cs | 2 +-
.../Controllers/Ammeter/AmmeterController.cs | 15 ++--
.../BasicConfig/BaseConfigController.cs | 1 -
.../System/Dict/SysDictDataController.cs | 4 +-
.../System/Dict/SysDictTypeController.cs | 4 +-
.../Controllers/System/SysConfigController.cs | 2 +-
.../Controllers/System/SysFileController.cs | 4 +-
.../System/SysLog/SysLogDiffController.cs | 2 +-
.../System/SysLog/SysLogExController.cs | 2 +-
.../System/SysLog/SysLogOpController.cs | 2 +-
.../System/SysLog/SysLogVisController.cs | 2 +-
.../Controllers/System/SysMenuController.cs | 4 +-
.../Controllers/System/SysRoleController.cs | 4 +-
.../Controllers/System/SysUserController.cs | 4 +-
WebStarter/Properties/launchSettings.json | 2 +-
WebStarter/appsettings.dev.json | 2 +-
93 files changed, 208 insertions(+), 258 deletions(-)
create mode 100644 Entity/Dto/Req/PageAmmeterReq.cs
delete mode 100644 HybirdFrameworkCore/Extensions/AppConfigurtaionServices.cs
create mode 100644 HybirdFrameworkCore/Utils/IEnum.cs
diff --git a/Common/Common.csproj b/Common/Common.csproj
index b1930e5..18357c4 100644
--- a/Common/Common.csproj
+++ b/Common/Common.csproj
@@ -8,7 +8,6 @@
-
diff --git a/Common/Util/JwtUtil.cs b/Common/Util/JwtUtil.cs
index 90c6df2..4a1a9c0 100644
--- a/Common/Util/JwtUtil.cs
+++ b/Common/Util/JwtUtil.cs
@@ -1,7 +1,7 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
-using HybirdFrameworkCore.Extensions;
+using HybirdFrameworkCore.Configuration;
using Microsoft.AspNetCore.Http;
using Microsoft.IdentityModel.Tokens;
@@ -11,11 +11,10 @@ namespace Common.Util
{
public static string BuildToken(string username)
{
- var issuer = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:Issuer").Value;
+ var issuer = AppSettingsHelper.GetContent("TokenOptions", "Issuer");
+ var audience = AppSettingsHelper.GetContent("TokenOptions", "Audience");
+ var securityKey = AppSettingsHelper.GetContent("TokenOptions", "SecurityKey");
- var audience = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:Audience").Value;
-
- var securityKey = AppConfigurtaionServices.Configuration.GetSection("TokenOptions:SecurityKey").Value;
var claims = new[]{
new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") ,
diff --git a/Common/Util/UploadOptions.cs b/Common/Util/UploadOptions.cs
index 52da9c0..1ee6bcc 100644
--- a/Common/Util/UploadOptions.cs
+++ b/Common/Util/UploadOptions.cs
@@ -1,16 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Furion.ConfigurableOptions;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Common.Util
+namespace Common.Util
{
///
/// 文件上传配置选项
///
- public sealed class UploadOptions : IConfigurableOptions
+ public sealed class UploadOptions
{
///
/// 路径
@@ -33,4 +26,4 @@ namespace Common.Util
/// 防止重复上传
public bool EnableMd5 { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/Entity/DbModel/System/SysConfig.cs b/Entity/DbModel/System/SysConfig.cs
index c5f8d6f..c7596c9 100644
--- a/Entity/DbModel/System/SysConfig.cs
+++ b/Entity/DbModel/System/SysConfig.cs
@@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统参数配置表
diff --git a/Entity/DbModel/System/SysDictData.cs b/Entity/DbModel/System/SysDictData.cs
index 92f4b29..4932e96 100644
--- a/Entity/DbModel/System/SysDictData.cs
+++ b/Entity/DbModel/System/SysDictData.cs
@@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
///
diff --git a/Entity/DbModel/System/SysDictType.cs b/Entity/DbModel/System/SysDictType.cs
index 0a65954..cb20ce9 100644
--- a/Entity/DbModel/System/SysDictType.cs
+++ b/Entity/DbModel/System/SysDictType.cs
@@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
///
diff --git a/Entity/DbModel/System/SysFile.cs b/Entity/DbModel/System/SysFile.cs
index 2b6b96f..1030253 100644
--- a/Entity/DbModel/System/SysFile.cs
+++ b/Entity/DbModel/System/SysFile.cs
@@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统文件表
diff --git a/Entity/DbModel/System/SysLogDiff.cs b/Entity/DbModel/System/SysLogDiff.cs
index 2b1c301..fc71e41 100644
--- a/Entity/DbModel/System/SysLogDiff.cs
+++ b/Entity/DbModel/System/SysLogDiff.cs
@@ -1,7 +1,7 @@
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统差异日志表
diff --git a/Entity/DbModel/System/SysLogEx.cs b/Entity/DbModel/System/SysLogEx.cs
index 80adca8..133cc3d 100644
--- a/Entity/DbModel/System/SysLogEx.cs
+++ b/Entity/DbModel/System/SysLogEx.cs
@@ -1,12 +1,7 @@
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel.DataAnnotations;
+using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统异常日志表
diff --git a/Entity/DbModel/System/SysLogOp.cs b/Entity/DbModel/System/SysLogOp.cs
index 3c74748..edae2de 100644
--- a/Entity/DbModel/System/SysLogOp.cs
+++ b/Entity/DbModel/System/SysLogOp.cs
@@ -1,12 +1,7 @@
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel.DataAnnotations;
+using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统操作日志表
diff --git a/Entity/DbModel/System/SysLogVis.cs b/Entity/DbModel/System/SysLogVis.cs
index 9c57f15..a8acdb7 100644
--- a/Entity/DbModel/System/SysLogVis.cs
+++ b/Entity/DbModel/System/SysLogVis.cs
@@ -3,7 +3,7 @@ using Dm.Config;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统访问日志表
diff --git a/Entity/DbModel/System/SysMenu.cs b/Entity/DbModel/System/SysMenu.cs
index fbb48f8..9d63e73 100644
--- a/Entity/DbModel/System/SysMenu.cs
+++ b/Entity/DbModel/System/SysMenu.cs
@@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统菜单表
diff --git a/Entity/DbModel/System/SysNotice.cs b/Entity/DbModel/System/SysNotice.cs
index 973f879..3635dcf 100644
--- a/Entity/DbModel/System/SysNotice.cs
+++ b/Entity/DbModel/System/SysNotice.cs
@@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统通知公告表
diff --git a/Entity/DbModel/System/SysNoticeUser.cs b/Entity/DbModel/System/SysNoticeUser.cs
index fa02571..bb2f3ba 100644
--- a/Entity/DbModel/System/SysNoticeUser.cs
+++ b/Entity/DbModel/System/SysNoticeUser.cs
@@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统通知公告用户表
diff --git a/Entity/DbModel/System/SysRole.cs b/Entity/DbModel/System/SysRole.cs
index 189c636..b5fcbd0 100644
--- a/Entity/DbModel/System/SysRole.cs
+++ b/Entity/DbModel/System/SysRole.cs
@@ -2,7 +2,7 @@
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统角色表
diff --git a/Entity/DbModel/System/SysRoleMenu.cs b/Entity/DbModel/System/SysRoleMenu.cs
index 0cae44f..26eca53 100644
--- a/Entity/DbModel/System/SysRoleMenu.cs
+++ b/Entity/DbModel/System/SysRoleMenu.cs
@@ -1,11 +1,6 @@
using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统角色菜单表
diff --git a/Entity/DbModel/System/SysUser.cs b/Entity/DbModel/System/SysUser.cs
index 9fa8ceb..a87b156 100644
--- a/Entity/DbModel/System/SysUser.cs
+++ b/Entity/DbModel/System/SysUser.cs
@@ -3,7 +3,7 @@ using Common.Enum;
using Entity.Base;
using SqlSugar;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统用户表
diff --git a/Entity/DbModel/System/SysUserRole.cs b/Entity/DbModel/System/SysUserRole.cs
index 145cd7c..c9f6c86 100644
--- a/Entity/DbModel/System/SysUserRole.cs
+++ b/Entity/DbModel/System/SysUserRole.cs
@@ -1,11 +1,6 @@
using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-namespace Entity.DbModel.System.SysBaseObject
+namespace Entity.DbModel.System
{
///
/// 系统用户角色表
diff --git a/Entity/Dto/Req/ConfigReq.cs b/Entity/Dto/Req/ConfigReq.cs
index 62e1bbb..d870864 100644
--- a/Entity/Dto/Req/ConfigReq.cs
+++ b/Entity/Dto/Req/ConfigReq.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/MenuReq.cs b/Entity/Dto/Req/MenuReq.cs
index 82e6c54..097667b 100644
--- a/Entity/Dto/Req/MenuReq.cs
+++ b/Entity/Dto/Req/MenuReq.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/PageAmmeterReq.cs b/Entity/Dto/Req/PageAmmeterReq.cs
new file mode 100644
index 0000000..1e07d0d
--- /dev/null
+++ b/Entity/Dto/Req/PageAmmeterReq.cs
@@ -0,0 +1,12 @@
+namespace Entity.Dto.Req;
+
+///
+///
+///
+public class PageAmmeterReq : BasePageReq
+{
+ ///
+ ///
+ ///
+ public string? Code { get; set; }
+}
\ No newline at end of file
diff --git a/Entity/Dto/Req/PageDictDataReq.cs b/Entity/Dto/Req/PageDictDataReq.cs
index 366a454..5c533d1 100644
--- a/Entity/Dto/Req/PageDictDataReq.cs
+++ b/Entity/Dto/Req/PageDictDataReq.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/PageDictTypeReq.cs b/Entity/Dto/Req/PageDictTypeReq.cs
index 0680c6a..2527829 100644
--- a/Entity/Dto/Req/PageDictTypeReq.cs
+++ b/Entity/Dto/Req/PageDictTypeReq.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/PageNoticeReq.cs b/Entity/Dto/Req/PageNoticeReq.cs
index 9e727ef..dd68d41 100644
--- a/Entity/Dto/Req/PageNoticeReq.cs
+++ b/Entity/Dto/Req/PageNoticeReq.cs
@@ -1,5 +1,5 @@
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/PageRoleReq.cs b/Entity/Dto/Req/PageRoleReq.cs
index fc34926..d5107da 100644
--- a/Entity/Dto/Req/PageRoleReq.cs
+++ b/Entity/Dto/Req/PageRoleReq.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Req/UserReq.cs b/Entity/Dto/Req/UserReq.cs
index a9541e4..13766aa 100644
--- a/Entity/Dto/Req/UserReq.cs
+++ b/Entity/Dto/Req/UserReq.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Req
{
diff --git a/Entity/Dto/Resp/MenuResp.cs b/Entity/Dto/Resp/MenuResp.cs
index 8a25f79..be0c1e3 100644
--- a/Entity/Dto/Resp/MenuResp.cs
+++ b/Entity/Dto/Resp/MenuResp.cs
@@ -1,5 +1,5 @@
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Mapster;
namespace Entity.Dto.Resp
diff --git a/Entity/Dto/Resp/UserResp.cs b/Entity/Dto/Resp/UserResp.cs
index 743fd77..162b75c 100644
--- a/Entity/Dto/Resp/UserResp.cs
+++ b/Entity/Dto/Resp/UserResp.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
namespace Entity.Dto.Resp
{
diff --git a/HybirdFrameworkCore/Autofac/Attribute/PropertyAttribute.cs b/HybirdFrameworkCore/Autofac/Attribute/PropertyAttribute.cs
index d1a6ab4..bca041d 100644
--- a/HybirdFrameworkCore/Autofac/Attribute/PropertyAttribute.cs
+++ b/HybirdFrameworkCore/Autofac/Attribute/PropertyAttribute.cs
@@ -8,7 +8,15 @@ public class PropertyAttribute : System.Attribute
public readonly double Scale;
public readonly int Start;
public readonly PropertyReadConstant Type;
-
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 缩放
+ /// 舍入方式,用于处理浮点数的精度问题
+ /// 偏移量
public PropertyAttribute(int start, int length, PropertyReadConstant type = PropertyReadConstant.Bit,
double scale = 1, int round = 0, double offset = 0)
{
diff --git a/HybirdFrameworkCore/Entity/IPage.cs b/HybirdFrameworkCore/Entity/IPage.cs
index 4b7cdde..b9a8d4a 100644
--- a/HybirdFrameworkCore/Entity/IPage.cs
+++ b/HybirdFrameworkCore/Entity/IPage.cs
@@ -9,7 +9,7 @@ public class IPage
public int PageSize;
public List? Rows;
-
+
public IPage(int total, QueryPageModel page, List? rows)
{
Total = total;
diff --git a/HybirdFrameworkCore/Entity/QueryPageModel.cs b/HybirdFrameworkCore/Entity/QueryPageModel.cs
index 3aaad87..986175c 100644
--- a/HybirdFrameworkCore/Entity/QueryPageModel.cs
+++ b/HybirdFrameworkCore/Entity/QueryPageModel.cs
@@ -11,22 +11,3 @@ public class QueryPageModel
///
public int PageSize { get; set; } = 10;
}
-///
-/// 电表统计分析
-///
-public class AmmeterQueryPageModel
-{
- ///
- ///页码
- ///
- public int Page { get; set; } = 1;
- ///
- /// 页数
- ///
- public int PageSize { get; set; } = 10;
-
- ///
- /// 电表编码 用于分页查询
- ///
- public string? Code { get; set; } = "";
-}
\ No newline at end of file
diff --git a/HybirdFrameworkCore/Entity/Result.cs b/HybirdFrameworkCore/Entity/Result.cs
index a265b81..2593893 100644
--- a/HybirdFrameworkCore/Entity/Result.cs
+++ b/HybirdFrameworkCore/Entity/Result.cs
@@ -54,13 +54,12 @@
///
/// 消息
///
- public static Result Fail(string msg = "失败")
+ public static Result Fail(string? msg = "失败")
{
return Message(false, msg, default);
}
-
///
/// 返回失败
///
diff --git a/HybirdFrameworkCore/Extensions/AppConfigurtaionServices.cs b/HybirdFrameworkCore/Extensions/AppConfigurtaionServices.cs
deleted file mode 100644
index f83f80d..0000000
--- a/HybirdFrameworkCore/Extensions/AppConfigurtaionServices.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Microsoft.Extensions.Configuration.Json;
-using Microsoft.Extensions.Configuration;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HybirdFrameworkCore.Extensions
-{
- public class AppConfigurtaionServices
- {
- public static IConfiguration Configuration { get; set; }
- static AppConfigurtaionServices()
- {
- //ReloadOnChange = true 当appsettings.json被修改时重新加载
- Configuration = new ConfigurationBuilder()
- //.SetBasePath(Directory.GetCurrentDirectory())
- //AppDomain.CurrentDomain.BaseDirectory是程序集基目录,所以appsettings.json,需要复制一份放在程序集目录下,
- .SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
- .Add(new JsonConfigurationSource { Path = "appsettings.json", ReloadOnChange = true })
- .Build();
- }
- }
-}
diff --git a/HybirdFrameworkCore/Redis/RedisHelper.cs b/HybirdFrameworkCore/Redis/RedisHelper.cs
index 88a0bce..45d9455 100644
--- a/HybirdFrameworkCore/Redis/RedisHelper.cs
+++ b/HybirdFrameworkCore/Redis/RedisHelper.cs
@@ -55,6 +55,7 @@ public class RedisHelper : IDisposable
{
return GetConnect().GetDatabase(_defaultDB);
}
+
///
/// 获取数据库
///
@@ -82,19 +83,31 @@ public class RedisHelper : IDisposable
///
/// 键
/// 对应的值,如果键不存在则返回null
- public string GetStrValue(string key)
+ public string? GetStrValue(string key)
{
var db = GetConnect().GetDatabase(_defaultDB);
return db.StringGet(key);
}
+ ///
+ /// 先进先出队列
+ ///
+ ///
+ ///
+ ///
+ public void PublishAsync(string topic, string value)
+ {
+ ISubscriber sub = GetConnect().GetSubscriber();
+ sub.PublishAsync(topic, value);
+ }
+
///
/// 获取Redis中的值(异步版本)
///
/// 键
/// 一个表示异步操作的任务,任务的结果是对应的值,如果键不存在则返回null
- public async Task GetAsync(string key)
+ public async Task GetAsync(string key)
{
var db = GetConnect().GetDatabase(_defaultDB);
return await db.StringGetAsync(key);
@@ -105,11 +118,12 @@ public class RedisHelper : IDisposable
///
/// 键
/// 值
+ /// 值
/// 操作是否成功
- public bool SetKeyValueStr(string key, string value)
+ public bool SetKeyValueStr(string key, string value, TimeSpan? expiry = default(TimeSpan?))
{
var db = GetConnect().GetDatabase(_defaultDB);
- return db.StringSet(key, value);
+ return db.StringSet(key, value, expiry);
}
///
diff --git a/HybirdFrameworkCore/Utils/IEnum.cs b/HybirdFrameworkCore/Utils/IEnum.cs
new file mode 100644
index 0000000..cb11b55
--- /dev/null
+++ b/HybirdFrameworkCore/Utils/IEnum.cs
@@ -0,0 +1,9 @@
+namespace HybirdFrameworkCore.Utils;
+
+public interface IEnum
+{
+ public TK Key { get; set; }
+ public TV Value { get; set; }
+
+ public TV GetByKey(TK key);
+}
\ No newline at end of file
diff --git a/Repository/BaseRepository.cs b/Repository/BaseRepository.cs
index b04d722..770092e 100644
--- a/Repository/BaseRepository.cs
+++ b/Repository/BaseRepository.cs
@@ -1,5 +1,4 @@
using System.Linq.Expressions;
-using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using SqlSugar;
diff --git a/Repository/System/SysConfigRepository.cs b/Repository/System/SysConfigRepository.cs
index d6dab65..0a7954e 100644
--- a/Repository/System/SysConfigRepository.cs
+++ b/Repository/System/SysConfigRepository.cs
@@ -1,8 +1,8 @@
-using Entity.DbModel.System.SysBaseObject;
+using System.Linq.Expressions;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
-using System.Linq.Expressions;
namespace Repository.System
{
diff --git a/Repository/System/SysDicDataRepository.cs b/Repository/System/SysDicDataRepository.cs
index 7fdb7b1..4ae605c 100644
--- a/Repository/System/SysDicDataRepository.cs
+++ b/Repository/System/SysDicDataRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysDicTypeRepository.cs b/Repository/System/SysDicTypeRepository.cs
index 4cac240..57491da 100644
--- a/Repository/System/SysDicTypeRepository.cs
+++ b/Repository/System/SysDicTypeRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysFileRepository.cs b/Repository/System/SysFileRepository.cs
index 9438b77..a5c488a 100644
--- a/Repository/System/SysFileRepository.cs
+++ b/Repository/System/SysFileRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysLogDiffRepository.cs b/Repository/System/SysLogDiffRepository.cs
index 7d1737a..bfeb72c 100644
--- a/Repository/System/SysLogDiffRepository.cs
+++ b/Repository/System/SysLogDiffRepository.cs
@@ -1,11 +1,11 @@
-using Entity.DbModel.System.SysBaseObject;
-using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Repository.System
{
diff --git a/Repository/System/SysLogExRepository.cs b/Repository/System/SysLogExRepository.cs
index a84ead8..378b1d8 100644
--- a/Repository/System/SysLogExRepository.cs
+++ b/Repository/System/SysLogExRepository.cs
@@ -1,5 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
-using Entity.Dto.Req;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
@@ -8,6 +7,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Repository.System
{
diff --git a/Repository/System/SysLogOpRepository.cs b/Repository/System/SysLogOpRepository.cs
index faa46b2..8f1aea1 100644
--- a/Repository/System/SysLogOpRepository.cs
+++ b/Repository/System/SysLogOpRepository.cs
@@ -1,5 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
-using Entity.Dto.Req;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
@@ -8,6 +7,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Repository.System
{
diff --git a/Repository/System/SysLogVisRepository.cs b/Repository/System/SysLogVisRepository.cs
index 24e886f..43823c3 100644
--- a/Repository/System/SysLogVisRepository.cs
+++ b/Repository/System/SysLogVisRepository.cs
@@ -1,11 +1,11 @@
-using Entity.DbModel.System.SysBaseObject;
-using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Repository.System
{
diff --git a/Repository/System/SysMenuRepository.cs b/Repository/System/SysMenuRepository.cs
index 68d58d7..c683320 100644
--- a/Repository/System/SysMenuRepository.cs
+++ b/Repository/System/SysMenuRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysNoticeRepository.cs b/Repository/System/SysNoticeRepository.cs
index 1d68dda..941c82b 100644
--- a/Repository/System/SysNoticeRepository.cs
+++ b/Repository/System/SysNoticeRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysNoticeUserRepository.cs b/Repository/System/SysNoticeUserRepository.cs
index b3cb058..00bf9b6 100644
--- a/Repository/System/SysNoticeUserRepository.cs
+++ b/Repository/System/SysNoticeUserRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysRoleMenuRepository.cs b/Repository/System/SysRoleMenuRepository.cs
index 24a67d9..5cf665a 100644
--- a/Repository/System/SysRoleMenuRepository.cs
+++ b/Repository/System/SysRoleMenuRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysRoleRepository.cs b/Repository/System/SysRoleRepository.cs
index 56bca94..4e023bb 100644
--- a/Repository/System/SysRoleRepository.cs
+++ b/Repository/System/SysRoleRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Repository/System/SysUserRepository.cs b/Repository/System/SysUserRepository.cs
index cb5baec..1f0aae6 100644
--- a/Repository/System/SysUserRepository.cs
+++ b/Repository/System/SysUserRepository.cs
@@ -1,11 +1,11 @@
-using Entity.DbModel.System.SysBaseObject;
-using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Repository.System
{
diff --git a/Repository/System/SysUserRoleRepository.cs b/Repository/System/SysUserRoleRepository.cs
index 9f6ae9a..8f0dfba 100644
--- a/Repository/System/SysUserRoleRepository.cs
+++ b/Repository/System/SysUserRoleRepository.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
diff --git a/Service/Ammeter/EmeterDayEnergyService.cs b/Service/Ammeter/EmeterDayEnergyService.cs
index febf41f..c11f760 100644
--- a/Service/Ammeter/EmeterDayEnergyService.cs
+++ b/Service/Ammeter/EmeterDayEnergyService.cs
@@ -1,4 +1,5 @@
using Entity.Ammeter;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@@ -15,7 +16,7 @@ namespace Service.Ammeter
{
this.BaseDal = service;
}
- public async Task> Page(AmmeterQueryPageModel queryPageModel)
+ public async Task> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
diff --git a/Service/Ammeter/EmeterHourEnergyService.cs b/Service/Ammeter/EmeterHourEnergyService.cs
index a0acca5..c97e9ed 100644
--- a/Service/Ammeter/EmeterHourEnergyService.cs
+++ b/Service/Ammeter/EmeterHourEnergyService.cs
@@ -1,4 +1,5 @@
using Entity.Ammeter;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@@ -16,7 +17,7 @@ namespace Service.Ammeter
this.BaseDal = service;
}
- public async Task> Page(AmmeterQueryPageModel queryPageModel)
+ public async Task> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
diff --git a/Service/Ammeter/EmeterMinutesEnergyChangeService.cs b/Service/Ammeter/EmeterMinutesEnergyChangeService.cs
index 435e947..17fe17a 100644
--- a/Service/Ammeter/EmeterMinutesEnergyChangeService.cs
+++ b/Service/Ammeter/EmeterMinutesEnergyChangeService.cs
@@ -1,14 +1,8 @@
using Entity.Ammeter;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
-using Repository;
using Repository.Ammeter;
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Service.Ammeter
{
@@ -23,7 +17,7 @@ namespace Service.Ammeter
}
- public async Task> Page(AmmeterQueryPageModel queryPageModel)
+ public async Task> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
diff --git a/Service/Ammeter/EmeterMinutesEnergyService.cs b/Service/Ammeter/EmeterMinutesEnergyService.cs
index 472a3b6..cb399e6 100644
--- a/Service/Ammeter/EmeterMinutesEnergyService.cs
+++ b/Service/Ammeter/EmeterMinutesEnergyService.cs
@@ -1,4 +1,5 @@
using Entity.Ammeter;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
@@ -18,7 +19,7 @@ namespace Service.Ammeter
_emeterMinutesEnergyRepository1 = emeterMinutesEnergyRepository;
}
- public async Task> Page(AmmeterQueryPageModel queryPageModel)
+ public async Task> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
diff --git a/Service/Cloud/Client/CloudClientMgr.cs b/Service/Cloud/Client/CloudClientMgr.cs
index f255fa9..3888359 100644
--- a/Service/Cloud/Client/CloudClientMgr.cs
+++ b/Service/Cloud/Client/CloudClientMgr.cs
@@ -41,49 +41,56 @@ public class CloudClientMgr
BinInfoRepository binInfoRepository = AppInfo.Container.Resolve();
redisHelper?.GetSubscriber().Subscribe("UploadTelemetryData", (channel, value) =>
{
- Log.Info($"receive UploadTelemetryData={value}");
- if (value.HasValue)
+ try
{
- UploadTelemetryData? data = JsonConvert.DeserializeObject(value.ToString());
- if (data != null)
+ Log.Info($"receive UploadTelemetryData={value}");
+ if (value.HasValue)
{
- BinInfo? binInfo = binInfoRepository.QueryByClause(it => it.ChargerNo == data.ChargerNo);
- ChargeDevDataInfo req = new ChargeDevDataInfo()
+ UploadTelemetryData? data = JsonConvert.DeserializeObject(value.ToString());
+ if (data != null)
{
- sn = StaticStationInfo.StationNo,
- en = data.ChargerNo,
- sd = "A"+int.Parse(data.ChargerNo),
- mtp = StaticStationInfo.ChargePower,
- mcr = 1,
- hb = binInfo?.Exists??0,
- el = 0,
- cno = int.Parse(data.ChargerNo),
- cs = binInfo.ChargeStatus??0,
- fs = 0,
- @as = 0,
- //fc = data.,
- //st = data.,
- ct = data.ChargingTime,
- //ssoc = data.,
- csoc = data.CurrentSoc,
- //ssoe = data.,
- //csoe = data.,
- cvot = data.BmsChargingVoltage,
- ccur = data.BmsChargingCurrent,
- nvot = data.BmsNeedVoltage,
- ncur = data.BmsNeedCurrent,
- lsv = data.SingleBatteryMinVoltage,
- hsv = data.SingleBatteryMaxVoltage,
- lst = data.MinBatteryTemp,
- hst = data.MaxBatteryTemp,
- ws = 0xFF,
- it = 0xFF,
- ot = 0xFF,
- bt = DateTime.Now
- };
- CloudClient?.SendChargeDevDataInfo(req);
+ BinInfo? binInfo = binInfoRepository.QueryByClause(it => it.ChargerNo == data.ChargerNo);
+ ChargeDevDataInfo req = new ChargeDevDataInfo()
+ {
+ sn = StaticStationInfo.StationNo,
+ en = data.ChargerNo,
+ sd = "A"+int.Parse(data.ChargerNo),
+ mtp = StaticStationInfo.ChargePower,
+ mcr = 1,
+ hb = binInfo?.Exists??0,
+ el = 0,
+ cno = int.Parse(data.ChargerNo),
+ cs = binInfo.ChargeStatus??0,
+ fs = 0,
+ @as = 0,
+ //fc = data.,
+ //st = data.,
+ ct = data.ChargingTime,
+ //ssoc = data.,
+ csoc = data.CurrentSoc,
+ //ssoe = data.,
+ //csoe = data.,
+ cvot = data.BmsChargingVoltage,
+ ccur = data.BmsChargingCurrent,
+ nvot = data.BmsNeedVoltage,
+ ncur = data.BmsNeedCurrent,
+ lsv = data.SingleBatteryMinVoltage,
+ hsv = data.SingleBatteryMaxVoltage,
+ lst = data.MinBatteryTemp,
+ hst = data.MaxBatteryTemp,
+ ws = 0xFF,
+ it = 0xFF,
+ ot = 0xFF,
+ bt = DateTime.Now
+ };
+ CloudClient?.SendChargeDevDataInfo(req);
+ }
}
}
+ catch (Exception e)
+ {
+ Log.Info("error", e);
+ }
});
}
}
\ No newline at end of file
diff --git a/Service/Mgr/SysDictDataMgr.cs b/Service/Mgr/SysDictDataMgr.cs
index 5b4cbbc..690b7f4 100644
--- a/Service/Mgr/SysDictDataMgr.cs
+++ b/Service/Mgr/SysDictDataMgr.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
diff --git a/Service/Mgr/SysFileMgr.cs b/Service/Mgr/SysFileMgr.cs
index 660b544..a5e5664 100644
--- a/Service/Mgr/SysFileMgr.cs
+++ b/Service/Mgr/SysFileMgr.cs
@@ -1,18 +1,12 @@
-using Aliyun.OSS.Util;
+using System.ComponentModel.DataAnnotations;
+using System.Text.RegularExpressions;
+using Aliyun.OSS.Util;
using Common.Util;
-using Entity.DbModel.System.SysBaseObject;
-using Furion.VirtualFileServer;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Configuration;
using Microsoft.AspNetCore.Http;
using Repository.System;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
namespace Service.Mgr
{
@@ -92,14 +86,6 @@ namespace Service.Mgr
throw new ArgumentException($"文件超过允许大小");
// 获取文件后缀
var suffix = Path.GetExtension(file.FileName).ToLower(); // 后缀
- if (string.IsNullOrWhiteSpace(suffix))
- {
- var contentTypeProvider = FS.GetFileExtensionContentTypeProvider();
- suffix = contentTypeProvider.Mappings.FirstOrDefault(u => u.Value == file.ContentType).Key;
- // 修改 image/jpeg 类型返回的 .jpe 后缀
- if (suffix == ".jpe")
- suffix = ".jpg";
- }
if (string.IsNullOrWhiteSpace(suffix))
throw new ArgumentException($"文件后缀错误");
var newFile = new SysFile
diff --git a/Service/Mgr/SysRoleMenuMgr.cs b/Service/Mgr/SysRoleMenuMgr.cs
index 814c931..1488dc5 100644
--- a/Service/Mgr/SysRoleMenuMgr.cs
+++ b/Service/Mgr/SysRoleMenuMgr.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
diff --git a/Service/Mgr/SysUserRoleMgr.cs b/Service/Mgr/SysUserRoleMgr.cs
index b18a449..eb91b12 100644
--- a/Service/Mgr/SysUserRoleMgr.cs
+++ b/Service/Mgr/SysUserRoleMgr.cs
@@ -1,6 +1,6 @@
using Autofac;
using Common.Const;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/Mgr/UserManager.cs b/Service/Mgr/UserManager.cs
index ad64a86..2f15356 100644
--- a/Service/Mgr/UserManager.cs
+++ b/Service/Mgr/UserManager.cs
@@ -1,9 +1,9 @@
-using Entity.DbModel.System.SysBaseObject;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Entity.DbModel.System;
namespace Service.Mgr
{
diff --git a/Service/Station/BinInfoService.cs b/Service/Station/BinInfoService.cs
index 8afe4dc..038bc40 100644
--- a/Service/Station/BinInfoService.cs
+++ b/Service/Station/BinInfoService.cs
@@ -1,7 +1,6 @@
using Entity.Api.Req;
using Entity.Base;
using Entity.DbModel.Station;
-using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
diff --git a/Service/System/Dict/SysDictDataService.cs b/Service/System/Dict/SysDictDataService.cs
index c371ea4..2973d1f 100644
--- a/Service/System/Dict/SysDictDataService.cs
+++ b/Service/System/Dict/SysDictDataService.cs
@@ -1,6 +1,6 @@
using Common.Enum;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;
diff --git a/Service/System/Dict/SysDictTypeService.cs b/Service/System/Dict/SysDictTypeService.cs
index 8077d95..80a500b 100644
--- a/Service/System/Dict/SysDictTypeService.cs
+++ b/Service/System/Dict/SysDictTypeService.cs
@@ -1,6 +1,6 @@
using Common.Enum;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;
diff --git a/Service/System/LoginService.cs b/Service/System/LoginService.cs
index dc1ccc8..7006240 100644
--- a/Service/System/LoginService.cs
+++ b/Service/System/LoginService.cs
@@ -2,7 +2,6 @@
using Common.Const;
using Common.Enum;
using Common.Util;
-using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Attribute;
using HybirdFrameworkCore.Autofac;
@@ -13,6 +12,7 @@ using Repository.System;
using Service.Mgr;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
+using Entity.DbModel.System;
namespace Service.System
{
diff --git a/Service/System/Roles/SysRoleMenuService.cs b/Service/System/Roles/SysRoleMenuService.cs
index 4aa790d..e883e51 100644
--- a/Service/System/Roles/SysRoleMenuService.cs
+++ b/Service/System/Roles/SysRoleMenuService.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Service.Mgr;
diff --git a/Service/System/Roles/SysRoleService.cs b/Service/System/Roles/SysRoleService.cs
index 908162a..6570eab 100644
--- a/Service/System/Roles/SysRoleService.cs
+++ b/Service/System/Roles/SysRoleService.cs
@@ -1,7 +1,7 @@
using Common.Const;
using Common.Enum;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/System/Roles/SysUserRoleService.cs b/Service/System/Roles/SysUserRoleService.cs
index 02f5aa6..254f33d 100644
--- a/Service/System/Roles/SysUserRoleService.cs
+++ b/Service/System/Roles/SysUserRoleService.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
using Service.Mgr;
diff --git a/Service/System/SysConfigService.cs b/Service/System/SysConfigService.cs
index d5007ee..5a35674 100644
--- a/Service/System/SysConfigService.cs
+++ b/Service/System/SysConfigService.cs
@@ -5,7 +5,7 @@ using Autofac;
using Common.Enum;
using Entity.Base;
using Entity.Constant;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
@@ -16,7 +16,6 @@ using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Security;
using Repository.System;
using Service.Mgr;
-using Service.Station;
using SqlSugar;
namespace Service.System
diff --git a/Service/System/SysFileServices.cs b/Service/System/SysFileServices.cs
index aea8bde..dac5d95 100644
--- a/Service/System/SysFileServices.cs
+++ b/Service/System/SysFileServices.cs
@@ -7,7 +7,7 @@ using Aliyun.OSS.Util;
using Common.Enum;
using Common.Util;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Furion.VirtualFileServer;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/System/SysLog/SysLogDiffService.cs b/Service/System/SysLog/SysLogDiffService.cs
index fe01512..3b2636c 100644
--- a/Service/System/SysLog/SysLogDiffService.cs
+++ b/Service/System/SysLog/SysLogDiffService.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
diff --git a/Service/System/SysLog/SysLogExService.cs b/Service/System/SysLog/SysLogExService.cs
index bfb401b..3af84bf 100644
--- a/Service/System/SysLog/SysLogExService.cs
+++ b/Service/System/SysLog/SysLogExService.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/System/SysLog/SysLogOpService.cs b/Service/System/SysLog/SysLogOpService.cs
index 695cf22..016fcfc 100644
--- a/Service/System/SysLog/SysLogOpService.cs
+++ b/Service/System/SysLog/SysLogOpService.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/System/SysLog/SysLogVisService.cs b/Service/System/SysLog/SysLogVisService.cs
index bd5f16e..a680a8c 100644
--- a/Service/System/SysLog/SysLogVisService.cs
+++ b/Service/System/SysLog/SysLogVisService.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
diff --git a/Service/System/SysMenuService.cs b/Service/System/SysMenuService.cs
index 63baa7b..492d4c3 100644
--- a/Service/System/SysMenuService.cs
+++ b/Service/System/SysMenuService.cs
@@ -1,6 +1,6 @@
using AutoMapper;
using Common.Enum;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/Service/System/SysNoticeService.cs b/Service/System/SysNoticeService.cs
index 3aec73b..41eed55 100644
--- a/Service/System/SysNoticeService.cs
+++ b/Service/System/SysNoticeService.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
using Common.Enum;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using Mapster;
diff --git a/Service/System/SysNoticeUserService.cs b/Service/System/SysNoticeUserService.cs
index d0562ab..5e85abc 100644
--- a/Service/System/SysNoticeUserService.cs
+++ b/Service/System/SysNoticeUserService.cs
@@ -1,4 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
namespace Service.System
diff --git a/Service/System/SysUserService.cs b/Service/System/SysUserService.cs
index cf665f4..d84745a 100644
--- a/Service/System/SysUserService.cs
+++ b/Service/System/SysUserService.cs
@@ -4,7 +4,7 @@ using Common.Const;
using Common.Enum;
using Common.Util;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
diff --git a/WebStarter/Controllers/Ammeter/AmmeterController.cs b/WebStarter/Controllers/Ammeter/AmmeterController.cs
index 1369dfb..4a1a883 100644
--- a/WebStarter/Controllers/Ammeter/AmmeterController.cs
+++ b/WebStarter/Controllers/Ammeter/AmmeterController.cs
@@ -1,14 +1,9 @@
-using Autofac;
-using Entity.Ammeter;
-using Entity.DbModel;
-using HybirdFrameworkCore.Autofac;
+using Entity.Ammeter;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
-using Repository.Station;
using Service.Ammeter;
using Service.Station;
-using Service.System;
-using System.Collections.Generic;
namespace WebStarter.Controllers.Ammeter
{
@@ -84,7 +79,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表变化值信息
///
[HttpPost("TEgEmeterRealEnergyValue")]
- public async Task> GetEmeterMinutesEnergyChange([FromBody] AmmeterQueryPageModel queryPageModel)
+ public async Task> GetEmeterMinutesEnergyChange([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterMinutesEnergyChangeService.Page(queryPageModel);
}
@@ -113,7 +108,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表小时能耗值
///
[HttpPost("TEgEmeterHourEnergyValue")]
- public async Task> GetEmeterHourEnergy([FromBody] AmmeterQueryPageModel queryPageModel)
+ public async Task> GetEmeterHourEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterHourEnergyService.Page(queryPageModel);
}
@@ -141,7 +136,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表每天能耗值
///
[HttpPost("TEgEmeterDayEnergyValue")]
- public async Task> GetEmeterDayEnergy([FromBody] AmmeterQueryPageModel queryPageModel)
+ public async Task> GetEmeterDayEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterDayEnergyService.Page(queryPageModel);
}
diff --git a/WebStarter/Controllers/BasicConfig/BaseConfigController.cs b/WebStarter/Controllers/BasicConfig/BaseConfigController.cs
index 263e4b7..6088662 100644
--- a/WebStarter/Controllers/BasicConfig/BaseConfigController.cs
+++ b/WebStarter/Controllers/BasicConfig/BaseConfigController.cs
@@ -6,7 +6,6 @@ using System;
using System.Reflection;
using Entity.Api.Resp;
using Entity.DbModel.Station;
-using Entity.DbModel.System.SysBaseObject;
using HybirdFrameworkCore.Entity;
using Microsoft.VisualBasic;
using Newtonsoft.Json.Linq;
diff --git a/WebStarter/Controllers/System/Dict/SysDictDataController.cs b/WebStarter/Controllers/System/Dict/SysDictDataController.cs
index 218cb1e..198ade5 100644
--- a/WebStarter/Controllers/System/Dict/SysDictDataController.cs
+++ b/WebStarter/Controllers/System/Dict/SysDictDataController.cs
@@ -1,9 +1,9 @@
-using Entity.DbModel.System.SysBaseObject;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.Dto.Req;
using Service.System.Dict;
using Entity.Base;
+using Entity.DbModel.System;
namespace WebStarter.Controllers.System.Dict
{
diff --git a/WebStarter/Controllers/System/Dict/SysDictTypeController.cs b/WebStarter/Controllers/System/Dict/SysDictTypeController.cs
index f37f508..88ad8d2 100644
--- a/WebStarter/Controllers/System/Dict/SysDictTypeController.cs
+++ b/WebStarter/Controllers/System/Dict/SysDictTypeController.cs
@@ -1,9 +1,9 @@
-using Entity.DbModel.System.SysBaseObject;
-using Entity.Dto.Req;
+using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System.Dict;
using Entity.Base;
+using Entity.DbModel.System;
namespace WebStarter.Controllers.System.Dict
{
diff --git a/WebStarter/Controllers/System/SysConfigController.cs b/WebStarter/Controllers/System/SysConfigController.cs
index 6b7572d..8067989 100644
--- a/WebStarter/Controllers/System/SysConfigController.cs
+++ b/WebStarter/Controllers/System/SysConfigController.cs
@@ -1,7 +1,6 @@
using Entity.Api.Req;
using Entity.Api.Resp;
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
@@ -16,6 +15,7 @@ using Service.System;
using SqlSugar;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
+using Entity.DbModel.System;
using Service.Init;
namespace WebStarter.Controllers.System
diff --git a/WebStarter/Controllers/System/SysFileController.cs b/WebStarter/Controllers/System/SysFileController.cs
index 73d906a..47e34d6 100644
--- a/WebStarter/Controllers/System/SysFileController.cs
+++ b/WebStarter/Controllers/System/SysFileController.cs
@@ -1,9 +1,9 @@
-using Entity.DbModel.System.SysBaseObject;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.Dto.Req;
using Service.System;
using Entity.Base;
+using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{
diff --git a/WebStarter/Controllers/System/SysLog/SysLogDiffController.cs b/WebStarter/Controllers/System/SysLog/SysLogDiffController.cs
index b2774da..207076b 100644
--- a/WebStarter/Controllers/System/SysLog/SysLogDiffController.cs
+++ b/WebStarter/Controllers/System/SysLog/SysLogDiffController.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;
diff --git a/WebStarter/Controllers/System/SysLog/SysLogExController.cs b/WebStarter/Controllers/System/SysLog/SysLogExController.cs
index 084b784..2ac2171 100644
--- a/WebStarter/Controllers/System/SysLog/SysLogExController.cs
+++ b/WebStarter/Controllers/System/SysLog/SysLogExController.cs
@@ -1,6 +1,6 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;
diff --git a/WebStarter/Controllers/System/SysLog/SysLogOpController.cs b/WebStarter/Controllers/System/SysLog/SysLogOpController.cs
index 176a6b7..58b075d 100644
--- a/WebStarter/Controllers/System/SysLog/SysLogOpController.cs
+++ b/WebStarter/Controllers/System/SysLog/SysLogOpController.cs
@@ -1,5 +1,5 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;
diff --git a/WebStarter/Controllers/System/SysLog/SysLogVisController.cs b/WebStarter/Controllers/System/SysLog/SysLogVisController.cs
index dd24e0a..1ef656d 100644
--- a/WebStarter/Controllers/System/SysLog/SysLogVisController.cs
+++ b/WebStarter/Controllers/System/SysLog/SysLogVisController.cs
@@ -1,6 +1,6 @@
using Entity.Base;
-using Entity.DbModel.System.SysBaseObject;
+using Entity.DbModel.System;
using Entity.Dto.Req;
using Microsoft.AspNetCore.Mvc;
using Service.System.SysLog;
diff --git a/WebStarter/Controllers/System/SysMenuController.cs b/WebStarter/Controllers/System/SysMenuController.cs
index 0598b38..0daa32f 100644
--- a/WebStarter/Controllers/System/SysMenuController.cs
+++ b/WebStarter/Controllers/System/SysMenuController.cs
@@ -1,5 +1,5 @@
-using Entity.DbModel.System.SysBaseObject;
-using Entity.DbModel;
+using Entity.DbModel;
+using Entity.DbModel.System;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System;
diff --git a/WebStarter/Controllers/System/SysRoleController.cs b/WebStarter/Controllers/System/SysRoleController.cs
index 77ec4be..b3604fc 100644
--- a/WebStarter/Controllers/System/SysRoleController.cs
+++ b/WebStarter/Controllers/System/SysRoleController.cs
@@ -1,11 +1,11 @@
-using Entity.DbModel.System.SysBaseObject;
-using HybirdFrameworkCore.Entity;
+using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.System.Roles;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using Common.Enum;
using Entity.Base;
+using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{
diff --git a/WebStarter/Controllers/System/SysUserController.cs b/WebStarter/Controllers/System/SysUserController.cs
index 7075cb2..430eeb6 100644
--- a/WebStarter/Controllers/System/SysUserController.cs
+++ b/WebStarter/Controllers/System/SysUserController.cs
@@ -1,5 +1,4 @@
-using Entity.DbModel.System.SysBaseObject;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using Entity.DbModel;
using Entity.Dto.Req;
@@ -7,6 +6,7 @@ using HybirdFrameworkCore.Entity;
using Service.Mgr;
using Service.System;
using Entity.Base;
+using Entity.DbModel.System;
namespace WebStarter.Controllers.System
{
diff --git a/WebStarter/Properties/launchSettings.json b/WebStarter/Properties/launchSettings.json
index a6b7187..e31ee95 100644
--- a/WebStarter/Properties/launchSettings.json
+++ b/WebStarter/Properties/launchSettings.json
@@ -14,7 +14,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
- "applicationUrl": "http://0.0.0.0:5034",
+ "applicationUrl": "http://localhost:5034",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"profiles_active": "dev"
diff --git a/WebStarter/appsettings.dev.json b/WebStarter/appsettings.dev.json
index 0e542e6..d7a6711 100644
--- a/WebStarter/appsettings.dev.json
+++ b/WebStarter/appsettings.dev.json
@@ -72,7 +72,7 @@
"Kestrel": {
"Endpoints": {
"http": {
- "Url": "http://*:15034"
+ "Url": "http://*:5034"
}
}
},