新增招聘,用户职业,公司 意见反馈。权限控制

development
温天培 2 years ago
parent 611d43a946
commit c788fd4eb2

@ -2,13 +2,15 @@
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
using GDZZ.Core;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 基础用户
/// 微信端基础用户
/// </summary>
[SugarTable("baseuser")]
[Description("基础用户")]
[Description("微信端基础用户")]
public class BaseUser : DEntityBase
{
/// <summary>
@ -16,13 +18,9 @@ namespace GDZZ.Application.Entity
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 用户类型
/// </summary>
public Int16 Type { get; set; }
public UserEnum Type { get; set; }
/// <summary>
/// 用户名
/// </summary>
@ -32,9 +30,9 @@ namespace GDZZ.Application.Entity
/// </summary>
public string AvatarUrl { get; set; }
/// <summary>
/// 用户状态
/// 公共状态
/// </summary>
public Int16 Status { get; set; }
public CommonStatus Status { get; set; }
/// <summary>
/// 微信用户ID
/// </summary>
@ -44,7 +42,7 @@ namespace GDZZ.Application.Entity
/// </summary>
public string WxOfficialOpenId { get; set; }
/// <summary>
/// 开放平台ID
/// 开发平台ID
/// </summary>
public string UnionId { get; set; }
}

@ -5,27 +5,23 @@ using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 招聘公司
/// 公司属性
/// </summary>
[SugarTable("company")]
[Description("招聘公司")]
[SugarTable("mini_company")]
[Description("公司属性")]
public class Company : DEntityBase
{
/// <summary>
/// 租户Id
/// 公司Logo
/// </summary>
public long TenantId { get; set; }
public string logo { get; set; }
/// <summary>
/// 地址
/// 公司简介
/// </summary>
public string Address { get; set; }
public string Info { get; set; }
/// <summary>
/// 联系电话
/// 公司名称
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 公司详情
/// </summary>
public string Profile { get; set; }
public string Name { get; set; }
}
}

@ -0,0 +1,23 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 意见反馈
/// </summary>
[SugarTable("mini_feedback")]
[Description("意见反馈")]
public class FeedBack : DEntityBase
{
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 反馈意见
/// </summary>
public string messsage { get; set; }
}
}

@ -0,0 +1,51 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 小程序招聘列表
/// </summary>
[SugarTable("mini_resume")]
[Description("小程序招聘列表")]
public class MiniResume : DEntityBase
{
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 要求
/// </summary>
public string Sak { get; set; }
/// <summary>
/// 待遇
/// </summary>
public int Salary { get; set; }
/// <summary>
/// 详情
/// </summary>
public string Info { get; set; }
/// <summary>
/// 地区名
/// </summary>
public string RegionName { get; set; }
/// <summary>
/// 所属公司
/// </summary>
public long CompanyID { get; set; }
/// <summary>
/// 地区ID
/// </summary>
public long RegionID { get; set; }
/// <summary>
/// 经验
/// </summary>
public string Level { get; set; }
/// <summary>
/// 学历
/// </summary>
public string Record { get; set; }
}
}

