提交版本

development
温天培 2 years ago
parent cae21ff033
commit bf476d7d06

@ -0,0 +1,51 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 基础用户
/// </summary>
[SugarTable("baseuser")]
[Description("基础用户")]
public class BaseUser : DEntityBase
{
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 用户类型
/// </summary>
public Int16 Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 头像链接
/// </summary>
public string AvatarUrl { get; set; }
/// <summary>
/// 用户状态
/// </summary>
public Int16 Status { get; set; }
/// <summary>
/// 微信用户ID
/// </summary>
public string OpenID { get; set; }
/// <summary>
/// 微信唯一ID
/// </summary>
public string WxOfficialOpenId { get; set; }
/// <summary>
/// 开放平台ID
/// </summary>
public string UnionId { get; set; }
}
}

@ -24,6 +24,7 @@
<ItemGroup> <ItemGroup>
<Folder Include="Entity\" /> <Folder Include="Entity\" />
<Folder Include="Service\Auth\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -4,6 +4,56 @@
<name>GDZZ.Application</name> <name>GDZZ.Application</name>
</assembly> </assembly>
<members> <members>
<member name="T:GDZZ.Application.Entity.BaseUser">
<summary>
基础用户
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Password">
<summary>
密码
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Type">
<summary>
用户类型
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.AvatarUrl">
<summary>
头像链接
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Status">
<summary>
用户状态
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.OpenID">
<summary>
微信用户ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.WxOfficialOpenId">
<summary>
微信唯一ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.UnionId">
<summary>
开放平台ID
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Company"> <member name="T:GDZZ.Application.Entity.Company">
<summary> <summary>
招聘公司 招聘公司
@ -174,6 +224,517 @@
地区名 地区名
</summary> </summary>
</member> </member>
<member name="T:GDZZ.Application.BaseUserService">
<summary>
基础用户服务
</summary>
</member>
<member name="M:GDZZ.Application.BaseUserService.Page(GDZZ.Application.BaseUserInput)">
<summary>
分页查询基础用户
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.Add(GDZZ.Application.AddBaseUserInput)">
<summary>
增加基础用户
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.Delete(GDZZ.Application.DeleteBaseUserInput)">
<summary>
删除基础用户
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.Update(GDZZ.Application.UpdateBaseUserInput)">
<summary>
更新基础用户
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.Get(GDZZ.Application.QueryeBaseUserInput)">
<summary>
获取基础用户
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.List(GDZZ.Application.BaseUserInput)">
<summary>
获取基础用户列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.BaseUserDto">
<summary>
基础用户输出参数
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.SysTenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.Password">
<summary>
密码
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.Type">
<summary>
用户类型
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.AvatarUrl">
<summary>
头像链接
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.Status">
<summary>
用户状态
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.OpenID">
<summary>
微信用户ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.WxOfficialOpenId">
<summary>
微信唯一ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserDto.UnionId">
<summary>
开放平台ID
</summary>
</member>
<member name="T:GDZZ.Application.BaseUserInput">
<summary>
基础用户输入参数
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.Password">
<summary>
密码
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.Type">
<summary>
用户类型
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.AvatarUrl">
<summary>
头像链接
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.Status">
<summary>
用户状态
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.OpenID">
<summary>
微信用户ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.WxOfficialOpenId">
<summary>
微信唯一ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserInput.UnionId">
<summary>
开放平台ID
</summary>
</member>
<member name="P:GDZZ.Application.AddBaseUserInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.AddBaseUserInput.Type">
<summary>
用户类型
</summary>
</member>
<member name="P:GDZZ.Application.AddBaseUserInput.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:GDZZ.Application.AddBaseUserInput.Status">
<summary>
用户状态
</summary>
</member>
<member name="P:GDZZ.Application.DeleteBaseUserInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateBaseUserInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.BaseUserOutput">
<summary>
基础用户输出参数
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.Password">
<summary>
密码
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.Type">
<summary>
用户类型
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.UserName">
<summary>
用户名
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.AvatarUrl">
<summary>
头像链接
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.Status">
<summary>
用户状态
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.OpenID">
<summary>
微信用户ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.WxOfficialOpenId">
<summary>
微信唯一ID
</summary>
</member>
<member name="P:GDZZ.Application.BaseUserOutput.UnionId">
<summary>
开放平台ID
</summary>
</member>
<member name="T:GDZZ.Application.CompanyService">
<summary>
招聘公司服务
</summary>
</member>
<member name="M:GDZZ.Application.CompanyService.Page(GDZZ.Application.CompanyInput)">
<summary>
分页查询招聘公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.Add(GDZZ.Application.AddCompanyInput)">
<summary>
增加招聘公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.Delete(GDZZ.Application.DeleteCompanyInput)">
<summary>
删除招聘公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.Update(GDZZ.Application.UpdateCompanyInput)">
<summary>
更新招聘公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.Get(GDZZ.Application.QueryeCompanyInput)">
<summary>
获取招聘公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.List(GDZZ.Application.CompanyInput)">
<summary>
获取招聘公司列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.CompanyDto">
<summary>
招聘公司输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Address">
<summary>
地址
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Profile">
<summary>
公司详情
</summary>
</member>
<member name="T:GDZZ.Application.CompanyInput">
<summary>
招聘公司输入参数
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Address">
<summary>
地址
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Profile">
<summary>
公司详情
</summary>
</member>
<member name="P:GDZZ.Application.DeleteCompanyInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateCompanyInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.CompanyOutput">
<summary>
招聘公司输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Address">
<summary>
地址
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Profile">
<summary>
公司详情
</summary>
</member>
<member name="T:GDZZ.Application.JobHunterDto">
<summary>
求职者输出参数
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterDto.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterDto.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterDto.Gender">
<summary>
性别
</summary>
</member>
<member name="T:GDZZ.Application.JobHunterInput">
<summary>
求职者输入参数
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterInput.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterInput.Gender">
<summary>
性别
</summary>
</member>
<member name="P:GDZZ.Application.DeleteJobHunterInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateJobHunterInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.JobHunterOutput">
<summary>
求职者输出参数
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterOutput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterOutput.Phone">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.JobHunterOutput.Gender">
<summary>
性别
</summary>
</member>
<member name="T:GDZZ.Application.JobHunterService">
<summary>
求职者服务
</summary>
</member>
<member name="M:GDZZ.Application.JobHunterService.Page(GDZZ.Application.JobHunterInput)">
<summary>
分页查询求职者
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.JobHunterService.Add(GDZZ.Application.AddJobHunterInput)">
<summary>
增加求职者
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.JobHunterService.Delete(GDZZ.Application.DeleteJobHunterInput)">
<summary>
删除求职者
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.JobHunterService.Update(GDZZ.Application.UpdateJobHunterInput)">
<summary>
更新求职者
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.JobHunterService.Get(GDZZ.Application.QueryeJobHunterInput)">
<summary>
获取求职者
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.JobHunterService.List(GDZZ.Application.JobHunterInput)">
<summary>
获取求职者列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.JobhuntMessageDto"> <member name="T:GDZZ.Application.JobhuntMessageDto">
<summary> <summary>
求职信息输出参数 求职信息输出参数
@ -391,6 +952,27 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:GDZZ.Application.Service.LiveChat.ILiveChatService">
<summary>
即时聊天接口
</summary>
</member>
<member name="T:GDZZ.Application.Service.LiveChat.LiveChatService">
<summary>
即时聊天
</summary>
</member>
<member name="M:GDZZ.Application.Service.LiveChat.LiveChatService.CreateLinkCaht">
<summary>
创建聊天
</summary>
<returns></returns>
</member>
<member name="T:GDZZ.Application.Service.WXPay.IWXPayService">
<summary>
微信支付
</summary>
</member>
<member name="T:GDZZ.Application.RecruitMessageDto"> <member name="T:GDZZ.Application.RecruitMessageDto">
<summary> <summary>
招聘消息输出参数 招聘消息输出参数

