From bf476d7d0691b17585ba2cccb7b58af01a9c08f1 Mon Sep 17 00:00:00 2001
From: wtp <1813748440@qq.com>
Date: Sat, 14 Jan 2023 18:34:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
GDZZ.Application/Entity/BaseUser.cs | 51 ++
GDZZ.Application/GDZZ.Application.csproj | 1 +
GDZZ.Application/GDZZ.Application.xml | 582 ++++++++++++++++++
.../Service/BaseUser/BaseUserService.cs | 97 +++
.../Service/BaseUser/Dto/BaseUserDto.cs | 67 ++
.../Service/BaseUser/Dto/BaseUserInput.cs | 111 ++++
.../Service/BaseUser/Dto/BaseUserOutput.cs | 61 ++
.../Service/BaseUser/IBaseUserService.cs | 16 +
.../Service/LiveChat/ILiveChatService.cs | 18 +
.../Service/LiveChat/LiveChatService.cs | 26 +
.../Service/WXPay/IWXPayService.cs | 15 +
.../Service/WXPay/WXPayService.cs | 47 ++
GDZZ.Core/Extension/BStyleServiceExtension.cs | 8 +-
GDZZ.Core/GDZZ.Core.xml | 25 +-
GDZZ.Core/Hubs/ChatHub.cs | 10 +-
GDZZ.Core/Hubs/IChatClient.cs | 2 +
GDZZ.Core/OAuth/WechatOAuth.cs | 6 +
GDZZ.Core/Service/OAuth/SysOauthService.cs | 2 +-
.../OnlineUser/ISysOnlineUserService.cs | 4 +
.../OnlineUser/SysOnlineUserService.cs | 29 +
GDZZ.Web.Core/Startup.cs | 4 +
21 files changed, 1173 insertions(+), 9 deletions(-)
create mode 100644 GDZZ.Application/Entity/BaseUser.cs
create mode 100644 GDZZ.Application/Service/BaseUser/BaseUserService.cs
create mode 100644 GDZZ.Application/Service/BaseUser/Dto/BaseUserDto.cs
create mode 100644 GDZZ.Application/Service/BaseUser/Dto/BaseUserInput.cs
create mode 100644 GDZZ.Application/Service/BaseUser/Dto/BaseUserOutput.cs
create mode 100644 GDZZ.Application/Service/BaseUser/IBaseUserService.cs
create mode 100644 GDZZ.Application/Service/LiveChat/ILiveChatService.cs
create mode 100644 GDZZ.Application/Service/LiveChat/LiveChatService.cs
create mode 100644 GDZZ.Application/Service/WXPay/IWXPayService.cs
create mode 100644 GDZZ.Application/Service/WXPay/WXPayService.cs
diff --git a/GDZZ.Application/Entity/BaseUser.cs b/GDZZ.Application/Entity/BaseUser.cs
new file mode 100644
index 0000000..8e6c8a5
--- /dev/null
+++ b/GDZZ.Application/Entity/BaseUser.cs
@@ -0,0 +1,51 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using GDZZ.Core.Entity;
+namespace GDZZ.Application.Entity
+{
+ ///
+ /// 基础用户
+ ///
+ [SugarTable("baseuser")]
+ [Description("基础用户")]
+ public class BaseUser : DEntityBase
+ {
+ ///
+ /// 租户Id
+ ///
+ public long TenantId { get; set; }
+ ///
+ /// 密码
+ ///
+ public string Password { get; set; }
+ ///
+ /// 用户类型
+ ///
+ public Int16 Type { get; set; }
+ ///
+ /// 用户名
+ ///
+ public string UserName { get; set; }
+ ///
+ /// 头像链接
+ ///
+ public string AvatarUrl { get; set; }
+ ///
+ /// 用户状态
+ ///
+ public Int16 Status { get; set; }
+ ///
+ /// 微信用户ID
+ ///
+ public string OpenID { get; set; }
+ ///
+ /// 微信唯一ID
+ ///
+ public string WxOfficialOpenId { get; set; }
+ ///
+ /// 开放平台ID
+ ///
+ public string UnionId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/GDZZ.Application.csproj b/GDZZ.Application/GDZZ.Application.csproj
index 3285226..19cfb2b 100644
--- a/GDZZ.Application/GDZZ.Application.csproj
+++ b/GDZZ.Application/GDZZ.Application.csproj
@@ -24,6 +24,7 @@
+
diff --git a/GDZZ.Application/GDZZ.Application.xml b/GDZZ.Application/GDZZ.Application.xml
index 009708e..32205fc 100644
--- a/GDZZ.Application/GDZZ.Application.xml
+++ b/GDZZ.Application/GDZZ.Application.xml
@@ -4,6 +4,56 @@
GDZZ.Application
+
+
+ 基础用户
+
+
+
+
+ 租户Id
+
+
+
+
+ 密码
+
+
+
+
+ 用户类型
+
+
+
+
+ 用户名
+
+
+
+
+ 头像链接
+
+
+
+
+ 用户状态
+
+
+
+
+ 微信用户ID
+
+
+
+
+ 微信唯一ID
+
+
+
+
+ 开放平台ID
+
+
招聘公司
@@ -174,6 +224,517 @@
地区名
+
+
+ 基础用户服务
+
+
+
+
+ 分页查询基础用户
+
+
+
+
+
+
+ 增加基础用户
+
+
+
+
+
+
+ 删除基础用户
+
+
+
+
+
+
+ 更新基础用户
+
+
+
+
+
+
+ 获取基础用户
+
+
+
+
+
+
+ 获取基础用户列表
+
+
+
+
+
+
+ 基础用户输出参数
+
+
+
+
+ 租户Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 密码
+
+
+
+
+ 用户类型
+
+
+
+
+ 用户名
+
+
+
+
+ 头像链接
+
+
+
+
+ 用户状态
+
+
+
+
+ 微信用户ID
+
+
+
+
+ 微信唯一ID
+
+
+
+
+ 开放平台ID
+
+
+
+
+ 基础用户输入参数
+
+
+
+
+ 租户Id
+
+
+
+
+ 密码
+
+
+
+
+ 用户类型
+
+
+
+
+ 用户名
+
+
+
+
+ 头像链接
+
+
+
+
+ 用户状态
+
+
+
+
+ 微信用户ID
+
+
+
+
+ 微信唯一ID
+
+
+
+
+ 开放平台ID
+
+
+
+
+ 租户Id
+
+
+
+
+ 用户类型
+
+
+
+
+ 用户名
+
+
+
+
+ 用户状态
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 基础用户输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 密码
+
+
+
+
+ 用户类型
+
+
+
+
+ 用户名
+
+
+
+
+ 头像链接
+
+
+
+
+ 用户状态
+
+
+
+
+ 微信用户ID
+
+
+
+
+ 微信唯一ID
+
+
+
+
+ 开放平台ID
+
+
+
+
+ 招聘公司服务
+
+
+
+
+ 分页查询招聘公司
+
+
+
+
+
+
+ 增加招聘公司
+
+
+
+
+
+
+ 删除招聘公司
+
+
+
+
+
+
+ 更新招聘公司
+
+
+
+
+
+
+ 获取招聘公司
+
+
+
+
+
+
+ 获取招聘公司列表
+
+
+
+
+
+
+ 招聘公司输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 地址
+
+
+
+
+ 联系电话
+
+
+
+
+ 公司详情
+
+
+
+
+ 招聘公司输入参数
+
+
+
+
+ 租户Id
+
+
+
+
+ 地址
+
+
+
+
+ 联系电话
+
+
+
+
+ 公司详情
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 招聘公司输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 地址
+
+
+
+
+ 联系电话
+
+
+
+
+ 公司详情
+
+
+
+
+ 求职者输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 联系电话
+
+
+
+
+ 性别
+
+
+
+
+ 求职者输入参数
+
+
+
+
+ 租户Id
+
+
+
+
+ 联系电话
+
+
+
+
+ 性别
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 求职者输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 联系电话
+
+
+
+
+ 性别
+
+
+
+
+ 求职者服务
+
+
+
+
+ 分页查询求职者
+
+
+
+
+
+
+ 增加求职者
+
+
+
+
+
+
+ 删除求职者
+
+
+
+
+
+
+ 更新求职者
+
+
+
+
+
+
+ 获取求职者
+
+
+
+
+
+
+ 获取求职者列表
+
+
+
+
求职信息输出参数
@@ -391,6 +952,27 @@
+
+
+ 即时聊天接口
+
+
+
+
+ 即时聊天
+
+
+
+
+ 创建聊天
+
+
+
+
+
+ 微信支付
+
+
招聘消息输出参数
diff --git a/GDZZ.Application/Service/BaseUser/BaseUserService.cs b/GDZZ.Application/Service/BaseUser/BaseUserService.cs
new file mode 100644
index 0000000..2c7e210
--- /dev/null
+++ b/GDZZ.Application/Service/BaseUser/BaseUserService.cs
@@ -0,0 +1,97 @@
+using GDZZ.Core;
+using Furion.DependencyInjection;
+using Furion.DynamicApiController;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using System.Linq;
+using System.Threading.Tasks;
+using GDZZ.Application.Entity;
+namespace GDZZ.Application
+{
+ ///
+ /// 基础用户服务
+ ///
+ [ApiDescriptionSettings("Application",Name = "BaseUser", Order = 1)]
+ public class BaseUserService : IBaseUserService, IDynamicApiController, ITransient
+ {
+ private readonly SqlSugarRepository _rep;
+
+ public BaseUserService(SqlSugarRepository rep)
+ {
+ _rep = rep;
+ }
+
+ ///
+ /// 分页查询基础用户
+ ///
+ ///
+ ///
+ [HttpGet("/BaseUser/page")]
+ public async Task Page([FromQuery] BaseUserInput input)
+ {
+ var entities = await _rep.AsQueryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.UserName), u => u.UserName.Contains(input.UserName.Trim()))
+ .ToPagedListAsync(input.PageNo, input.PageSize);
+ return entities.XnPagedResult();
+ }
+
+ ///
+ /// 增加基础用户
+ ///
+ ///
+ ///
+ [HttpPost("/BaseUser/add")]
+ public async Task Add(AddBaseUserInput input)
+ {
+ var entity = input.Adapt();
+ await _rep.InsertAsync(entity);
+ }
+
+ ///
+ /// 删除基础用户
+ ///
+ ///
+ ///
+ [HttpPost("/BaseUser/delete")]
+ public async Task Delete(DeleteBaseUserInput input)
+ {
+ var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ await _rep.DeleteAsync(entity);
+ }
+
+ ///
+ /// 更新基础用户
+ ///
+ ///
+ ///
+ [HttpPost("/BaseUser/edit")]
+ public async Task Update(UpdateBaseUserInput input)
+ {
+ var entity = input.Adapt();
+ await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync();
+ }
+
+ ///
+ /// 获取基础用户
+ ///
+ ///
+ ///
+ [HttpGet("/BaseUser/detail")]
+ public async Task Get([FromQuery] QueryeBaseUserInput input)
+ {
+ return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ }
+
+ ///
+ /// 获取基础用户列表
+ ///
+ ///
+ ///
+ [HttpGet("/BaseUser/list")]
+ public async Task List([FromQuery] BaseUserInput input)
+ {
+ return await _rep.ToListAsync();
+ }
+ }
+}
diff --git a/GDZZ.Application/Service/BaseUser/Dto/BaseUserDto.cs b/GDZZ.Application/Service/BaseUser/Dto/BaseUserDto.cs
new file mode 100644
index 0000000..ad6d404
--- /dev/null
+++ b/GDZZ.Application/Service/BaseUser/Dto/BaseUserDto.cs
@@ -0,0 +1,67 @@
+using System;
+using GDZZ.Core;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 基础用户输出参数
+ ///
+ public class BaseUserDto
+ {
+ ///
+ /// 租户Id
+ ///
+ public long SysTenantId { get; set; }
+
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 租户Id
+ ///
+ public long TenantId { get; set; }
+
+ ///
+ /// 密码
+ ///
+ public string Password { get; set; }
+
+ ///
+ /// 用户类型
+ ///
+ public Int16 Type { get; set; }
+
+ ///
+ /// 用户名
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 头像链接
+ ///
+ public string AvatarUrl { get; set; }
+
+ ///
+ /// 用户状态
+ ///
+ public Int16 Status { get; set; }
+
+ ///
+ /// 微信用户ID
+ ///
+ public string OpenID { get; set; }
+
+ ///
+ /// 微信唯一ID
+ ///
+ public string WxOfficialOpenId { get; set; }
+
+ ///
+ /// 开放平台ID
+ ///
+ public string UnionId { get; set; }
+
+ }
+}
diff --git a/GDZZ.Application/Service/BaseUser/Dto/BaseUserInput.cs b/GDZZ.Application/Service/BaseUser/Dto/BaseUserInput.cs
new file mode 100644
index 0000000..a149850
--- /dev/null
+++ b/GDZZ.Application/Service/BaseUser/Dto/BaseUserInput.cs
@@ -0,0 +1,111 @@
+using GDZZ.Core;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 基础用户输入参数
+ ///
+ public class BaseUserInput : PageInputBase
+ {
+ ///
+ /// 租户Id
+ ///
+ public virtual long TenantId { get; set; }
+
+ ///
+ /// 密码
+ ///
+ public virtual string Password { get; set; }
+
+ ///
+ /// 用户类型
+ ///
+ public virtual Int16 Type { get; set; }
+
+ ///
+ /// 用户名
+ ///
+ public virtual string UserName { get; set; }
+
+ ///
+ /// 头像链接
+ ///
+ public virtual string AvatarUrl { get; set; }
+
+ ///
+ /// 用户状态
+ ///
+ public virtual Int16 Status { get; set; }
+
+ ///
+ /// 微信用户ID
+ ///
+ public virtual string OpenID { get; set; }
+
+ ///
+ /// 微信唯一ID
+ ///
+ public virtual string WxOfficialOpenId { get; set; }
+
+ ///
+ /// 开放平台ID
+ ///
+ public virtual string UnionId { get; set; }
+
+ }
+
+ public class AddBaseUserInput : BaseUserInput
+ {
+ ///
+ /// 租户Id
+ ///
+ [Required(ErrorMessage = "租户Id不能为空")]
+ public override long TenantId { get; set; }
+
+ ///
+ /// 用户类型
+ ///
+ [Required(ErrorMessage = "用户类型不能为空")]
+ public override Int16 Type { get; set; }
+
+ ///
+ /// 用户名
+ ///
+ [Required(ErrorMessage = "用户名不能为空")]
+ public override string UserName { get; set; }
+
+ ///
+ /// 用户状态
+ ///
+ [Required(ErrorMessage = "用户状态不能为空")]
+ public override Int16 Status { get; set; }
+
+ }
+
+ public class DeleteBaseUserInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class UpdateBaseUserInput : BaseUserInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class QueryeBaseUserInput : DeleteBaseUserInput
+ {
+
+ }
+}
diff --git a/GDZZ.Application/Service/BaseUser/Dto/BaseUserOutput.cs b/GDZZ.Application/Service/BaseUser/Dto/BaseUserOutput.cs
new file mode 100644
index 0000000..5ad6574
--- /dev/null
+++ b/GDZZ.Application/Service/BaseUser/Dto/BaseUserOutput.cs
@@ -0,0 +1,61 @@
+using System;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 基础用户输出参数
+ ///
+ public class BaseUserOutput
+ {
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 租户Id
+ ///
+ public long TenantId { get; set; }
+
+ ///
+ /// 密码
+ ///
+ public string Password { get; set; }
+
+ ///
+ /// 用户类型
+ ///
+ public Int16 Type { get; set; }
+
+ ///
+ /// 用户名
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 头像链接
+ ///
+ public string AvatarUrl { get; set; }
+
+ ///
+ /// 用户状态
+ ///
+ public Int16 Status { get; set; }
+
+ ///
+ /// 微信用户ID
+ ///
+ public string OpenID { get; set; }
+
+ ///
+ /// 微信唯一ID
+ ///
+ public string WxOfficialOpenId { get; set; }
+
+ ///
+ /// 开放平台ID
+ ///
+ public string UnionId { get; set; }
+
+ }
+}
diff --git a/GDZZ.Application/Service/BaseUser/IBaseUserService.cs b/GDZZ.Application/Service/BaseUser/IBaseUserService.cs
new file mode 100644
index 0000000..5c58551
--- /dev/null
+++ b/GDZZ.Application/Service/BaseUser/IBaseUserService.cs
@@ -0,0 +1,16 @@
+using GDZZ.Core;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+using GDZZ.Application.Entity;
+namespace GDZZ.Application
+{
+ public interface IBaseUserService
+ {
+ Task Add(AddBaseUserInput input);
+ Task Delete(DeleteBaseUserInput input);
+ Task Get([FromQuery] QueryeBaseUserInput input);
+ Task List([FromQuery] BaseUserInput input);
+ Task Page([FromQuery] BaseUserInput input);
+ Task Update(UpdateBaseUserInput input);
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/Service/LiveChat/ILiveChatService.cs b/GDZZ.Application/Service/LiveChat/ILiveChatService.cs
new file mode 100644
index 0000000..5d64cb6
--- /dev/null
+++ b/GDZZ.Application/Service/LiveChat/ILiveChatService.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application.Service.LiveChat
+{
+ ///
+ /// 即时聊天接口
+ ///
+ public interface ILiveChatService
+ {
+ Task CreateLinkCaht();
+
+
+ }
+}
diff --git a/GDZZ.Application/Service/LiveChat/LiveChatService.cs b/GDZZ.Application/Service/LiveChat/LiveChatService.cs
new file mode 100644
index 0000000..b1989b4
--- /dev/null
+++ b/GDZZ.Application/Service/LiveChat/LiveChatService.cs
@@ -0,0 +1,26 @@
+using Microsoft.AspNetCore.SignalR;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application.Service.LiveChat
+{
+ ///
+ /// 即时聊天
+ ///
+ public class LiveChatService: Hub
+ {
+ public LiveChatService()
+ {
+
+ }
+
+ ///
+ /// 创建聊天
+ ///
+ ///
+ Task CreateLinkCaht()
+ {
+ return Task.FromResult(true);
+ }
+
+ }
+}
diff --git a/GDZZ.Application/Service/WXPay/IWXPayService.cs b/GDZZ.Application/Service/WXPay/IWXPayService.cs
new file mode 100644
index 0000000..842fc21
--- /dev/null
+++ b/GDZZ.Application/Service/WXPay/IWXPayService.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application.Service.WXPay
+{
+ ///
+ /// 微信支付
+ ///
+ public interface IWXPayService
+ {
+ }
+}
diff --git a/GDZZ.Application/Service/WXPay/WXPayService.cs b/GDZZ.Application/Service/WXPay/WXPayService.cs
new file mode 100644
index 0000000..7fdae42
--- /dev/null
+++ b/GDZZ.Application/Service/WXPay/WXPayService.cs
@@ -0,0 +1,47 @@
+using GDZZ.Core.Service;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application.Service.WXPay
+{
+ public class WXPayService
+ {
+ private readonly IAuthService _authService;
+
+ //public WXPayService(IAuthService authService)
+ //{
+ // _authService = authService;
+ //}
+
+ /////
+ ///// 微信小程序支付
+ /////
+ ///// 商品Id
+ /////
+ //[HttpGet]
+ //[AllowAnonymous]
+ //[Route("api/v1/wxpay/{productId}")]
+ //public Task WxPay(long productId)
+ //{
+ // return _authService.WxPay(productId);
+ //}
+
+ /////
+ ///// 微信小程序支付回调
+ /////
+ /////
+ //[HttpPost]
+ //[AllowAnonymous]
+ //[Route("api/v1/wxpay/notify")]
+
+ //public Task NotifyUrl()
+ //{
+ // return _authService.NotifyUrl();
+ //}
+ }
+}
diff --git a/GDZZ.Core/Extension/BStyleServiceExtension.cs b/GDZZ.Core/Extension/BStyleServiceExtension.cs
index 83b70e7..7839164 100644
--- a/GDZZ.Core/Extension/BStyleServiceExtension.cs
+++ b/GDZZ.Core/Extension/BStyleServiceExtension.cs
@@ -28,13 +28,9 @@ public class BStyleServiceBuilder
__/ |
|___/ ");
Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine(@"
-
-gitee: https://gitee.com/zhengguojing/GDZZ-net");
+ Console.WriteLine(@"gitee: http://www.gdzongzhi.com/");
Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine(@"期待您的PR,让.net更好!
-
-");
+ Console.WriteLine(@"期待您的PR,让.net更好!");
}
public void UseOther()
diff --git a/GDZZ.Core/GDZZ.Core.xml b/GDZZ.Core/GDZZ.Core.xml
index 9e0afbf..936b75b 100644
--- a/GDZZ.Core/GDZZ.Core.xml
+++ b/GDZZ.Core/GDZZ.Core.xml
@@ -7022,7 +7022,7 @@
- 微信登录授权
+ 微信登录授权获取微信access_token
@@ -7053,6 +7053,29 @@
+
+
+ 强制下线
+
+
+
+
+
+
+ 推送通知
+
+
+
+
+
+
+
+ 发送消息
+
+
+
+
+
组织机构参数
diff --git a/GDZZ.Core/Hubs/ChatHub.cs b/GDZZ.Core/Hubs/ChatHub.cs
index 3a36cba..e04e555 100644
--- a/GDZZ.Core/Hubs/ChatHub.cs
+++ b/GDZZ.Core/Hubs/ChatHub.cs
@@ -39,7 +39,7 @@ public class ChatHub : Hub
if (_sysOnlineUerRep.Any(m => m.Account == account && m.LastLoginIp == ip)) {
await _sysOnlineUerRep.DeleteAsync(m => m.Account == account && m.LastLoginIp == ip);
}
-
+
OnlineUser user = new OnlineUser() {
ConnectionId = Context.ConnectionId,
UserId = long.Parse(userId),
@@ -65,4 +65,12 @@ public class ChatHub : Hub
}
}
+
+ public async Task SendMessage(string user, string message)
+ {
+ //await Clients.All.SendAsync("ReceiveMessage", user, message);
+ }
+
+
+
}
diff --git a/GDZZ.Core/Hubs/IChatClient.cs b/GDZZ.Core/Hubs/IChatClient.cs
index 37f1a09..d230f5f 100644
--- a/GDZZ.Core/Hubs/IChatClient.cs
+++ b/GDZZ.Core/Hubs/IChatClient.cs
@@ -8,4 +8,6 @@ public interface IChatClient
Task ForceExist(string str);
Task AppendNotice(SysNotice notice);
+
+ Task SendMessage(string handle, string user, string message);
}
diff --git a/GDZZ.Core/OAuth/WechatOAuth.cs b/GDZZ.Core/OAuth/WechatOAuth.cs
index 3985ce0..6965c1f 100644
--- a/GDZZ.Core/OAuth/WechatOAuth.cs
+++ b/GDZZ.Core/OAuth/WechatOAuth.cs
@@ -2,7 +2,11 @@
using Furion.FriendlyException;
using Furion.RemoteRequest.Extensions;
using Microsoft.Extensions.Options;
+using Newtonsoft.Json;
+using SqlSugar;
+using System;
using System.Collections.Generic;
+using System.Net.Http;
using System.Threading.Tasks;
namespace GDZZ.Core;
@@ -28,6 +32,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
///
public string GetAuthorizeUrl(string state = "")
{
+
var param = new Dictionary()
{
["appid"] = _oauthConfig.app_id,
@@ -36,6 +41,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
["scope"] = _oauthConfig.scope,
["state"] = state
};
+
return $"{_authorizeUrl}?{param.ToQueryString()}#wechat_redirect";
}
diff --git a/GDZZ.Core/Service/OAuth/SysOauthService.cs b/GDZZ.Core/Service/OAuth/SysOauthService.cs
index 18769ac..f6870a5 100644
--- a/GDZZ.Core/Service/OAuth/SysOauthService.cs
+++ b/GDZZ.Core/Service/OAuth/SysOauthService.cs
@@ -25,7 +25,7 @@ public class SysOauthService : ISysOauthService, IDynamicApiController, ITransie
}
///
- /// 微信登录授权
+ /// 微信登录授权获取微信access_token
///
[HttpGet("oauth/wechat")]
public Task WechatLogin()
diff --git a/GDZZ.Core/Service/OnlineUser/ISysOnlineUserService.cs b/GDZZ.Core/Service/OnlineUser/ISysOnlineUserService.cs
index 650c34e..b3ff9d3 100644
--- a/GDZZ.Core/Service/OnlineUser/ISysOnlineUserService.cs
+++ b/GDZZ.Core/Service/OnlineUser/ISysOnlineUserService.cs
@@ -11,4 +11,8 @@ public interface ISysOnlineUserService
Task ForceExist(OnlineUser user);
Task PushNotice(SysNotice notice, List userIds);
+
+
+
+
}
diff --git a/GDZZ.Core/Service/OnlineUser/SysOnlineUserService.cs b/GDZZ.Core/Service/OnlineUser/SysOnlineUserService.cs
index a5205ed..f244e66 100644
--- a/GDZZ.Core/Service/OnlineUser/SysOnlineUserService.cs
+++ b/GDZZ.Core/Service/OnlineUser/SysOnlineUserService.cs
@@ -43,6 +43,12 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
return list.XnPagedResult();
}
+
+ ///
+ /// 强制下线
+ ///
+ ///
+ ///
[HttpPost("/sysOnlineUser/forceExist")]
[NonValidation]
public async Task ForceExist(OnlineUser user) {
@@ -50,6 +56,12 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
await _sysOnlineUerRep.DeleteAsync(user);
}
+ ///
+ /// 推送通知
+ ///
+ ///
+ ///
+ ///
[NonAction]
public async Task PushNotice(SysNotice notice,List userIds)
{
@@ -62,4 +74,21 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
}
}
+
+ ///
+ /// 发送消息
+ ///
+ ///
+ ///
+ ///
+ public async Task SendMessage(string user, string message)
+ {
+ //await _chatHubContext.Clients.All.SendAsync("ReceiveMessage", user, message);
+ }
+
+
+
+
+
+
}
diff --git a/GDZZ.Web.Core/Startup.cs b/GDZZ.Web.Core/Startup.cs
index 9fca1c7..4915355 100644
--- a/GDZZ.Web.Core/Startup.cs
+++ b/GDZZ.Web.Core/Startup.cs
@@ -63,6 +63,10 @@ public class Startup : AppStartup
services.AddCorsAccessor();
+
+
+
+
// 配置远程请求
services.AddRemoteRequest(option =>
{