@ -0,0 +1,19 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 职业表
/// </summary>
[SugarTable("mini_self")]
[Description("职业表")]
public class SeIF : DEntityBase
{
/// <summary>
/// 职业名称
/// </summary>
public string Name { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 地区表
/// </summary>
[SugarTable("sys_region")]
[Description("地区表")]
public class SysRegion
{
/// <summary>
/// 主键Id
/// </summary>
public string region_id { get; set; }
/// <summary>
/// 地区名称
/// </summary>
public string region_name { get; set; }
/// <summary>
/// 地区缩写
/// </summary>
public string region_short_name { get; set; }
/// <summary>
/// 行政地区编号
/// </summary>
public string region_code { get; set; }
/// <summary>
/// 地区父id
/// </summary>
public string region_parent_id { get; set; }
/// <summary>
/// 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
/// </summary>
public int region_level { get; set; }
}
}

@ -26,5 +26,12 @@ namespace GDZZ.Application.Enum
#endregion
#region 用户
/// <summary>
/// 小程序用户信息
/// </summary>
public const string MINI_USERINFO = "Live_Message:";
#endregion
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Application
{
/// <summary>
/// 用户类型枚举
/// </summary>
public enum UserEnum
{
/// <summary>
/// 求职者
/// </summary>
[Description("求职者")]
JOB = 1,
/// <summary>
/// 招聘者
/// </summary>
[Description("招聘者")]
ADVERTISE = 2,
}
}

@ -23,11 +23,11 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Service\Auth\DTO\" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<Folder Include="Service\WXPay\Dto\" />
</ItemGroup>
</Project>

@ -6,7 +6,7 @@
<members>
<member name="T:GDZZ.Application.Entity.BaseUser">
<summary>
基础用户
微信端基础用户
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.TenantId">
@ -14,11 +14,6 @@
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Password">
<summary>
密码
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Type">
<summary>
用户类型
@ -36,7 +31,7 @@
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.Status">
<summary>
用户状态
公共状态
</summary>
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.OpenID">
@ -51,32 +46,42 @@
</member>
<member name="P:GDZZ.Application.Entity.BaseUser.UnionId">
<summary>
平台ID
平台ID
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Company">
<summary>
招聘公司
公司属性
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.TenantId">
<member name="P:GDZZ.Application.Entity.Company.logo">
<summary>
租户Id
公司Logo
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Info">
<summary>
公司简介
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Address">
<member name="P:GDZZ.Application.Entity.Company.Name">
<summary>
地址
公司名称
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Phone">
<member name="T:GDZZ.Application.Entity.FeedBack">
<summary>
联系电话
意见反馈
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Profile">
<member name="P:GDZZ.Application.Entity.FeedBack.TenantId">
<summary>
公司详情
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.Entity.FeedBack.messsage">
<summary>
反馈意见
</summary>
</member>
<member name="T:GDZZ.Application.Entity.LiveHistoryContacts">
@ -189,6 +194,101 @@
好友ID
</summary>
</member>
<member name="T:GDZZ.Application.Entity.MiniResume">
<summary>
小程序招聘列表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Title">
<summary>
标题
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Sak">
<summary>
要求
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Salary">
<summary>
待遇
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Info">
<summary>
详情
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.RegionName">
<summary>
地区名
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.CompanyID">
<summary>
所属公司
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.RegionID">
<summary>
地区ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Level">
<summary>
经验
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Record">
<summary>
学历
</summary>
</member>
<member name="T:GDZZ.Application.Entity.SeIF">
<summary>
职业表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SeIF.Name">
<summary>
职业名称
</summary>
</member>
<member name="T:GDZZ.Application.Entity.SysRegion">
<summary>
地区表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_name">
<summary>
地区名称
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_short_name">
<summary>
地区缩写
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_code">
<summary>
行政地区编号
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_parent_id">
<summary>
地区父id
</summary>
</member>
<member name="P:GDZZ.Application.Entity.SysRegion.region_level">
<summary>
地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
</summary>
</member>
<member name="T:GDZZ.Application.Enum.SystemConst">
<summary>
redis枚举配置
@ -204,6 +304,26 @@
聊天详情
</summary>
</member>
<member name="F:GDZZ.Application.Enum.SystemConst.MINI_USERINFO">
<summary>
小程序用户信息
</summary>
</member>
<member name="T:GDZZ.Application.UserEnum">
<summary>
用户类型枚举
</summary>
</member>
<member name="F:GDZZ.Application.UserEnum.JOB">
<summary>
求职者
</summary>
</member>
<member name="F:GDZZ.Application.UserEnum.ADVERTISE">
<summary>
招聘者
</summary>
</member>
<member name="T:GDZZ.Application.Help.CacheService">
<summary>
系统缓存服务
@ -255,6 +375,30 @@
获取配置文件
</summary>
</member>
<member name="M:GDZZ.Application.Service.Auth.AuthService.SignIn(GDZZ.Core.OAuth.PhoneModel)">
<summary>
手机端登录
</summary>
<returns></returns>
</member>
<member name="M:GDZZ.Application.Service.Auth.AuthService.GetLoginUserAsync">
<summary>
获取当前登录用户信息
</summary>
<returns></returns>
</member>
<member name="T:GDZZ.Application.Service.Auth.IAuthService">
<summary>
业务权限控制
</summary>
</member>
<member name="M:GDZZ.Application.Service.Auth.IAuthService.SignIn(GDZZ.Core.OAuth.PhoneModel)">
<summary>
</summary>
<param name="phoneModel"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.Service.LiveChat.ILiveChatService">
<summary>
即时聊天接口
@ -282,6 +426,46 @@
微信支付
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.UserId">
<summary>
用户ID
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Token">
<summary>
登录令牌
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.UserName">
<summary>
用户名称
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Avatar">
<summary>
头像
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Sex">
<summary>
性别
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Phone">
<summary>
电话
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Self">
<summary>
职业
</summary>
</member>
<member name="P:GDZZ.Application.AuthUserOut.Type">
<summary>
</summary>
</member>
<member name="T:GDZZ.Application.BaseUserService">
<summary>
基础用户服务
@ -526,54 +710,54 @@
</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">
@ -586,24 +770,19 @@
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Address">
<summary>
地址
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Phone">
<member name="P:GDZZ.Application.CompanyDto.logo">
<summary>
联系电话
公司Logo
</summary>
</member>
<member name="P:GDZZ.Application.CompanyDto.Profile">
<member name="P:GDZZ.Application.CompanyDto.Info">
<summary>
公司详情
公司简介
</summary>
</member>
<member name="T:GDZZ.Application.CompanyInput">
<summary>
招聘公司输入参数
公司属性输入参数
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.TenantId">
@ -611,19 +790,14 @@
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Address">
<member name="P:GDZZ.Application.CompanyInput.logo">
<summary>
地址
公司Logo
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Phone">
<member name="P:GDZZ.Application.CompanyInput.Info">
<summary>
联系电话
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Profile">
<summary>
公司详情
公司简介
</summary>
</member>
<member name="P:GDZZ.Application.DeleteCompanyInput.Id">
@ -638,7 +812,7 @@
</member>
<member name="T:GDZZ.Application.CompanyOutput">
<summary>
招聘公司输出参数
公司属性输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Id">
@ -651,20 +825,99 @@
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Address">
<member name="P:GDZZ.Application.CompanyOutput.logo">
<summary>
公司Logo
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Info">
<summary>
公司简介
</summary>
</member>
<member name="T:GDZZ.Application.FeedBackDto">
<summary>
意见反馈输出参数
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackDto.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackDto.messsage">
<summary>
反馈意见
</summary>
</member>
<member name="T:GDZZ.Application.FeedBackInput">
<summary>
意见反馈输入参数
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackInput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackInput.messsage">
<summary>
反馈意见
</summary>
</member>
<member name="P:GDZZ.Application.DeleteFeedBackInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateFeedBackInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.FeedBackOutput">
<summary>
意见反馈输出参数
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackOutput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="P:GDZZ.Application.FeedBackOutput.messsage">
<summary>
地址
反馈意见
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Phone">
<member name="T:GDZZ.Application.FeedBackService">
<summary>
联系电话
意见反馈服务
</summary>
</member>
<member name="P:GDZZ.Application.CompanyOutput.Profile">
<member name="M:GDZZ.Application.FeedBackService.GetList">
<summary>
公司详情
获取意见反馈
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.FeedBackService.Add(GDZZ.Application.FeedBackInput)">
<summary>
获取意见反馈
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.LiveHistoryContactsDto">
<summary>
@ -956,7 +1209,7 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.LiveHistoryContactsService.GetMessageLists">
<member name="M:GDZZ.Application.LiveHistoryContactsService.GetMessageLists(System.Int64)">
<summary>
获取聊天详情
</summary>
@ -984,5 +1237,277 @@
<param name="pathType"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.MiniResumeDto">
<summary>
小程序招聘列表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Title">
<summary>
标题
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Url">
<summary>
公司logo
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Sak">
<summary>
要求
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Salary">
<summary>
待遇
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeDto.Info">
<summary>
详情
</summary>
</member>
<member name="T:GDZZ.Application.MiniResumeInput">
<summary>
小程序招聘列表输入参数
</summary>
</member>
<member name="P:GDZZ.Application.DeleteMiniResumeInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateMiniResumeInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.MiniResumeOutput">
<summary>
小程序招聘列表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Title">
<summary>
标题
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Sak">
<summary>
要求
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Salary">
<summary>
待遇
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Info">
<summary>
详情
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.CompanyName">
<summary>
公司名称
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Logo">
<summary>
公司logo
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.CompanyID">
<summary>
公司ID
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Time">
<summary>
发表时间
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.RegionName">
<summary>
地区
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Level">
<summary>
经验
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Record">
<summary>
等级
</summary>
</member>
<member name="T:GDZZ.Application.MiniResumeService">
<summary>
小程序招聘列表服务
</summary>
</member>
<member name="M:GDZZ.Application.MiniResumeService.Getlist(GDZZ.Application.MiniResumeInput)">
<summary>
初始化
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.MiniResumeService.SearchRetFun(GDZZ.Application.MiniResumeInput)">
<summary>
搜索招聘信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.MiniResumeService.Add(GDZZ.Application.AddMiniResumeInput)">
<summary>
发布招聘信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.MiniResumeService.Delete(GDZZ.Application.DeleteMiniResumeInput)">
<summary>
删除招聘信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.MiniResumeService.Update(GDZZ.Application.UpdateMiniResumeInput)">
<summary>
更新招聘信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.SysRegionDto">
<summary>
地区表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_name">
<summary>
地区名称
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_short_name">
<summary>
地区缩写
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_code">
<summary>
行政地区编号
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_parent_id">
<summary>
地区父id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionDto.region_level">
<summary>
地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
</summary>
</member>
<member name="T:GDZZ.Application.SysRegionInput">
<summary>
地区表输入参数
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_name">
<summary>
地区名称
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_short_name">
<summary>
地区缩写
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_code">
<summary>
行政地区编号
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_parent_id">
<summary>
地区父id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionInput.region_level">
<summary>
地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
</summary>
</member>
<member name="T:GDZZ.Application.SysRegionOutput">
<summary>
地区表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_name">
<summary>
地区名称
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_short_name">
<summary>
地区缩写
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_code">
<summary>
行政地区编号
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_parent_id">
<summary>
地区父id
</summary>
</member>
<member name="P:GDZZ.Application.SysRegionOutput.region_level">
<summary>
地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
</summary>
</member>
<member name="T:GDZZ.Application.SysRegionService">
<summary>
地区表服务
</summary>
</member>
<member name="M:GDZZ.Application.SysRegionService.list">
<summary>
查询所有城市列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
</members>
</doc>

@ -1,6 +1,7 @@
using Furion;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using GDZZ.Application.Entity;
using GDZZ.Application.Enum;
using GDZZ.Core;
using Microsoft.AspNetCore.Mvc;
@ -104,6 +105,23 @@ namespace GDZZ.Application.Help
#endregion
#region 用户服务
public async Task SetUserInfoAsync(AuthUserOut authUserOut, long UserID)
{
string cacheKey = SystemConst.MINI_USERINFO + $"{UserID}";
await _redisCache.SetAsync(cacheKey, authUserOut, TimeSpan.FromDays(1));
}
public async Task<AuthUserOut> GetUserInfoAsync(long UserID)
{
string cacheKey = SystemConst.MINI_USERINFO + $"{UserID}";
return await _redisCache.GetAsync<AuthUserOut>(cacheKey);
}
#endregion
}
}