@ -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
{
/// <summary>
/// 基础用户服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "BaseUser", Order = 1)]
public class BaseUserService : IBaseUserService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<BaseUser> _rep;
public BaseUserService(SqlSugarRepository<BaseUser> rep)
{
_rep = rep;
}
/// <summary>
/// 分页查询基础用户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/BaseUser/page")]
public async Task<dynamic> 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();
}
/// <summary>
/// 增加基础用户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BaseUser/add")]
public async Task Add(AddBaseUserInput input)
{
var entity = input.Adapt<BaseUser>();
await _rep.InsertAsync(entity);
}
/// <summary>
/// 删除基础用户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BaseUser/delete")]
public async Task Delete(DeleteBaseUserInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
await _rep.DeleteAsync(entity);
}
/// <summary>
/// 更新基础用户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BaseUser/edit")]
public async Task Update(UpdateBaseUserInput input)
{
var entity = input.Adapt<BaseUser>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync();
}
/// <summary>
/// 获取基础用户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/BaseUser/detail")]
public async Task<BaseUser> Get([FromQuery] QueryeBaseUserInput input)
{
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
}
/// <summary>
/// 获取基础用户列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/BaseUser/list")]
public async Task<dynamic> List([FromQuery] BaseUserInput input)
{
return await _rep.ToListAsync();
}
}
}