@ -15,8 +15,17 @@ namespace GDZZ.Application.Help
#endregion
#region 聊天详情接口
Task SetMessage(List<LiveMessageList> liveMessages, long UserID, long ChatUserID);
#endregion
#region 用户信息
Task SetUserInfoAsync(AuthUserOut authUserOut, long UserID);
Task<AuthUserOut> GetUserInfoAsync(long UserID);
#endregion
}
}

@ -15,30 +15,255 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GDZZ.Core.OAuth;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using System.Linq.Dynamic.Core.Tokenizer;
using Microsoft.AspNetCore.Http;
using GDZZ.Application.Help;
using Mapster;
namespace GDZZ.Application.Service.Auth
{
public class AuthService
public class AuthService : IAuthService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<BaseUser> Baseuser;
#region 仓储
private readonly SqlSugarRepository<BaseUser> Baseuser; // wx用户仓储
private readonly SqlSugarRepository<SysUser> _sysUserRep; // 用户表仓储
private readonly SqlSugarRepository<SysTenant> _sysTenantRep; //租户仓储
private readonly SqlSugarRepository<SeIF> Self; //职业仓储
#endregion
#region 服务
private readonly ICacheService cacheService; //
private readonly WechatOAuth _wechatOAuth; //微信权限服务
private readonly IHttpContextAccessor _httpContextAccessor; //http服务
private readonly IEventPublisher _eventPublisher; //事件写入服务
#endregion
/// <summary>
/// 获取配置文件
/// </summary>
private readonly ThirdParty _oauthConfig;
public AuthService(SqlSugarRepository<BaseUser> Baseuser, IOptions<OAuthOptions> options)
public AuthService(
IOptions<OAuthOptions> options,
SqlSugarRepository<BaseUser> Baseuser,
SqlSugarRepository<SysTenant> sysTenantRep,
SqlSugarRepository<SysUser> sysUserRep,
SqlSugarRepository<SeIF> Self,
ICacheService cacheService,
WechatOAuth wechatOAuth,
IEventPublisher eventPublisher,
IHttpContextAccessor httpContextAccessor)
{
Baseuser = this.Baseuser;
this._eventPublisher= eventPublisher;
this._sysUserRep = sysUserRep;
this._sysTenantRep = sysTenantRep;
this.Baseuser = Baseuser;
this._httpContextAccessor = httpContextAccessor;
this.cacheService= cacheService;
this.Self = Self;
_wechatOAuth = wechatOAuth;
_oauthConfig = options.Value.Wechat;
}
/// <summary>
/// 手机端登录
/// </summary>
/// <returns></returns>
[HttpPost("MiniResume/SignIn")]
[AllowAnonymous]
public async Task<AuthUserOut> SignIn(PhoneModel phoneModel)
{
AuthUserOut authUserOut = new AuthUserOut();
//读取凭证
var tokenModel = await this._wechatOAuth.GetAccessTokenAsync(phoneModel.code);
//解析电话
var phoneInfo = MiniProgramUtil.AESDecrypt(phoneModel.encryptedDataStr, tokenModel.SessionKey, phoneModel.iv);
//查询系统用户
var sysUser = this._sysUserRep.AsQueryable()
.Filter("TenantId", true)
.First(x => x.Phone == phoneInfo.PhoneNumber);
if (sysUser.IsEmpty())
{
sysUser = await this._sysUserRep.InsertReturnEntityAsync(new SysUser()
{
Account = phoneInfo.PurePhoneNumber,
AdminType = AdminType.None,
Avatar = "https://gdzongzhi.com/assets/img/logo.png",
Birthday = DateTime.Now,
CreatedTime = DateTime.Now,
CreatedUserId = null,
CreatedUserName = null,
Sex = Gender.UNKNOWN,
Status = CommonStatus.ENABLE,
Email = null,
IsDeleted = false,
Name = phoneInfo.PhoneNumber,
Password = MD5Encryption.Encrypt("123456"),
TenantId = 392820661919813,
Phone = phoneInfo.PhoneNumber,
NickName = "",
Tel = null,
});
}
var wxUser = await this.Baseuser.AsQueryable()
.Filter("TenantId", true)
.Where(x => x.OpenID == tokenModel.OpenId).SingleAsync();
if (wxUser.IsEmpty())
{
wxUser = await this.Baseuser.InsertReturnEntityAsync(new BaseUser()
{
UnionId = tokenModel.Unionid,
CreatedUserId = sysUser.Id,
CreatedTime = DateTime.Now,
CreatedUserName = sysUser.Name,
AvatarUrl = "https://gdzongzhi.com/assets/img/logo.png",
Status = CommonStatus.ENABLE,
OpenID = tokenModel.OpenId,
TenantId = 392820661919813,
Type = UserEnum.JOB,
UserName = phoneInfo.PhoneNumber,
});
}
if(wxUser.IsEmpty()|| sysUser.IsEmpty())
throw Oops.Oh(ErrorCode.xg1002);
var Self = await this.Self.FirstOrDefaultAsync(x => x.CreatedUserId == sysUser.Id);
// 获取加密后的密码
var encryptPassword = MD5Encryption.Encrypt(sysUser.Password);
// 验证账号是否被冻结
if (sysUser.Status == CommonStatus.DISABLE)
throw Oops.Oh(ErrorCode.D1017);
//获取对应租户
var tenant = this._sysTenantRep.Single(sysUser.TenantId);
if (tenant.IsNullOrZero())
throw Oops.Oh(ErrorCode.F1001);
// 生成Token令牌
authUserOut.Token = JWTEncryption.Encrypt(new Dictionary<string, object>
{
{ClaimConst.CLAINM_USERID, sysUser.Id},
{ClaimConst.TENANT_ID, sysUser.TenantId},
{ClaimConst.CLAINM_ACCOUNT, sysUser.Account},
{ClaimConst.CLAINM_NAME, sysUser.Name},
{ClaimConst.CLAINM_SUPERADMIN, sysUser.AdminType},
{ ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType },
{ ClaimConst.CLAINM_TENANT_NAME, tenant.Name },
});
// 设置Swagger自动登录
_httpContextAccessor.HttpContext.SigninToSwagger(authUserOut.Token);
// 生成刷新Token令牌
var refreshToken = JWTEncryption.GenerateRefreshToken(authUserOut.Token, 30);
// 设置刷新Token令牌
_httpContextAccessor.HttpContext.Response.Headers["x-access-token"] = refreshToken;
var httpContext = App.HttpContext;
await _eventPublisher.PublishAsync(new ChannelEventSource("Update:UserLoginInfo",
new SysUser { Id = sysUser.Id, LastLoginIp = httpContext.GetLocalIpAddressToIPv4(), LastLoginTime = DateTime.Now }));
authUserOut.Avatar = sysUser.Avatar;
authUserOut.Phone = sysUser.Phone;
authUserOut.Sex = sysUser.Sex;
authUserOut.UserId = sysUser.Id;
authUserOut.UserName = sysUser.Name;
authUserOut.Self = Self.IsEmpty() ? "未填写" : Self.Name;
authUserOut.Type = UserEnum.JOB;
await this.cacheService.SetUserInfoAsync(authUserOut, authUserOut.UserId);
return authUserOut;
}
/// <summary>
/// 获取当前登录用户信息
/// </summary>
/// <returns></returns>
[HttpGet("MiniResume/getLoginUser")]
public async Task<AuthUserOut> GetLoginUserAsync()
{
return await this.cacheService.GetUserInfoAsync(UserManager.UserId);
}
///// <summary>
///// 微信支付
///// </summary>
///// <param name="productId"></param>
///// <returns></returns>
//[Transaction]
//public async Task<IResponseOutput> WxPay(long productId)
//{
// //ProductInfoEntity entity = await _productInfoRepository.GetAsync(productId);
// RechargeIntroEntity entity = await _rechargeIntroRepository.GetAsync(productId);
// if (entity.IsNotNull())
// {
// //订单信息
// OrderEntity order = await _orderRepository.InsertAsync(new OrderEntity
// {
// OrderSn = StringHelper.GetOrderSn(productId),
// UserId = _user.Id,
// ShippingUser = "",
// Province = 0,
// City = 0,
// District = 0,
// Address = "",
// PaymentMethod = (int)PaymentMethodEnum.WX,
// OrderMoney = entity.Price,
// DistrictMoney = 0,
// PaymentMoney = entity.Price,
// ShippingCompName = "",
// ShippingSn = "",
// ShippingTime = null,
// PayTime = DateTime.Now,
// ReceiveTime = null,
// OrderStatus = (int)OrderStatusEnum.NotPaying,
// OrderPoint = 0,
// InvoiceTitle = ""
// });
// //明细
// await _orderDetailRepository.InsertAsync(new OrderDetailEntity
// {
// OrderId = order.Id,
// ProductId = productId,
// ProductName = entity.ProductName,
// ProductPrice = entity.Price
// });
// //付款记录
// PaymentRecordEntity paymentRecord = await _paymentRecordRepository.InsertAsync(new PaymentRecordEntity
// {
// UserId = _user.Id,
// OrderId = order.Id,
// PaySn = "",
// PayStatus = (int)PayStatusEnum.NotPaying,
// PayPlatform = (int)PaymentMethodEnum.WX,
// PaymentMoney = order.PaymentMoney
// });
// return await TenPayHelper.UniOrderAsync(_user.OpenId, entity.ProductName, order.PaymentMoney.ToInt(),
// paymentRecord.Id);
// }
// return ResponseOutput.Fail("商品信息不存在");
//}
}
}

@ -0,0 +1,55 @@
using GDZZ.Core;
using Org.BouncyCastle.Bcpg.OpenPgp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Application
{
public class AuthUserOut
{
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 登录令牌
/// </summary>
public string Token { get; set;}
/// <summary>
/// 用户名称
/// </summary>
public string UserName { get; set;}
/// <summary>
/// 头像
/// </summary>
public string Avatar { get; set;}
/// <summary>
/// 性别
/// </summary>
public Gender Sex { get; set; }
/// <summary>
/// 电话
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 职业
/// </summary>
public string Self { get; set; }
/// <summary>
///
/// </summary>
public UserEnum Type { get; set; }
}
}

@ -0,0 +1,23 @@

using GDZZ.Core.OAuth;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Application.Service.Auth
{
/// <summary>
/// 业务权限控制
/// </summary>
public interface IAuthService
{
/// <summary>
///
/// </summary>
/// <param name="phoneModel"></param>
/// <returns></returns>
Task<AuthUserOut> SignIn(PhoneModel phoneModel);
}
}

@ -10,7 +10,7 @@ using GDZZ.Application.Entity;
namespace GDZZ.Application
{
/// <summary>
/// 招聘公司服务
/// 公司属性服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "Company", Order = 1)]
public class CompanyService : ICompanyService, IDynamicApiController, ITransient
@ -23,7 +23,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 分页查询招聘公司
/// 分页查询公司属性
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -36,7 +36,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 增加招聘公司
/// 增加公司属性
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -48,7 +48,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 删除招聘公司
/// 删除公司属性
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -60,7 +60,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 更新招聘公司
/// 更新公司属性
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -72,7 +72,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 获取招聘公司
/// 获取公司属性
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -83,7 +83,7 @@ namespace GDZZ.Application
}
/// <summary>
/// 获取招聘公司列表
/// 获取公司属性列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>