@ -0,0 +1,67 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 基础用户输出参数
/// </summary>
public class BaseUserDto
{
/// <summary>
/// 租户Id
/// </summary>
public long SysTenantId { get; set; }
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 用户类型
/// </summary>
public Int16 Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 头像链接
/// </summary>
public string AvatarUrl { get; set; }
/// <summary>
/// 用户状态
/// </summary>
public Int16 Status { get; set; }
/// <summary>
/// 微信用户ID
/// </summary>
public string OpenID { get; set; }
/// <summary>
/// 微信唯一ID
/// </summary>
public string WxOfficialOpenId { get; set; }
/// <summary>
/// 开放平台ID
/// </summary>
public string UnionId { get; set; }
}
}

@ -0,0 +1,111 @@
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 基础用户输入参数
/// </summary>
public class BaseUserInput : PageInputBase
{
/// <summary>
/// 租户Id
/// </summary>
public virtual long TenantId { get; set; }
/// <summary>
/// 密码
/// </summary>
public virtual string Password { get; set; }
/// <summary>
/// 用户类型
/// </summary>
public virtual Int16 Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
public virtual string UserName { get; set; }
/// <summary>
/// 头像链接
/// </summary>
public virtual string AvatarUrl { get; set; }
/// <summary>
/// 用户状态
/// </summary>
public virtual Int16 Status { get; set; }
/// <summary>
/// 微信用户ID
/// </summary>
public virtual string OpenID { get; set; }
/// <summary>
/// 微信唯一ID
/// </summary>
public virtual string WxOfficialOpenId { get; set; }
/// <summary>
/// 开放平台ID
/// </summary>
public virtual string UnionId { get; set; }
}
public class AddBaseUserInput : BaseUserInput
{
/// <summary>
/// 租户Id
/// </summary>
[Required(ErrorMessage = "租户Id不能为空")]
public override long TenantId { get; set; }
/// <summary>
/// 用户类型
/// </summary>
[Required(ErrorMessage = "用户类型不能为空")]
public override Int16 Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
[Required(ErrorMessage = "用户名不能为空")]
public override string UserName { get; set; }
/// <summary>
/// 用户状态
/// </summary>
[Required(ErrorMessage = "用户状态不能为空")]
public override Int16 Status { get; set; }
}
public class DeleteBaseUserInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class UpdateBaseUserInput : BaseUserInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class QueryeBaseUserInput : DeleteBaseUserInput
{
}
}

@ -0,0 +1,61 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 基础用户输出参数
/// </summary>
public class BaseUserOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 用户类型
/// </summary>
public Int16 Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 头像链接
/// </summary>
public string AvatarUrl { get; set; }
/// <summary>
/// 用户状态
/// </summary>
public Int16 Status { get; set; }
/// <summary>
/// 微信用户ID
/// </summary>
public string OpenID { get; set; }
/// <summary>
/// 微信唯一ID
/// </summary>
public string WxOfficialOpenId { get; set; }
/// <summary>
/// 开放平台ID
/// </summary>
public string UnionId { get; set; }
}
}