@ -4,7 +4,7 @@ using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 招聘公司输出参数
/// 公司属性输出参数
/// </summary>
public class CompanyDto
{
@ -19,19 +19,14 @@ namespace GDZZ.Application
public long TenantId { get; set; }
/// <summary>
/// 地址
/// 公司Logo
/// </summary>
public string Address { get; set; }
public string logo { get; set; }
/// <summary>
/// 联系电话
/// 公司简介
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 公司详情
/// </summary>
public string Profile { get; set; }
public string Info { get; set; }
}
}

@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 招聘公司输入参数
/// 公司属性输入参数
/// </summary>
public class CompanyInput : PageInputBase
{
@ -15,19 +15,14 @@ namespace GDZZ.Application
public virtual long TenantId { get; set; }
/// <summary>
/// 地址
/// 公司Logo
/// </summary>
public virtual string Address { get; set; }
public virtual string logo { get; set; }
/// <summary>
/// 联系电话
/// 公司简介
/// </summary>
public virtual string Phone { get; set; }
/// <summary>
/// 公司详情
/// </summary>
public virtual string Profile { get; set; }
public virtual string Info { get; set; }
}

@ -3,7 +3,7 @@
namespace GDZZ.Application
{
/// <summary>
/// 招聘公司输出参数
/// 公司属性输出参数
/// </summary>
public class CompanyOutput
{
@ -18,19 +18,14 @@ namespace GDZZ.Application
public long TenantId { get; set; }
/// <summary>
/// 地址
/// 公司Logo
/// </summary>
public string Address { get; set; }
public string logo { get; set; }
/// <summary>
/// 联系电话
/// 公司简介
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 公司详情
/// </summary>
public string Profile { get; set; }
public string Info { get; set; }
}
}

@ -0,0 +1,27 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 意见反馈输出参数
/// </summary>
public class FeedBackDto
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 反馈意见
/// </summary>
public string messsage { get; set; }
}
}

@ -0,0 +1,52 @@
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 意见反馈输入参数
/// </summary>
public class FeedBackInput : PageInputBase
{
/// <summary>
/// 租户Id
/// </summary>
public virtual long TenantId { get; set; }
/// <summary>
/// 反馈意见
/// </summary>
public virtual string messsage { get; set; }
}
public class AddFeedBackInput : FeedBackInput
{
}
public class DeleteFeedBackInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class UpdateFeedBackInput : FeedBackInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class QueryeFeedBackInput : DeleteFeedBackInput
{
}
}

@ -0,0 +1,26 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 意见反馈输出参数
/// </summary>
public class FeedBackOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
/// <summary>
/// 反馈意见
/// </summary>
public string messsage { get; set; }
}
}

@ -0,0 +1,57 @@
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;
using System.Collections.Generic;
using System;
namespace GDZZ.Application
{
/// <summary>
/// 意见反馈服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "FeedBack", Order = 1)]
public class FeedBackService : IFeedBackService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<FeedBack> _rep;
public FeedBackService(SqlSugarRepository<FeedBack> rep)
{
_rep = rep;
}
/// <summary>
/// 获取意见反馈
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("MiniResume/FeedBack/list")]
public async Task<dynamic> GetList()
{
return await _rep.AsQueryable()
.Filter("TenantId", true)
.Where(x => x.CreatedUserId == UserManager.UserId).ToListAsync();
}
/// <summary>
/// 获取意见反馈
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("MiniResume/FeedBack/Add")]
public async Task Add(FeedBackInput backInput)
{
backInput.TenantId =long.Parse(UserManager.TenantID);
var entity = backInput.Adapt<FeedBack>();
await _rep.InsertAsync(entity);
}
}
}

@ -0,0 +1,13 @@
using GDZZ.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using GDZZ.Application.Entity;
namespace GDZZ.Application
{
public interface IFeedBackService
{
Task<dynamic> GetList();
}
}

@ -139,7 +139,7 @@ namespace GDZZ.Application
DisplayName = sysUser.NickName,
Id = item.FriendID,
Index = sysUser.Name.Substring(0, 1),
LastSendTime = new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds(),
LastSendTime = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000,
Unread = 0
};
@ -149,6 +149,7 @@ namespace GDZZ.Application
if (live != null)
{
liveHis.LastSendTime = (live.SendTime.ToUniversalTime().Ticks - 621355968000000000) / 10000;
liveHis.LastContent = live.Content;
liveHis.Type = live.Type;
}
@ -167,9 +168,9 @@ namespace GDZZ.Application
/// </summary>
/// <returns></returns>
[HttpGet("/LiveHistoryContacts/GetMessageLists")]
public async Task<List<LiveMessageList>> GetMessageLists()
public async Task<List<LiveMessageList>> GetMessageLists(long OtherUserID)
{
var res = await this.liveMessageRep.Where(x => x.CreatedUserId == UserManager.UserId || x.OtherUserID == UserManager.UserId).ToListAsync();
var res = await this.liveMessageRep.Where(x => x.CreatedUserId == UserManager.UserId && x.OtherUserID == OtherUserID).ToListAsync();
return res.Adapt<List<LiveMessageList>>();
}
@ -184,6 +185,8 @@ namespace GDZZ.Application
var entity = input.Adapt<LiveMessage>();
var live = this.liveMessageRep.InsertReturnEntity(entity);
var user = await _sysOnlineUerRep.Where(m => m.UserId == entity.OtherUserID).OrderByDescending(x=>x.LastTime).FirstAsync();
if (user != null)
{
var livemes = new LiveMessageInput()
{
id = live.Id.ToString(),
@ -202,6 +205,7 @@ namespace GDZZ.Application
var livejson = livemes.ToJsonString();
await _chatHubContext.Clients.Client(user.ConnectionId).SendMessage(livejson, "SendMessage");
}
}
/// <summary>

@ -0,0 +1,42 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 小程序招聘列表输出参数
/// </summary>
public class MiniResumeDto
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 公司logo
/// </summary>
public string Url { get; set; }
/// <summary>
/// 要求
/// </summary>
public string Sak { get; set; }
/// <summary>
/// 待遇
/// </summary>
public int Salary { get; set; }
/// <summary>
/// 详情
/// </summary>
public string Info { get; set; }
}
}

@ -0,0 +1,44 @@
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 小程序招聘列表输入参数
/// </summary>
public class MiniResumeInput : PageInputBase
{
}
public class AddMiniResumeInput : MiniResumeInput
{
}
public class DeleteMiniResumeInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class UpdateMiniResumeInput : MiniResumeInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class QueryeMiniResumeInput : DeleteMiniResumeInput
{
}
}

@ -0,0 +1,71 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 小程序招聘列表输出参数
/// </summary>
public class MiniResumeOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 要求
/// </summary>
public string Sak { get; set; }
/// <summary>
/// 待遇
/// </summary>
public int Salary { get; set; }
/// <summary>
/// 详情
/// </summary>
public string Info { get; set; }
/// <summary>
/// 公司名称
/// </summary>
public string CompanyName { get; set; }
/// <summary>
/// 公司logo
/// </summary>
public string Logo { get; set; }
/// <summary>
/// 公司ID
/// </summary>
public long CompanyID { get; set; }
/// <summary>
/// 发表时间
/// </summary>
public string Time { get; set; }
/// <summary>
/// 地区
/// </summary>
public string RegionName { get; set; }
/// <summary>
/// 经验
/// </summary>
public string Level { get; set; }
/// <summary>
/// 等级
/// </summary>
public string Record { 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 IMiniResumeService
{
Task Add(AddMiniResumeInput input);
Task Delete(DeleteMiniResumeInput input);
Task<dynamic> Getlist([FromQuery] MiniResumeInput input);
Task Update(UpdateMiniResumeInput input);
}
}

@ -0,0 +1,162 @@
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;
using Microsoft.AspNetCore.Authorization;
using StackExchange.Profiling.Internal;
using System;
using System.Collections.Generic;
namespace GDZZ.Application
{
/// <summary>
/// 小程序招聘列表服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "MiniResume", Order = 1)]
public class MiniResumeService : IMiniResumeService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<MiniResume> _rep;
private readonly SqlSugarRepository<Company> CompanyRep;
public MiniResumeService(SqlSugarRepository<MiniResume> rep, SqlSugarRepository<Company> CompanyRep)
{
_rep = rep;
this.CompanyRep= CompanyRep;
}
#region 求职端
/// <summary>
/// 初始化
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/MiniResume/Getlist")]
[AllowAnonymous]
public async Task<dynamic> Getlist([FromQuery] MiniResumeInput input)
{
var entities =await _rep.AsQueryable()
.LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息
.Select((u, y) => new MiniResumeOutput
{
CompanyID =y.Id,CompanyName = y.Name,
Logo = y.logo,Id = u.Id,
Info = u.Info,Sak = u.Sak,
Salary = u.Salary,Title = u.Title,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),RegionName = u.RegionName,
Record = u.Record,Level = u.Level,
}).MergeTable()
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities;
}
/// <summary>
/// 搜索招聘信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost("/MiniResume/SearchRetFun")]
public async Task<dynamic> SearchRetFun(MiniResumeInput input)
{
var entities = await _rep.AsQueryable()
.LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Title.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), (u, y) => y.Name.Contains(input.SearchValue))
.Select((u, y) => new MiniResumeOutput
{
CompanyID = y.Id,
CompanyName = y.Name,
Logo = y.logo,
Id = u.Id,
Info = u.Info,
Sak = u.Sak,
Salary = u.Salary,
Title = u.Title,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),
RegionName = u.RegionName,
Record = u.Record,
Level = u.Level,
}).MergeTable()
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities;
}
#endregion
#region 招聘端
/// <summary>
/// 发布招聘信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/MiniResume/add")]
public async Task Add(AddMiniResumeInput input)
{
var entity = input.Adapt<MiniResume>();
await _rep.InsertAsync(entity);
}
/// <summary>
/// 删除招聘信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/MiniResume/delete")]
public async Task Delete(DeleteMiniResumeInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
await _rep.DeleteAsync(entity);
}
/// <summary>
/// 更新招聘信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/MiniResume/edit")]
public async Task Update(UpdateMiniResumeInput input)
{
var entity = input.Adapt<MiniResume>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
#endregion
}
}