@ -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<BaseUser> Get([FromQuery] QueryeBaseUserInput input);
Task<dynamic> List([FromQuery] BaseUserInput input);
Task<dynamic> Page([FromQuery] BaseUserInput input);
Task Update(UpdateBaseUserInput input);
}
}

@ -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
{
/// <summary>
/// 即时聊天接口
/// </summary>
public interface ILiveChatService
{
Task<bool> CreateLinkCaht();
}
}

@ -0,0 +1,26 @@
using Microsoft.AspNetCore.SignalR;
using System.Threading.Tasks;
namespace GDZZ.Application.Service.LiveChat
{
/// <summary>
/// 即时聊天
/// </summary>
public class LiveChatService: Hub<ILiveChatService>
{
public LiveChatService()
{
}
/// <summary>
/// 创建聊天
/// </summary>
/// <returns></returns>
Task<bool> CreateLinkCaht()
{
return Task.FromResult(true);
}
}
}

@ -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
{
/// <summary>
/// 微信支付
/// </summary>
public interface IWXPayService
{
}
}

@ -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;
//}
///// <summary>
///// 微信小程序支付
///// </summary>
///// <param name="productId">商品Id</param>
///// <returns></returns>
//[HttpGet]
//[AllowAnonymous]
//[Route("api/v1/wxpay/{productId}")]
//public Task<IResponseOutput> WxPay(long productId)
//{
// return _authService.WxPay(productId);
//}
///// <summary>
///// 微信小程序支付回调
///// </summary>
///// <returns></returns>
//[HttpPost]
//[AllowAnonymous]
//[Route("api/v1/wxpay/notify")]
//public Task<string> NotifyUrl()
//{
// return _authService.NotifyUrl();
//}
}
}

@ -28,13 +28,9 @@ public class BStyleServiceBuilder
__/ | __/ |
|___/ "); |___/ ");
Console.ForegroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(@" Console.WriteLine(@"gitee: http://www.gdzongzhi.com/");
gitee: https://gitee.com/zhengguojing/GDZZ-net");
Console.ForegroundColor = ConsoleColor.Yellow; Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine(@"期待您的PR让.net更好 Console.WriteLine(@"期待您的PR让.net更好");
");
} }
public void UseOther() public void UseOther()

@ -7022,7 +7022,7 @@
</member> </member>
<member name="M:GDZZ.Core.Service.SysOauthService.WechatLogin"> <member name="M:GDZZ.Core.Service.SysOauthService.WechatLogin">
<summary> <summary>
微信登录授权 微信登录授权获取微信access_token
</summary> </summary>
</member> </member>
<member name="M:GDZZ.Core.Service.SysOauthService.WechatLoginCallback(System.String,System.String,System.String)"> <member name="M:GDZZ.Core.Service.SysOauthService.WechatLoginCallback(System.String,System.String,System.String)">
@ -7053,6 +7053,29 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:GDZZ.Core.Service.SysOnlineUserService.ForceExist(GDZZ.Core.Entity.OnlineUser)">
<summary>
强制下线
</summary>
<param name="user"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Core.Service.SysOnlineUserService.PushNotice(GDZZ.Core.Entity.SysNotice,System.Collections.Generic.List{System.Int64})">
<summary>
推送通知
</summary>
<param name="notice"></param>
<param name="userIds"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Core.Service.SysOnlineUserService.SendMessage(System.String,System.String)">
<summary>
发送消息
</summary>
<param name="user"></param>
<param name="message"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Core.Service.OrgInput"> <member name="T:GDZZ.Core.Service.OrgInput">
<summary> <summary>
组织机构参数 组织机构参数