@ -0,0 +1,42 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 地区表输出参数
/// </summary>
public class SysRegionDto
{
/// <summary>
/// 主键Id
/// </summary>
public string region_id { get; set; }
/// <summary>
/// 地区名称
/// </summary>
public string region_name { get; set; }
/// <summary>
/// 地区缩写
/// </summary>
public string region_short_name { get; set; }
/// <summary>
/// 行政地区编号
/// </summary>
public string region_code { get; set; }
/// <summary>
/// 地区父id
/// </summary>
public string region_parent_id { get; set; }
/// <summary>
/// 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
/// </summary>
public int region_level { get; set; }
}
}

@ -0,0 +1,67 @@
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 地区表输入参数
/// </summary>
public class SysRegionInput : PageInputBase
{
/// <summary>
/// 主键Id
/// </summary>
public virtual string region_id { get; set; }
/// <summary>
/// 地区名称
/// </summary>
public virtual string region_name { get; set; }
/// <summary>
/// 地区缩写
/// </summary>
public virtual string region_short_name { get; set; }
/// <summary>
/// 行政地区编号
/// </summary>
public virtual string region_code { get; set; }
/// <summary>
/// 地区父id
/// </summary>
public virtual string region_parent_id { get; set; }
/// <summary>
/// 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
/// </summary>
public virtual int region_level { get; set; }
}
public class SysRegionList
{
}
public class AddSysRegionInput : SysRegionInput
{
}
public class DeleteSysRegionInput
{
}
public class UpdateSysRegionInput : SysRegionInput
{
}
public class QueryeSysRegionInput : DeleteSysRegionInput
{
}
}

@ -0,0 +1,44 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 地区表输出参数
/// </summary>
public class SysRegionOutput
{
/// <summary>
/// 主键Id
/// </summary>
public string region_id { get; set; }
/// <summary>
/// 地区名称
/// </summary>
public string region_name { get; set; }
/// <summary>
/// 地区缩写
/// </summary>
public string region_short_name { get; set; }
/// <summary>
/// 行政地区编号
/// </summary>
public string region_code { get; set; }
/// <summary>
/// 地区父id
/// </summary>
public string region_parent_id { get; set; }
/// <summary>
/// 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县
/// </summary>
public int region_level { get; set; }
}
}

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Application
{
public class ViewMiniResume
{
public string ID { get; set; }
}
}

@ -0,0 +1,15 @@
using GDZZ.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using GDZZ.Application.Entity;
using System.Collections.Generic;
namespace GDZZ.Application
{
public interface ISysRegionService
{
Task<List<SysRegionOutput>> list();
}
}

@ -0,0 +1,43 @@
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;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
namespace GDZZ.Application
{
/// <summary>
/// 地区表服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "SysRegion", Order = 1)]
public class SysRegionService : ISysRegionService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<SysRegion> _rep;
public SysRegionService(SqlSugarRepository<SysRegion> rep)
{
_rep = rep;
}
/// <summary>
/// 查询所有城市列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/SysRegion/list")]
[AllowAnonymous]
public async Task<List<SysRegionOutput>> list()
{
var entities = await _rep.AsQueryable().Where(x => x.region_level == 2).ToArrayAsync();
return entities.Adapt<List<SysRegionOutput>>();
}
}
}

@ -13,35 +13,6 @@ namespace GDZZ.Application.Service.WXPay
{
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();
//}
}
}

@ -3560,6 +3560,11 @@
用户标识
</summary>
</member>
<member name="P:GDZZ.Core.TokenModel.AccessToken">
<summary>
AccessToken
</summary>
</member>
<member name="M:GDZZ.Core.AccessTokenModelModelExtensions.HasError(GDZZ.Core.TokenModel)">
<summary>
获取的Token是否包含错误
@ -3614,6 +3619,13 @@
<param name="refreshToken"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Core.WechatOAuth.GetTokenAsync">
<summary>
获取凭证
</summary>
<param name="refreshToken"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Core.Service.AppInput">
<summary>
系统应用参数
@ -9229,7 +9241,6 @@
<summary>
添加 SqlSugar 拓展
</summary>
<param name="services"></param>
<param name="config"></param>
<param name="buildAction"></param>
<returns></returns>

@ -8,4 +8,6 @@ public interface IWechatOAuth
string GetAuthorizeUrl(string state = "");
Task<UserInfoModel> GetUserInfoAsync(string accessToken, string openId);
Task<TokenModel> GetRefreshTokenAsync(string refreshToken);
Task<TokenModel> GetTokenAsync();
}

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Core.OAuth
{
public class PhoneModel
{
public string encryptedDataStr { get; set; }
public string iv { get; set; }
public string code { get; set; }
}
}

@ -38,17 +38,19 @@ public class TokenModel
[JsonPropertyName("openid")]
public string OpenId { get; set; }
/// <summary>
/// AccessToken
/// </summary>
[JsonPropertyName("access_token")]
public string AccessToken { get; set; }
///// <summary>
///// Token 类型
///// </summary>
//[JsonPropertyName("token_type")]
//public string TokenType { get; set; }
///// <summary>
///// AccessToken
///// </summary>
//[JsonPropertyName("access_token")]
//public string AccessToken { get; set; }
///// <summary>
///// 用于刷新 AccessToken 的 Token

@ -17,6 +17,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
private readonly string _accessTokenUrl = "https://api.weixin.qq.com/sns/jscode2session";
private readonly string _refreshTokenUrl = "https://api.weixin.qq.com/sns/oauth2/refresh_token";
private readonly string _userInfoUrl = "https://api.weixin.qq.com/sns/userinfo";
private readonly string _assessToken = "https://api.weixin.qq.com/sns/oauth2/access_token";
private readonly ThirdParty _oauthConfig;
@ -63,9 +64,6 @@ public class WechatOAuth : IWechatOAuth, ISingleton
var accessTokenModel = await $"{_accessTokenUrl}?{param.ToQueryString()}".GetAsAsync<TokenModel>();
if (accessTokenModel.HasError())
throw Oops.Oh($"{ accessTokenModel.Errmsg}");
//获取用户信息
return accessTokenModel;
}
@ -77,6 +75,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
/// <returns></returns>
public async Task<UserInfoModel> GetUserInfoAsync(string accessToken, string openId)
{
var param = new Dictionary<string, string>()
{
["access_token"] = accessToken,
@ -107,4 +106,25 @@ public class WechatOAuth : IWechatOAuth, ISingleton
throw Oops.Oh($"{ refreshTokenModel.Errmsg}");
return refreshTokenModel;
}
/// <summary>
/// 获取凭证
/// </summary>
/// <param name="refreshToken"></param>
/// <returns></returns>
public async Task<TokenModel> GetTokenAsync()
{
var param = new Dictionary<string, string>()
{
["code"] = "client_credential",
["appid"] = _oauthConfig.app_id,
["secret"] = _oauthConfig.app_key,
};
var refreshTokenModel = await $"{_assessToken}?{param.ToQueryString()}".GetAsAsync<TokenModel>();
if (refreshTokenModel.HasError())
throw Oops.Oh($"{refreshTokenModel.Errmsg}");
return refreshTokenModel;
}
}