@ -39,7 +39,7 @@ public class ChatHub : Hub<IChatClient>
if (_sysOnlineUerRep.Any(m => m.Account == account && m.LastLoginIp == ip)) { if (_sysOnlineUerRep.Any(m => m.Account == account && m.LastLoginIp == ip)) {
await _sysOnlineUerRep.DeleteAsync(m => m.Account == account && m.LastLoginIp == ip); await _sysOnlineUerRep.DeleteAsync(m => m.Account == account && m.LastLoginIp == ip);
} }
OnlineUser user = new OnlineUser() { OnlineUser user = new OnlineUser() {
ConnectionId = Context.ConnectionId, ConnectionId = Context.ConnectionId,
UserId = long.Parse(userId), UserId = long.Parse(userId),
@ -65,4 +65,12 @@ public class ChatHub : Hub<IChatClient>
} }
} }
public async Task SendMessage(string user, string message)
{
//await Clients.All.SendAsync("ReceiveMessage", user, message);
}
} }

@ -8,4 +8,6 @@ public interface IChatClient
Task ForceExist(string str); Task ForceExist(string str);
Task AppendNotice(SysNotice notice); Task AppendNotice(SysNotice notice);
Task SendMessage(string handle, string user, string message);
} }

@ -2,7 +2,11 @@
using Furion.FriendlyException; using Furion.FriendlyException;
using Furion.RemoteRequest.Extensions; using Furion.RemoteRequest.Extensions;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace GDZZ.Core; namespace GDZZ.Core;
@ -28,6 +32,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
/// <returns></returns> /// <returns></returns>
public string GetAuthorizeUrl(string state = "") public string GetAuthorizeUrl(string state = "")
{ {
var param = new Dictionary<string, string>() var param = new Dictionary<string, string>()
{ {
["appid"] = _oauthConfig.app_id, ["appid"] = _oauthConfig.app_id,
@ -36,6 +41,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
["scope"] = _oauthConfig.scope, ["scope"] = _oauthConfig.scope,
["state"] = state ["state"] = state
}; };
return $"{_authorizeUrl}?{param.ToQueryString()}#wechat_redirect"; return $"{_authorizeUrl}?{param.ToQueryString()}#wechat_redirect";
} }

@ -25,7 +25,7 @@ public class SysOauthService : ISysOauthService, IDynamicApiController, ITransie
} }
/// <summary> /// <summary>
/// 微信登录授权 /// 微信登录授权获取微信access_token
/// </summary> /// </summary>
[HttpGet("oauth/wechat")] [HttpGet("oauth/wechat")]
public Task WechatLogin() public Task WechatLogin()

@ -11,4 +11,8 @@ public interface ISysOnlineUserService
Task ForceExist(OnlineUser user); Task ForceExist(OnlineUser user);
Task PushNotice(SysNotice notice, List<long> userIds); Task PushNotice(SysNotice notice, List<long> userIds);
} }

@ -43,6 +43,12 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
return list.XnPagedResult(); return list.XnPagedResult();
} }
/// <summary>
/// 强制下线
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
[HttpPost("/sysOnlineUser/forceExist")] [HttpPost("/sysOnlineUser/forceExist")]
[NonValidation] [NonValidation]
public async Task ForceExist(OnlineUser user) { public async Task ForceExist(OnlineUser user) {
@ -50,6 +56,12 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
await _sysOnlineUerRep.DeleteAsync(user); await _sysOnlineUerRep.DeleteAsync(user);
} }
/// <summary>
/// 推送通知
/// </summary>
/// <param name="notice"></param>
/// <param name="userIds"></param>
/// <returns></returns>
[NonAction] [NonAction]
public async Task PushNotice(SysNotice notice,List<long> userIds) public async Task PushNotice(SysNotice notice,List<long> userIds)
{ {
@ -62,4 +74,21 @@ public class SysOnlineUserService : ISysOnlineUserService, IDynamicApiController
} }
} }
/// <summary>
/// 发送消息
/// </summary>
/// <param name="user"></param>
/// <param name="message"></param>
/// <returns></returns>
public async Task SendMessage(string user, string message)
{
//await _chatHubContext.Clients.All.SendAsync("ReceiveMessage", user, message);
}
} }

@ -63,6 +63,10 @@ public class Startup : AppStartup
services.AddCorsAccessor(); services.AddCorsAccessor();
// 配置远程请求 // 配置远程请求
services.AddRemoteRequest(option => services.AddRemoteRequest(option =>
{ {

Loading…
Cancel
Save