@ -7,5 +7,5 @@ public interface ISysOauthService
{
Task<dynamic> GetWechatUserInfo([FromQuery] string token, [FromQuery] string openId);
Task WechatLogin();
Task WechatLoginCallback([FromQuery] string code, [FromQuery] string state, [FromQuery] string error_description = "");
Task<dynamic> WechatLoginCallback([FromQuery] string code, [FromQuery] string state, [FromQuery] string error_description = "");
}

@ -1,6 +1,7 @@
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using GDZZ.Core.OAuth;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@ -17,20 +18,26 @@ public class SysOauthService : ISysOauthService, IDynamicApiController, ITransie
{
private readonly HttpContext _httpContext;
private readonly WechatOAuth _wechatOAuth;
private readonly MiniProgramUtil miniProgram;
public SysOauthService(IHttpContextAccessor httpContextAccessor, WechatOAuth wechatOAuth)
{
_httpContext = httpContextAccessor.HttpContext;
_wechatOAuth = wechatOAuth;
this.miniProgram = new MiniProgramUtil();
}
/// <summary>
/// 微信登录授权获取微信access_token
/// </summary>
[HttpGet("oauth/wechat")]
public Task WechatLogin()
{
_httpContext.Response.Redirect(_wechatOAuth.GetAuthorizeUrl("GDZZ"));
var token = _wechatOAuth.GetAuthorizeUrl("GDZZ");
_httpContext.Response.Redirect(token);
return Task.CompletedTask;
}
@ -42,14 +49,12 @@ public class SysOauthService : ISysOauthService, IDynamicApiController, ITransie
/// <param name="error_description"></param>
/// <returns></returns>
[HttpGet("oauth/wechatcallback")]
public async Task WechatLoginCallback([FromQuery] string code, [FromQuery] string state, [FromQuery] string error_description = "")
public async Task<dynamic> WechatLoginCallback([FromQuery] string code, [FromQuery] string state, [FromQuery] string error_description = "")
{
if (!string.IsNullOrEmpty(error_description))
throw Oops.Oh(error_description);
var accessTokenModel = await _wechatOAuth.GetAccessTokenAsync(code, state);
//var userInfoModel = await _wechatOAuth.GetUserInfoAsync(accessTokenModel。, accessTokenModel.OpenId);
await _httpContext.Response.WriteAsJsonAsync(accessTokenModel);
return accessTokenModel;
}
/// <summary>

@ -64,8 +64,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
.WhereIF(!string.IsNullOrWhiteSpace(searchValue), (u, e, o) => u.Account.Contains(input.SearchValue.Trim()) ||
u.Name.Contains(input.SearchValue.Trim()) ||
u.Phone.Contains(input.SearchValue.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(pid), (u, e, o) => e.OrgId == long.Parse(pid) ||
o.Pids.Contains(pid.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(pid), (u, e, o) => e.OrgId == long.Parse(pid) || o.Pids.Contains(pid.Trim()))
.WhereIF(Enum.IsDefined(typeof(CommonStatus), input.SearchStatus), (u, e, o) => u.Status == input.SearchStatus)
.Where((u, e, o) => u.AdminType == AdminType.None)
.Select<UserOutput>("u.*,t.Name As TenantName ").ToDataFilter("u","Id",FilterType.User).ToPagedListAsync(input.PageNo, input.PageSize);

@ -371,9 +371,11 @@ public static class SqlSugarSetup
var superAdminViewAllData = Convert.ToBoolean(App.GetOptions<SystemSettingsOptions>().SuperAdminViewAllData);
foreach (var entityType in types)
{
var isTID = entityType.GetProperty(ClaimConst.TENANT_ID).IsEmpty();
// 配置多租户全局过滤器
if (!entityType.GetProperty(ClaimConst.TENANT_ID).IsEmpty())
{ //判断实体类中包含TenantId属性
if (!isTID)
{
//判断实体类中包含TenantId属性
//构建动态Lambda
var lambda = DynamicExpressionParser.ParseLambda
(new[] { Expression.Parameter(entityType, "it") },
@ -394,6 +396,8 @@ public static class SqlSugarSetup
IsJoinQuery = true
}); //将Lambda传入过滤器
}
}
}
@ -427,7 +431,6 @@ public static class SqlSugarSetup
/// <summary>
/// 添加 SqlSugar 拓展
/// </summary>
/// <param name="services"></param>
/// <param name="config"></param>
/// <param name="buildAction"></param>
/// <returns></returns>

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json.Serialization;
@ -33,8 +34,10 @@ public class MiniProgramUtil
/// <returns></returns>
private static string BasicAESDecrypt(string encryptedDataStr, string session_key, string iv)
{
var databyte = System.Text.Encoding.Default.GetBytes(encryptedDataStr);
// 16进制转换成byte
var encryptedData = Convert.FromBase64String(encryptedDataStr);
var encryptedData = Convert.FromBase64String(encryptedDataStr.Replace(" ",""));
var managed = new RijndaelManaged
{
Key = Convert.FromBase64String(session_key),
@ -47,6 +50,19 @@ public class MiniProgramUtil
var result = Encoding.Default.GetString(finalBlock);
return result;
}
public static byte[] GetByteArray(string shex)
{
string[] ssArray = shex.Split(' ');
List<byte> bytList = new List<byte>();
foreach (var s in ssArray)
{ //将十六进制的字符串转换成数值
bytList.Add(Convert.ToByte(s, 16));
} //返回字节数组
return bytList.ToArray();
}
}
/// <summary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save