diff --git a/GDZZ.Application/Entity/Annex.cs b/GDZZ.Application/Entity/Annex.cs
new file mode 100644
index 0000000..1ced7f9
--- /dev/null
+++ b/GDZZ.Application/Entity/Annex.cs
@@ -0,0 +1,27 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using GDZZ.Core.Entity;
+namespace GDZZ.Application.Entity
+{
+ ///
+ /// 附件表
+ ///
+ [SugarTable("mini_annex")]
+ [Description("附件表")]
+ public class Annex : DEntityBase
+ {
+ ///
+ /// 文件名
+ ///
+ public string FileName { get; set; }
+ ///
+ /// 文件大小
+ ///
+ public string FileSize { get; set; }
+ ///
+ /// 文件路径
+ ///
+ public string FileUrl { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/Entity/JobHunt.cs b/GDZZ.Application/Entity/JobHunt.cs
index 11af21a..47a3c1e 100644
--- a/GDZZ.Application/Entity/JobHunt.cs
+++ b/GDZZ.Application/Entity/JobHunt.cs
@@ -11,14 +11,6 @@ namespace GDZZ.Application.Entity
[Description("小程序求职")]
public class JobHunt : DEntityBase
{
- ///
- /// 职业名称
- ///
- public string Career { get; set; }
- ///
- /// 个人简介
- ///
- public string Info { get; set; }
///
/// 期望工作地点
///
@@ -28,12 +20,28 @@ namespace GDZZ.Application.Entity
///
public string Tags { get; set; }
///
- /// 电话
+ /// 学历
+ ///
+ public string Record { get; set; }
+ ///
+ /// 经验
+ ///
+ public string Experience { get; set; }
+ ///
+ /// 薪资
+ ///
+ public string Salary { get; set; }
+ ///
+ /// 职位
+ ///
+ public string Position { get; set; }
+ ///
+ /// 预留手机
///
- public string phone { get; set; }
+ public string Phone { get; set; }
///
- /// 头像
+ /// 年龄
///
- public string Logo { get; set; }
+ public string AgeValue { get; set; }
}
}
\ No newline at end of file
diff --git a/GDZZ.Application/Entity/MiniResume.cs b/GDZZ.Application/Entity/MiniResume.cs
index 36400c3..7d1d71b 100644
--- a/GDZZ.Application/Entity/MiniResume.cs
+++ b/GDZZ.Application/Entity/MiniResume.cs
@@ -2,7 +2,7 @@
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
-using GDZZ.Application;
+using GDZZ.Application.Enum;
namespace GDZZ.Application.Entity
{
@@ -13,57 +13,61 @@ namespace GDZZ.Application.Entity
[Description("小程序招聘列表")]
public class MiniResume : DEntityBase
{
- ///
- /// 标题
- ///
- public string Title { get; set; }
- ///
- /// 要求
- ///
- public string Sak { get; set; }
- ///
- /// 详情
- ///
- public string Info { get; set; }
- ///
- /// 地区名
- ///
- public string RegionName { get; set; }
- ///
- /// 所属公司
- ///
- public long CompanyID { get; set; }
- ///
- /// 地区ID
- ///
- public long RegionID { get; set; }
- ///
- /// 经验
- ///
- public string Level { get; set; }
- ///
- /// 学历
- ///
- public string Record { get; set; }
- ///
- /// 公司名称
- ///
- public string CompanyName { get; set; }
- ///
- /// 待遇
- ///
- public string Salary { get; set; }
- ///
- /// 待遇ID
- ///
- public string SalaryID { get; set; }
- ///
- /// 地区ID合集
- ///
- public string RegionStrID { get; set; }
- ///
- /// 状态
- ///
- public ResumeStatusEnum Status { get; set; }
+ ///
+ /// 标题
+ ///
+ public string Title { get; set; }
+ ///
+ /// 要求
+ ///
+ public string Sak { get; set; }
+ ///
+ /// 详情
+ ///
+ public string Info { get; set; }
+ ///
+ /// 地区名
+ ///
+ public string RegionName { get; set; }
+ ///
+ /// 所属公司
+ ///
+ public long CompanyID { get; set; }
+ ///
+ /// 地区ID
+ ///
+ public long RegionID { get; set; }
+ ///
+ /// 经验
+ ///
+ public string Level { get; set; }
+ ///
+ /// 学历
+ ///
+ public string Record { get; set; }
+ ///
+ /// 公司名称
+ ///
+ public string CompanyName { get; set; }
+ ///
+ /// 待遇
+ ///
+ public string Salary { get; set; }
+ ///
+ /// 待遇ID
+ ///
+ public string SalaryID { get; set; }
+ ///
+ /// 地区ID合集
+ ///
+ public string RegionStrID { get; set; }
+ ///
+ /// 状态
+ ///
+ public ResumeStatusEnum Status { get; set; }
+ ///
+ /// 招聘类型
+ ///
+ public ResumeTypeEnum Types { get; set; }
}
}
\ No newline at end of file
diff --git a/GDZZ.Application/Entity/Position.cs b/GDZZ.Application/Entity/Position.cs
new file mode 100644
index 0000000..e44e08b
--- /dev/null
+++ b/GDZZ.Application/Entity/Position.cs
@@ -0,0 +1,27 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using GDZZ.Core.Entity;
+namespace GDZZ.Application.Entity
+{
+ ///
+ /// 职位表
+ ///
+ [SugarTable("mini_position")]
+ [Description("职位表")]
+ public class Position : DEntityBase
+ {
+ ///
+ /// 职位名称
+ ///
+ public string PositionName { get; set; }
+ ///
+ /// 职位等级
+ ///
+ public PositionEnum PositionLevel { get; set; }
+ ///
+ /// 父级
+ ///
+ public long ParentID { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/Enum/PositionEnum.cs b/GDZZ.Application/Enum/PositionEnum.cs
new file mode 100644
index 0000000..4759d71
--- /dev/null
+++ b/GDZZ.Application/Enum/PositionEnum.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application
+{
+ ///
+ ///
+ ///
+ public enum PositionEnum
+ {
+ ///
+ /// 顶级职业
+ ///
+ [Description("顶级职业")] JobList = 0,
+ ///
+ /// 父级职业
+ ///
+ [Description("父级职业")] Subitem = 1,
+ ///
+ /// 子级职业
+ ///
+ [Description("子级职业")] Grandson = 2,
+ }
+}
diff --git a/GDZZ.Application/Enum/ResumeTypeEnum.cs b/GDZZ.Application/Enum/ResumeTypeEnum.cs
new file mode 100644
index 0000000..bed5774
--- /dev/null
+++ b/GDZZ.Application/Enum/ResumeTypeEnum.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GDZZ.Application.Enum
+{
+ public enum ResumeTypeEnum
+ {
+ ///
+ /// 热招
+ ///
+ [Description("热招")] Hot = 0,
+
+ ///
+ /// 普招0
+ ///
+ [Description("普招")] Common = 1,
+ }
+}
diff --git a/GDZZ.Application/Enum/SalaryEnum.cs b/GDZZ.Application/Enum/SalaryEnum.cs
deleted file mode 100644
index c9dad69..0000000
--- a/GDZZ.Application/Enum/SalaryEnum.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace GDZZ.Application
-{
- ///
- ///
- ///
- public enum SalaryEnum
- {
-
- }
-}
diff --git a/GDZZ.Application/Enum/SystemConst.cs b/GDZZ.Application/Enum/SystemConst.cs
index a41869b..0cba508 100644
--- a/GDZZ.Application/Enum/SystemConst.cs
+++ b/GDZZ.Application/Enum/SystemConst.cs
@@ -44,6 +44,11 @@ namespace GDZZ.Application
///
public const string MINI_USERPHONECODE = "User_PhoneCode:";
+
+ ///
+ /// AccessToken
+ ///
+ public const string MINI_ACCESSTOKEN = "AccessToken:";
#endregion
}
}
diff --git a/GDZZ.Application/GDZZ.Application.xml b/GDZZ.Application/GDZZ.Application.xml
index a991d72..8815606 100644
--- a/GDZZ.Application/GDZZ.Application.xml
+++ b/GDZZ.Application/GDZZ.Application.xml
@@ -4,6 +4,26 @@
GDZZ.Application
+
+
+ 附件表
+
+
+
+
+ 文件名
+
+
+
+
+ 文件大小
+
+
+
+
+ 文件路径
+
+
余额表
@@ -249,34 +269,44 @@
小程序求职
-
+
- 职业名称
+ 期望工作地点
-
+
- 个人简介
+ 标志
-
+
- 期望工作地点
+ 学历
-
+
- 标志
+ 经验
-
+
- 电话
+ 薪资
-
+
- 头像
+ 职位
+
+
+
+
+ 预留手机
+
+
+
+
+ 年龄
@@ -529,6 +559,11 @@
状态
+
+
+ 招聘类型
+
+
套餐表
@@ -544,6 +579,26 @@
套餐名称
+
+
+ 职位表
+
+
+
+
+ 职位名称
+
+
+
+
+ 职位等级
+
+
+
+
+ 父级
+
+
推荐表
@@ -664,6 +719,26 @@
已成功
+
+
+
+
+
+
+
+ 顶级职业
+
+
+
+
+ 父级职业
+
+
+
+
+ 子级职业
+
+
取消
@@ -704,9 +779,14 @@
审核未通过
-
+
-
+ 热招
+
+
+
+
+ 普招0
@@ -739,6 +819,11 @@
小程序电话验证码
+
+
+ AccessToken
+
+
用户类型枚举
@@ -816,6 +901,11 @@
+
+
+ 缓存接口
+
+
@@ -844,6 +934,18 @@
+
+
+ 获取AccessToken
+
+
+
+
+
+ 设置AccessToken
+
+
+
发送验证码
@@ -880,6 +982,150 @@
用户id
返回6位邀请码
+
+
+ 上传文件
+
+
+
+
+
+
+
+
+ 附件管理服务
+
+
+
+
+ 分页查询附件管理
+
+
+
+
+
+
+ 增加附件管理
+
+
+
+
+
+
+
+ 获取附件
+
+
+
+
+
+
+ 删除附件管理
+
+
+
+
+
+
+ 更新附件管理
+
+
+
+
+
+
+ 获取附件管理
+
+
+
+
+
+
+ 获取附件管理列表
+
+
+
+
+
+
+ 附件管理输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 文件名
+
+
+
+
+ 文件大小
+
+
+
+
+ 文件路径
+
+
+
+
+ 附件管理输入参数
+
+
+
+
+ 文件名
+
+
+
+
+ 文件大小
+
+
+
+
+ 文件路径
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 附件管理输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 文件名
+
+
+
+
+ 文件大小
+
+
+
+
+ 文件路径
+
+
获取配置文件
@@ -909,6 +1155,18 @@
+
+
+ 获取AccessToken
+
+
+
+
+
+ 获取二维分享码
+
+
+
获取配置信息
@@ -1858,122 +2116,344 @@
-
+
- 聊天历史任务列表输出参数
+ 求职列表输出参数
-
+
主键Id
-
+
- 租户Id
+ 职业名称
-
+
- 名称
+ 个人简介
-
+
- 头像
+ 期望工作地点
-
+
- 类型
+ 标志
-
+
- 排序
+ 电话
-
+
- 消息条数
+ 头像
-
+
- 最后时间
+ 求职列表输入参数
-
+
- 最后消息
+ 标志
-
+
- 历史聊天列表输出参数
+ 职业名称
-
+
- 联系人ID
+ 期望工作地点
-
+
- 名称
+ 电话
-
+
- 头像
+ 学历
-
+
- 消息类型
+ 经验
-
+
- 索引
+ 薪资
-
+
- 未读消息数
+ 年龄
-
+
- 最新消息时间戳
+ 标志
-
+
- 最新消息内容
+ 职业名称
-
-
- 最新消息时间格式
-
-
-
+
- 聊天记录输出参数
+ 期望工作地点
-
+
- 聊天历史任务列表输入参数
+ 电话
-
+
- 名称
+ 学历
-
+
+
+ 经验
+
+
+
+
+ 薪资
+
+
+
+
+ 年龄
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 求职列表输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 职业名称
+
+
+
+
+ 个人简介
+
+
+
+
+ 期望工作地点
+
+
+
+
+ 标志
+
+
+
+
+ 电话
+
+
+
+
+ 头像
+
+
+
+
+ 求职列表服务
+
+
+
+
+ 分页查询求职列表
+
+
+
+
+
+
+ 增加求职列表
+
+
+
+
+
+
+ 删除求职列表
+
+
+
+
+
+
+ 更新求职列表
+
+
+
+
+
+
+ 获取求职列表
+
+
+
+
+
+
+ 获取求职列表列表
+
+
+
+
+
+
+ 聊天历史任务列表输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 租户Id
+
+
+
+
+ 名称
+
+
+
+
+ 头像
+
+
+
+
+ 类型
+
+
+
+
+ 排序
+
+
+
+
+ 消息条数
+
+
+
+
+ 最后时间
+
+
+
+
+ 最后消息
+
+
+
+
+ 历史聊天列表输出参数
+
+
+
+
+ 联系人ID
+
+
+
+
+ 名称
+
+
+
+
+ 头像
+
+
+
+
+ 消息类型
+
+
+
+
+ 索引
+
+
+
+
+ 未读消息数
+
+
+
+
+ 最新消息时间戳
+
+
+
+
+ 最新消息内容
+
+
+
+
+ 最新消息时间格式
+
+
+
+
+ 聊天记录输出参数
+
+
+
+
+ 聊天历史任务列表输入参数
+
+
+
+
+ 名称
+
+
+
头像
@@ -2402,6 +2882,16 @@
待遇
+
+
+ 状态
+
+
+
+
+ 招聘类型
+
+
主键Id
@@ -2497,6 +2987,11 @@
状态
+
+
+ 招聘类型
+
+
小程序招聘列表服务
@@ -2687,6 +3182,123 @@
+
+
+ 职位管理输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+ 职位名称
+
+
+
+
+ 职位等级
+
+
+
+
+ 父级
+
+
+
+
+ 职位管理输入参数
+
+
+
+
+ 职位名称
+
+
+
+
+ 职位等级
+
+
+
+
+ 父级
+
+
+
+
+ 主键Id
+
+
+
+
+ 主键Id
+
+
+
+
+ 职位管理输出参数
+
+
+
+
+ 主键Id
+
+
+
+
+
+
+
+
+
+ 职位管理服务
+
+
+
+
+ 分页查询职位管理
+
+
+
+
+
+
+ 增加职位管理
+
+
+
+
+
+
+ 删除职位管理
+
+
+
+
+
+
+ 更新职位管理
+
+
+
+
+
+
+ 获取职位管理
+
+
+
+
+
+
+ 获取职位管理列表
+
+
+
+
地区表输出参数
@@ -2798,6 +3410,12 @@
+
+
+ 查询地区列表
+
+
+
租户系统配置输出参数
@@ -2930,207 +3548,5 @@
-
-
- 求职列表输出参数
-
-
-
-
- 主键Id
-
-
-
-
- 职业名称
-
-
-
-
- 个人简介
-
-
-
-
- 期望工作地点
-
-
-
-
- 标志
-
-
-
-
- 电话
-
-
-
-
- 头像
-
-
-
-
- 求职列表输入参数
-
-
-
-
- 职业名称
-
-
-
-
- 个人简介
-
-
-
-
- 期望工作地点
-
-
-
-
- 标志
-
-
-
-
- 电话
-
-
-
-
- 头像
-
-
-
-
- 职业名称
-
-
-
-
- 个人简介
-
-
-
-
- 期望工作地点
-
-
-
-
- 标志
-
-
-
-
- 电话
-
-
-
-
- 头像
-
-
-
-
- 主键Id
-
-
-
-
- 主键Id
-
-
-
-
- 求职列表输出参数
-
-
-
-
- 主键Id
-
-
-
-
- 职业名称
-
-
-
-
- 个人简介
-
-
-
-
- 期望工作地点
-
-
-
-
- 标志
-
-
-
-
- 电话
-
-
-
-
- 头像
-
-
-
-
- 求职列表服务
-
-
-
-
- 分页查询求职列表
-
-
-
-
-
-
- 增加求职列表
-
-
-
-
-
-
- 删除求职列表
-
-
-
-
-
-
- 更新求职列表
-
-
-
-
-
-
- 获取求职列表
-
-
-
-
-
-
- 获取求职列表列表
-
-
-
-
diff --git a/GDZZ.Application/Help/CacheService.cs b/GDZZ.Application/Help/CacheService.cs
index 82df856..fd6ac4f 100644
--- a/GDZZ.Application/Help/CacheService.cs
+++ b/GDZZ.Application/Help/CacheService.cs
@@ -159,6 +159,20 @@ namespace GDZZ.Application.Help
return await _redisCache.GetAsync(cacheKey);
}
+ public async Task GetAccessTokenAsync()
+ {
+ string cacheKey = SystemConst.MINI_ACCESSTOKEN;
+ return await _redisCache.GetAsync(cacheKey);
+ }
+
+
+ public async Task SetAccessTokenAsync(string AccessToken)
+ {
+ string cacheKey = SystemConst.MINI_ACCESSTOKEN;
+ await _redisCache.SetAsync(cacheKey, AccessToken, TimeSpan.FromHours(2));
+ }
+
+
#endregion
}
}
diff --git a/GDZZ.Application/Help/ICacheService.cs b/GDZZ.Application/Help/ICacheService.cs
index 7d253c9..2d1131b 100644
--- a/GDZZ.Application/Help/ICacheService.cs
+++ b/GDZZ.Application/Help/ICacheService.cs
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
namespace GDZZ.Application.Help
{
+ ///
+ /// 缓存接口
+ ///
public interface ICacheService
{
#region 聊天接口
@@ -24,7 +27,6 @@ namespace GDZZ.Application.Help
#endregion
-
#region 用户信息
///
@@ -56,8 +58,21 @@ namespace GDZZ.Application.Help
///
Task GetVerifyCode(string Phone);
+ ///
+ /// 获取AccessToken
+ ///
+ ///
+ Task GetAccessTokenAsync();
+
+ ///
+ /// 设置AccessToken
+ ///
+ ///
+ Task SetAccessTokenAsync(string Access);
+
#endregion
+
}
}
diff --git a/GDZZ.Application/Help/TencentCloudSmsService.cs b/GDZZ.Application/Help/TencentCloudSmsService.cs
index b2e1b4f..94bfff1 100644
--- a/GDZZ.Application/Help/TencentCloudSmsService.cs
+++ b/GDZZ.Application/Help/TencentCloudSmsService.cs
@@ -28,11 +28,11 @@ namespace GDZZ.Application.Help
{
_appId = conf["tencentCloudSms:appId"];
if (string.IsNullOrEmpty(_appId))
- throw new ArgumentException($"{nameof(_appId)} must have a value");
+ throw new ArgumentException($"{nameof(_appId)} must have a Value");
_appKey = conf["tencentCloudSms:appKey"];
if (string.IsNullOrEmpty(_appKey))
- throw new ArgumentException($"{nameof(_appKey)} must have a value");
+ throw new ArgumentException($"{nameof(_appKey)} must have a Value");
_logger = loggerFactory.CreateLogger();
}
diff --git a/GDZZ.Application/Help/Utils.cs b/GDZZ.Application/Help/Utils.cs
index 1736041..afd597a 100644
--- a/GDZZ.Application/Help/Utils.cs
+++ b/GDZZ.Application/Help/Utils.cs
@@ -1,9 +1,16 @@
-using System;
+using Furion;
+using GDZZ.Core.Entity;
+using GDZZ.Core;
+using Microsoft.AspNetCore.Http;
+using SqlSugar;
+using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using Yitter.IdGenerator;
namespace GDZZ.Application.Help
{
@@ -131,5 +138,58 @@ namespace GDZZ.Application.Help
|| ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF)));
}
+
+ ///
+ /// 上传文件
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task UploadFile(IFormFile file, string pathType, FileLocation fileLocation)
+ {
+ var fileSizeKb = (long)(file.Length / 1024.0); // 文件大小KB
+ var originalFilename = file.FileName; // 文件原始名称
+ var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀
+
+ // 先存库获取Id
+ var id = YitIdHelper.NextId();
+ var newFile = new SysFile
+ {
+ Id = id,
+ FileLocation = (int)FileLocation.LOCAL,
+ FileBucket = FileLocation.LOCAL.ToString(),
+ FileObjectName = $"{YitIdHelper.NextId()}{fileSuffix}",
+ FileOriginName = originalFilename,
+ FileSuffix = fileSuffix.TrimStart('.'),
+ FileSizeKb = fileSizeKb.ToString(),
+ FilePath = pathType
+ };
+ newFile = await App.GetService().Insertable(newFile).ExecuteReturnEntityAsync();
+
+ var finalName = newFile.FileObjectName; // 生成文件的最终名称
+ if (fileLocation == FileLocation.LOCAL) // 本地存储
+ {
+ var filePath = Path.Combine(App.WebHostEnvironment.WebRootPath, pathType);
+ if (!Directory.Exists(filePath))
+ Directory.CreateDirectory(filePath);
+ using (var stream = File.Create(Path.Combine(filePath, finalName)))
+ {
+ await file.CopyToAsync(stream);
+ }
+ }
+ else if (fileLocation == FileLocation.ALIYUN) // 阿里云OSS
+ {
+ var filePath = pathType + finalName;
+ OSSClientUtil.DeletefileCode(filePath);
+
+ var stream = file.OpenReadStream();
+ OSSClientUtil.PushMedia(stream, filePath);
+ }
+ newFile.FileObjectName = finalName;
+ return new LiveFileOutput() { Id = finalName, FileUrl = "/" + pathType + "/" + finalName }; // 返回文件唯一标识
+ }
+
+
}
}
diff --git a/GDZZ.Application/Mapper/Mapper.cs b/GDZZ.Application/Mapper/Mapper.cs
index b35b692..4fd6dce 100644
--- a/GDZZ.Application/Mapper/Mapper.cs
+++ b/GDZZ.Application/Mapper/Mapper.cs
@@ -17,6 +17,17 @@ namespace GDZZ.Application.Mapper
config.ForType()
.Map(d => d.Id, s => s.CreatedUserId);
+
+ config.ForType ()
+ .Map(d => d.Value, s => s.Id)
+ .Map(d=>d.Label,s=>s.PositionName);
+
+
+ config.ForType()
+ .Map(d => d.Value, s => s.region_id)
+ .Map(d => d.Label, s => s.region_name);
}
+
+
}
}
diff --git a/GDZZ.Application/Service/Annex/AnnexService.cs b/GDZZ.Application/Service/Annex/AnnexService.cs
new file mode 100644
index 0000000..3f3d63f
--- /dev/null
+++ b/GDZZ.Application/Service/Annex/AnnexService.cs
@@ -0,0 +1,135 @@
+using GDZZ.Core;
+using Furion.DependencyInjection;
+using Furion.DynamicApiController;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+using GDZZ.Application.Entity;
+using GDZZ.Application.Help;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Options;
+using System;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 附件管理服务
+ ///
+ [ApiDescriptionSettings("Application",Name = "Annex", Order = 1)]
+ public class AnnexService : IAnnexService, IDynamicApiController, ITransient
+ {
+ private readonly SqlSugarRepository _rep;
+ private readonly UploadFileOptions _options;
+ public AnnexService(SqlSugarRepository rep, IOptions options)
+ {
+ this._options = options.Value;
+ _rep = rep;
+ }
+
+ ///
+ /// 分页查询附件管理
+ ///
+ ///
+ ///
+ [HttpGet("/Annex/page")]
+ public async Task Page([FromQuery] AnnexInput input)
+ {
+ var entities = await _rep.AsQueryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName == input.FileName)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.FileSize), u => u.FileSize == input.FileSize)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.FileUrl), u => u.FileUrl == input.FileUrl)
+ .ToPagedListAsync(input.PageNo, input.PageSize);
+ return entities.XnPagedResult();
+ }
+
+ ///
+ /// 增加附件管理
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("/Mini/Annex/add")]
+ public async Task Add(IFormFile file,string FileName)
+ {
+
+ var entity = await this._rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).FirstAsync();
+ var fileInfo =await Utils.UploadFile(file, this._options.Default.path, FileLocation.LOCAL);
+ if (fileInfo == null)
+ throw new Exception("文件上传失败!");
+ entity.FileName = FileName;
+ entity.FileSize = file.Length.ToString();
+ entity.FileUrl = fileInfo.FileUrl;
+ //查询
+
+ if(entity != null )
+ {
+ await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
+ }
+ else
+ {
+ await _rep.InsertAsync(entity);
+ }
+ return entity;
+ }
+
+
+ ///
+ /// 获取附件
+ ///
+ ///
+ ///
+ [HttpGet("/Mini/Annex/GetAnnex")]
+ public async Task GetAnnex()
+ {
+ return await _rep.Where(x=>x.CreatedUserId == UserManager.UserId).FirstAsync();
+ }
+
+
+
+ ///
+ /// 删除附件管理
+ ///
+ ///
+ ///
+ [HttpPost("/Annex/delete")]
+ public async Task Delete(DeleteAnnexInput input)
+ {
+ var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ await _rep.DeleteAsync(entity);
+ }
+
+ ///
+ /// 更新附件管理
+ ///
+ ///
+ ///
+ [HttpPost("/Annex/edit")]
+ public async Task Update(UpdateAnnexInput input)
+ {
+ var entity = input.Adapt();
+ await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync();
+ }
+
+ ///
+ /// 获取附件管理
+ ///
+ ///
+ ///
+ [HttpGet("/Annex/detail")]
+ public async Task Get([FromQuery] QueryeAnnexInput input)
+ {
+ return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ }
+
+ ///
+ /// 获取附件管理列表
+ ///
+ ///
+ ///
+ [HttpGet("/Annex/list")]
+ public async Task List([FromQuery] AnnexInput input)
+ {
+ return await _rep.ToListAsync();
+ }
+ }
+}
diff --git a/GDZZ.Application/Service/Annex/Dto/AnnexDto.cs b/GDZZ.Application/Service/Annex/Dto/AnnexDto.cs
new file mode 100644
index 0000000..be24787
--- /dev/null
+++ b/GDZZ.Application/Service/Annex/Dto/AnnexDto.cs
@@ -0,0 +1,32 @@
+using System;
+using GDZZ.Core;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 附件管理输出参数
+ ///
+ public class AnnexDto
+ {
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 文件名
+ ///
+ public string FileName { get; set; }
+
+ ///
+ /// 文件大小
+ ///
+ public string FileSize { get; set; }
+
+ ///
+ /// 文件路径
+ ///
+ public string FileUrl { get; set; }
+
+ }
+}
diff --git a/GDZZ.Application/Service/Annex/Dto/AnnexInput.cs b/GDZZ.Application/Service/Annex/Dto/AnnexInput.cs
new file mode 100644
index 0000000..ae91a9f
--- /dev/null
+++ b/GDZZ.Application/Service/Annex/Dto/AnnexInput.cs
@@ -0,0 +1,57 @@
+using GDZZ.Core;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 附件管理输入参数
+ ///
+ public class AnnexInput : PageInputBase
+ {
+ ///
+ /// 文件名
+ ///
+ public virtual string FileName { get; set; }
+
+ ///
+ /// 文件大小
+ ///
+ public virtual string FileSize { get; set; }
+
+ ///
+ /// 文件路径
+ ///
+ public virtual string FileUrl { get; set; }
+
+ }
+
+ public class AddAnnexInput : AnnexInput
+ {
+ }
+
+ public class DeleteAnnexInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class UpdateAnnexInput : AnnexInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class QueryeAnnexInput : DeleteAnnexInput
+ {
+
+ }
+}
diff --git a/GDZZ.Application/Service/Annex/Dto/AnnexOutput.cs b/GDZZ.Application/Service/Annex/Dto/AnnexOutput.cs
new file mode 100644
index 0000000..dcbcc15
--- /dev/null
+++ b/GDZZ.Application/Service/Annex/Dto/AnnexOutput.cs
@@ -0,0 +1,31 @@
+using System;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 附件管理输出参数
+ ///
+ public class AnnexOutput
+ {
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 文件名
+ ///
+ public string FileName { get; set; }
+
+ ///
+ /// 文件大小
+ ///
+ public string FileSize { get; set; }
+
+ ///
+ /// 文件路径
+ ///
+ public string FileUrl { get; set; }
+
+ }
+}
diff --git a/GDZZ.Application/Service/Annex/IAnnexService.cs b/GDZZ.Application/Service/Annex/IAnnexService.cs
new file mode 100644
index 0000000..06c979d
--- /dev/null
+++ b/GDZZ.Application/Service/Annex/IAnnexService.cs
@@ -0,0 +1,18 @@
+using GDZZ.Core;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+using GDZZ.Application.Entity;
+using Microsoft.AspNetCore.Http;
+
+namespace GDZZ.Application
+{
+ public interface IAnnexService
+ {
+ Task Add(IFormFile file, string FileName);
+ Task Delete(DeleteAnnexInput input);
+ Task Get([FromQuery] QueryeAnnexInput input);
+ Task List([FromQuery] AnnexInput input);
+ Task Page([FromQuery] AnnexInput input);
+ Task Update(UpdateAnnexInput input);
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/Service/Auth/AuthService.cs b/GDZZ.Application/Service/Auth/AuthService.cs
index 859d26b..73aceb8 100644
--- a/GDZZ.Application/Service/Auth/AuthService.cs
+++ b/GDZZ.Application/Service/Auth/AuthService.cs
@@ -34,11 +34,12 @@ namespace GDZZ.Application.Service.Auth
private readonly SqlSugarRepository CompanyRep;
private readonly SqlSugarRepository payTakeRep; //支付仓储
private readonly SqlSugarRepository _sysConfigRep; // 参数配置表仓储
- private readonly ISysCacheService _sysCacheService; //缓存
+
#endregion
#region 服务
- private readonly ICacheService cacheService; //
+ private readonly ISysCacheService _sysCacheService; //缓存
+ private readonly ICacheService cacheService;
private readonly WechatOAuth _wechatOAuth; //微信权限服务
private readonly IHttpContextAccessor _httpContextAccessor; //http服务
private readonly IEventPublisher _eventPublisher; //事件写入服务
@@ -71,7 +72,7 @@ namespace GDZZ.Application.Service.Auth
this._sysTenantRep = sysTenantRep;
this.Baseuser = Baseuser;
this._httpContextAccessor = httpContextAccessor;
- this.cacheService= cacheService;
+ this.cacheService = cacheService;
this.Self = Self;
this.payTakeRep = payTakeRep;
this._sysCacheService= sysCacheService;
@@ -93,7 +94,7 @@ namespace GDZZ.Application.Service.Auth
Company company = new Company();
//读取凭证
- var tokenModel = await this._wechatOAuth.GetAccessTokenAsync(phoneModel.code);
+ var tokenModel = await this._wechatOAuth.GetCode2SessionAsync(phoneModel.code);
//解析电话
var phoneInfo = MiniProgramUtil.AESDecrypt(phoneModel.encryptedDataStr, tokenModel.SessionKey, phoneModel.iv);
@@ -285,7 +286,7 @@ namespace GDZZ.Application.Service.Auth
//读取凭证
- var tokenModel = await this._wechatOAuth.GetAccessTokenAsync(phoneModel.code);
+ var tokenModel = await this._wechatOAuth.GetCode2SessionAsync(phoneModel.code);
var wxUser = await this.Baseuser.AsQueryable()
.Filter("TenantId", true)
@@ -331,7 +332,6 @@ namespace GDZZ.Application.Service.Auth
company = await this.CompanyRep.SingleAsync(x => x.Id == wxUser.CompanyID);
authUserOut.companyDto = company.Adapt();
-
}
if (wxUser.IsEmpty() || sysUser.IsEmpty())
throw Oops.Oh(ErrorCode.xg1002);
@@ -439,7 +439,42 @@ namespace GDZZ.Application.Service.Auth
{
return await this.cacheService.GetUserInfoAsync(UserManager.UserId);
}
+ ///
+ /// 获取AccessToken
+ ///
+ ///
+ [HttpGet("/Mini/GetAccessToken")]
+ public async Task GetAccessTokenAsync()
+ {
+ var value = await cacheService.GetAccessTokenAsync();
+ if(value == null)
+ {
+ var token = this._wechatOAuth.GetTokenAsync();
+ await cacheService.SetAccessTokenAsync(token.Result.AccessToken);
+ value = token.Result.AccessToken;
+ }
+ return value;
+ }
+
+ ///
+ /// 获取二维分享码
+ ///
+ ///
+ [HttpGet("/Mini/GetShareCode")]
+ public async Task GetShareCode(string scene, string page)
+ {
+ var value = await cacheService.GetAccessTokenAsync();
+ if (value == null)
+ {
+ var token = this._wechatOAuth.GetTokenAsync();
+ await cacheService.SetAccessTokenAsync(token.Result.AccessToken);
+ value = token.Result.AccessToken;
+ }
+ var res = await this._wechatOAuth.GetShareCodeAsync(value,scene, page);
+
+ return Convert.ToBase64String(res);
+ }
diff --git a/GDZZ.Application/Service/JobHunt/Dto/JobHuntDto.cs b/GDZZ.Application/Service/JobHunt/Dto/JobHuntDto.cs
index caede31..acc88c2 100644
--- a/GDZZ.Application/Service/JobHunt/Dto/JobHuntDto.cs
+++ b/GDZZ.Application/Service/JobHunt/Dto/JobHuntDto.cs
@@ -1,7 +1,7 @@
using System;
using GDZZ.Core;
-namespace Magic.Application
+namespace GDZZ.Application
{
///
/// 求职列表输出参数
diff --git a/GDZZ.Application/Service/JobHunt/Dto/JobHuntInput.cs b/GDZZ.Application/Service/JobHunt/Dto/JobHuntInput.cs
index a67ef6d..4d06054 100644
--- a/GDZZ.Application/Service/JobHunt/Dto/JobHuntInput.cs
+++ b/GDZZ.Application/Service/JobHunt/Dto/JobHuntInput.cs
@@ -2,83 +2,109 @@
using System;
using System.ComponentModel.DataAnnotations;
-namespace Magic.Application
+namespace GDZZ.Application
{
///
/// 求职列表输入参数
///
public class JobHuntInput : PageInputBase
{
+
///
- /// 职业名称
+ /// 标志
///
- public virtual string Career { get; set; }
-
+ public virtual string Tags { get; set; }
+
///
- /// 个人简介
+ /// 职业名称
///
- public virtual string Info { get; set; }
-
+ public virtual string Position { get; set; }
+
+
///
/// 期望工作地点
///
public virtual string Address { get; set; }
-
+
+
///
- /// 标志
+ /// 电话
///
- public virtual string Tags { get; set; }
-
+ public virtual string Phone { get; set; }
+
///
- /// 电话
+ /// 学历
///
- public virtual string phone { get; set; }
-
+ public virtual string Record { get; set; }
///
- /// 头像
+ /// 经验
///
- public virtual string Logo { get; set; }
-
+ public virtual string Experience { get; set; }
+
+ ///
+ /// 薪资
+ ///
+ public virtual string Salary { get; set; }
+
+ ///
+ /// 年龄
+ ///
+ public virtual string AgeValue { get; set; }
+
}
- public class AddJobHuntInput : JobHuntInput
+ public class AddJobHuntInput: JobHuntInput
{
+
///
- /// 职业名称
+ /// 标志
///
- [Required(ErrorMessage = "职业名称不能为空")]
- public override string Career { get; set; }
-
+ [Required(ErrorMessage = "标志不能为空")]
+ public override string Tags { get; set; }
+
///
- /// 个人简介
+ /// 职业名称
///
- [Required(ErrorMessage = "个人简介不能为空")]
- public override string Info { get; set; }
-
+ [Required(ErrorMessage = "职业名称不能为空")]
+ public override string Position { get; set; }
+
+
///
/// 期望工作地点
///
[Required(ErrorMessage = "期望工作地点不能为空")]
public override string Address { get; set; }
-
- ///
- /// 标志
- ///
- [Required(ErrorMessage = "标志不能为空")]
- public override string Tags { get; set; }
-
+
+
///
/// 电话
///
[Required(ErrorMessage = "电话不能为空")]
- public override string phone { get; set; }
-
+ public override string Phone { get; set; }
+
///
- /// 头像
+ /// 学历
///
- [Required(ErrorMessage = "头像不能为空")]
- public override string Logo { get; set; }
-
+ [Required(ErrorMessage = "学历不能为空")]
+ public override string Record { get; set; }
+ ///
+ /// 经验
+ ///
+ [Required(ErrorMessage = "经验不能为空")]
+ public override string Experience { get; set; }
+
+ ///
+ /// 薪资
+ ///
+ [Required(ErrorMessage = "薪资不能为空")]
+ public override string Salary { get; set; }
+
+ ///
+ /// 年龄
+ ///
+ [Required(ErrorMessage = "年龄不能为空")]
+ public override string AgeValue { get; set; }
+
}
public class DeleteJobHuntInput
diff --git a/GDZZ.Application/Service/JobHunt/Dto/JobHuntOutput.cs b/GDZZ.Application/Service/JobHunt/Dto/JobHuntOutput.cs
index cc69373..ce6bbd5 100644
--- a/GDZZ.Application/Service/JobHunt/Dto/JobHuntOutput.cs
+++ b/GDZZ.Application/Service/JobHunt/Dto/JobHuntOutput.cs
@@ -1,6 +1,6 @@
using System;
-namespace Magic.Application
+namespace GDZZ.Application
{
///
/// 求职列表输出参数
diff --git a/GDZZ.Application/Service/JobHunt/IJobHuntService.cs b/GDZZ.Application/Service/JobHunt/IJobHuntService.cs
index 04a02c5..c16733e 100644
--- a/GDZZ.Application/Service/JobHunt/IJobHuntService.cs
+++ b/GDZZ.Application/Service/JobHunt/IJobHuntService.cs
@@ -2,7 +2,9 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using GDZZ.Application.Entity;
-namespace Magic.Application
+using Microsoft.AspNetCore.Http;
+
+namespace GDZZ.Application
{
public interface IJobHuntService
{
@@ -10,7 +12,7 @@ namespace Magic.Application
Task Delete(DeleteJobHuntInput input);
Task Get([FromQuery] QueryeJobHuntInput input);
Task List([FromQuery] JobHuntInput input);
- Task Page([FromQuery] JobHuntInput input);
+ //Task Page([FromQuery] JobHuntInput input);
Task Update(UpdateJobHuntInput input);
}
}
\ No newline at end of file
diff --git a/GDZZ.Application/Service/JobHunt/JobHuntService.cs b/GDZZ.Application/Service/JobHunt/JobHuntService.cs
index 4b7fb81..ce78402 100644
--- a/GDZZ.Application/Service/JobHunt/JobHuntService.cs
+++ b/GDZZ.Application/Service/JobHunt/JobHuntService.cs
@@ -3,13 +3,11 @@ 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;
-namespace Magic.Application
+namespace GDZZ.Application
{
///
/// 求职列表服务
@@ -34,12 +32,7 @@ namespace Magic.Application
public async Task Page([FromQuery] JobHuntInput input)
{
var entities = await _rep.AsQueryable()
- .WhereIF(!string.IsNullOrWhiteSpace(input.Career), u => u.Career == input.Career)
- .WhereIF(!string.IsNullOrWhiteSpace(input.Info), u => u.Info == input.Info)
- .WhereIF(!string.IsNullOrWhiteSpace(input.Address), u => u.Address == input.Address)
.WhereIF(!string.IsNullOrWhiteSpace(input.Tags), u => u.Tags == input.Tags)
- .WhereIF(!string.IsNullOrWhiteSpace(input.phone), u => u.phone == input.phone)
- .WhereIF(!string.IsNullOrWhiteSpace(input.Logo), u => u.Logo == input.Logo)
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
@@ -50,6 +43,7 @@ namespace Magic.Application
///
///
[HttpPost("/JobHunt/add")]
+ [AllowAnonymous]
public async Task Add(AddJobHuntInput input)
{
var entity = input.Adapt();
@@ -62,6 +56,7 @@ namespace Magic.Application
///
///
[HttpPost("/JobHunt/delete")]
+ [AllowAnonymous]
public async Task Delete(DeleteJobHuntInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
@@ -74,6 +69,7 @@ namespace Magic.Application
///
///
[HttpPost("/JobHunt/edit")]
+ [AllowAnonymous]
public async Task Update(UpdateJobHuntInput input)
{
var entity = input.Adapt();
@@ -86,6 +82,7 @@ namespace Magic.Application
///
///
[HttpGet("/JobHunt/detail")]
+ [AllowAnonymous]
public async Task Get([FromQuery] QueryeJobHuntInput input)
{
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
@@ -97,9 +94,13 @@ namespace Magic.Application
///
///
[HttpGet("/JobHunt/list")]
+ [AllowAnonymous]
public async Task List([FromQuery] JobHuntInput input)
{
- return await _rep.ToListAsync();
+ return await _rep.AsQueryable()
+ .Where(x=>x.CreatedUserId == UserManager.UserId)
+ .OrderByDescending(x=>x.Tags)
+ .ToListAsync();
}
}
}
diff --git a/GDZZ.Application/Service/MiniResume/Dto/MiniResumeInput.cs b/GDZZ.Application/Service/MiniResume/Dto/MiniResumeInput.cs
index abfc97c..3243162 100644
--- a/GDZZ.Application/Service/MiniResume/Dto/MiniResumeInput.cs
+++ b/GDZZ.Application/Service/MiniResume/Dto/MiniResumeInput.cs
@@ -1,4 +1,6 @@
-using GDZZ.Core;
+using Furion.DataValidation;
+using GDZZ.Application.Enum;
+using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
@@ -54,6 +56,17 @@ namespace GDZZ.Application
///
public string SalaryID { get; set; }
+ ///
+ /// 状态
+ ///
+ public ResumeStatusEnum Status { get; set; }
+
+ ///
+ /// 招聘类型
+ ///
+ [DataValidation(AllowNullValue = true)]
+ public ResumeTypeEnum? TypeEnum { get; set; }
+
}
public class AddMiniResumeInput : MiniResumeInput
diff --git a/GDZZ.Application/Service/MiniResume/Dto/MiniResumeOutput.cs b/GDZZ.Application/Service/MiniResume/Dto/MiniResumeOutput.cs
index 1c79282..b7d0674 100644
--- a/GDZZ.Application/Service/MiniResume/Dto/MiniResumeOutput.cs
+++ b/GDZZ.Application/Service/MiniResume/Dto/MiniResumeOutput.cs
@@ -1,4 +1,5 @@
using GDZZ.Application;
+using GDZZ.Application.Enum;
using System;
namespace GDZZ.Application
@@ -88,5 +89,9 @@ namespace GDZZ.Application
/// 状态
///
public ResumeStatusEnum Status { get; set; }
+ ///
+ /// 招聘类型
+ ///
+ public ResumeTypeEnum? TypeEnum { get; set; }
}
}
diff --git a/GDZZ.Application/Service/MiniResume/IMiniResumeService.cs b/GDZZ.Application/Service/MiniResume/IMiniResumeService.cs
index 53bf61c..1eedd5b 100644
--- a/GDZZ.Application/Service/MiniResume/IMiniResumeService.cs
+++ b/GDZZ.Application/Service/MiniResume/IMiniResumeService.cs
@@ -8,8 +8,6 @@ namespace GDZZ.Application
{
Task Add(AddMiniResumeInput input);
Task Delete(DeleteMiniResumeInput input);
-
-
Task SearchRetFun([FromQuery] MiniResumeInput input);
Task Update(UpdateMiniResumeInput input);
}
diff --git a/GDZZ.Application/Service/MiniResume/MiniResumeService.cs b/GDZZ.Application/Service/MiniResume/MiniResumeService.cs
index 1bba417..cfc2dcb 100644
--- a/GDZZ.Application/Service/MiniResume/MiniResumeService.cs
+++ b/GDZZ.Application/Service/MiniResume/MiniResumeService.cs
@@ -56,15 +56,15 @@ namespace GDZZ.Application
[AllowAnonymous]
public async Task GetResumeList([FromQuery] MiniResumeInput input)
{
- var companys = await this.CompanyRep.AsQueryable().WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Name.Contains(input.SearchValue)).FirstAsync();
var entities = await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.RegionName), u => u.RegionName.Contains(input.RegionName.Trim()))
- .WhereIF(!companys.IsNullOrZero(), u => u.Title.Contains(input.SearchValue) || u.CompanyID == companys.Id)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Title.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.Salary), u => u.Salary.Contains(input.Salary.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.Record), u => u.Record.Contains(input.Record.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.Level), u => u.Record.Contains(input.Level.Trim()))
- .Where(u => u.Status == ResumeStatusEnum.Release)
+ .WhereIF(!input.TypeEnum.IsEmpty(), u => u.Types == input.TypeEnum)
+ .Where(u => u.Status == input.Status)
.LeftJoin((u, y) => u.CompanyID == y.Id) //关联公司信息
.Select((u, y) => new MiniResumeOutput
{
@@ -80,19 +80,16 @@ namespace GDZZ.Application
RegionName = u.RegionName,
Record = u.Record,
Level = u.Level,
- Status = u.Status
+ Status = u.Status,
+ TypeEnum = u.Types
}).MergeTable()
+ .OrderBy(u => u.TypeEnum)
.OrderByDescending(u => u.Time)
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
-
-
-
-
-
///
/// 初始化
///
diff --git a/GDZZ.Application/Service/Position/Dto/PositionDto.cs b/GDZZ.Application/Service/Position/Dto/PositionDto.cs
new file mode 100644
index 0000000..3c0c361
--- /dev/null
+++ b/GDZZ.Application/Service/Position/Dto/PositionDto.cs
@@ -0,0 +1,32 @@
+using System;
+using GDZZ.Core;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 职位管理输出参数
+ ///
+ public class PositionDto
+ {
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 职位名称
+ ///
+ public string PositionName { get; set; }
+
+ ///
+ /// 职位等级
+ ///
+ public int PositionLevel { get; set; }
+
+ ///
+ /// 父级
+ ///
+ public long ParentID { get; set; }
+
+ }
+}
diff --git a/GDZZ.Application/Service/Position/Dto/PositionInput.cs b/GDZZ.Application/Service/Position/Dto/PositionInput.cs
new file mode 100644
index 0000000..523d60b
--- /dev/null
+++ b/GDZZ.Application/Service/Position/Dto/PositionInput.cs
@@ -0,0 +1,57 @@
+using GDZZ.Core;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 职位管理输入参数
+ ///
+ public class PositionInput : PageInputBase
+ {
+ ///
+ /// 职位名称
+ ///
+ public virtual string PositionName { get; set; }
+
+ ///
+ /// 职位等级
+ ///
+ public virtual int PositionLevel { get; set; }
+
+ ///
+ /// 父级
+ ///
+ public virtual long ParentID { get; set; }
+
+ }
+
+ public class AddPositionInput : PositionInput
+ {
+ }
+
+ public class DeletePositionInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class UpdatePositionInput : PositionInput
+ {
+ ///
+ /// 主键Id
+ ///
+ [Required(ErrorMessage = "主键Id不能为空")]
+ public long Id { get; set; }
+
+ }
+
+ public class QueryePositionInput : DeletePositionInput
+ {
+
+ }
+}
diff --git a/GDZZ.Application/Service/Position/Dto/PositionOutput.cs b/GDZZ.Application/Service/Position/Dto/PositionOutput.cs
new file mode 100644
index 0000000..5b4c22a
--- /dev/null
+++ b/GDZZ.Application/Service/Position/Dto/PositionOutput.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace GDZZ.Application
+{
+ ///
+ /// 职位管理输出参数
+ ///
+ public class PositionOutput
+ {
+ ///
+ /// 主键Id
+ ///
+ public string region_id { get; set; }
+
+ ///
+ ///
+ ///
+ public long ID { get; set; }
+
+ public string Label { get; set; }
+
+ public string Value { get; set; }
+
+ public List Children { get; set; }
+
+
+ }
+
+}
diff --git a/GDZZ.Application/Service/Position/IPositionService.cs b/GDZZ.Application/Service/Position/IPositionService.cs
new file mode 100644
index 0000000..aef2806
--- /dev/null
+++ b/GDZZ.Application/Service/Position/IPositionService.cs
@@ -0,0 +1,18 @@
+using GDZZ.Core;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+using GDZZ.Application.Entity;
+using System.Collections.Generic;
+
+namespace GDZZ.Application
+{
+ public interface IPositionService
+ {
+ Task Add(AddPositionInput input);
+ Task Delete(DeletePositionInput input);
+ Task Get([FromQuery] QueryePositionInput input);
+ Task> List([FromQuery] PositionInput input);
+ Task Page([FromQuery] PositionInput input);
+ Task Update(UpdatePositionInput input);
+ }
+}
\ No newline at end of file
diff --git a/GDZZ.Application/Service/Position/PositionService.cs b/GDZZ.Application/Service/Position/PositionService.cs
new file mode 100644
index 0000000..d208264
--- /dev/null
+++ b/GDZZ.Application/Service/Position/PositionService.cs
@@ -0,0 +1,113 @@
+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
+{
+ ///
+ /// 职位管理服务
+ ///
+ [ApiDescriptionSettings("Application", Name = "Position", Order = 1)]
+ public class PositionService : IPositionService, IDynamicApiController, ITransient
+ {
+ private readonly SqlSugarRepository _rep;
+
+ public PositionService(SqlSugarRepository rep)
+ {
+ _rep = rep;
+ }
+
+ ///
+ /// 分页查询职位管理
+ ///
+ ///
+ ///
+ [HttpGet("/Position/page")]
+ public async Task Page([FromQuery] PositionInput input)
+ {
+ var entities = await _rep.AsQueryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(input.PositionName), u => u.PositionName == input.PositionName)
+ .ToPagedListAsync(input.PageNo, input.PageSize);
+ return entities.XnPagedResult();
+ }
+
+ ///
+ /// 增加职位管理
+ ///
+ ///
+ ///
+ [HttpPost("/Position/add")]
+ public async Task Add(AddPositionInput input)
+ {
+ var entity = input.Adapt();
+ await _rep.InsertAsync(entity);
+ }
+
+ ///
+ /// 删除职位管理
+ ///
+ ///
+ ///
+ [HttpPost("/Position/delete")]
+ public async Task Delete(DeletePositionInput input)
+ {
+ var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ await _rep.DeleteAsync(entity);
+ }
+
+ ///
+ /// 更新职位管理
+ ///
+ ///
+ ///
+ [HttpPost("/Position/edit")]
+ public async Task Update(UpdatePositionInput input)
+ {
+ var entity = input.Adapt();
+ await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
+ }
+
+ ///
+ /// 获取职位管理
+ ///
+ ///
+ ///
+ [HttpGet("/Position/detail")]
+ public async Task Get([FromQuery] QueryePositionInput input)
+ {
+ return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ }
+
+ ///
+ /// 获取职位管理列表
+ ///
+ ///
+ ///
+ [HttpGet("/Position/list")]
+ public async Task> List([FromQuery] PositionInput input)
+ {;
+
+ var allProvinces = await _rep.AsQueryable().ToListAsync();
+ //先查询 省级别
+ var JobList = allProvinces.Where(x => x.PositionLevel == PositionEnum.JobList).ToList().Adapt>();
+
+ foreach (var province in JobList)
+ {
+ province.Children = allProvinces.Where(r => r.PositionLevel == PositionEnum.Subitem && r.ParentID == province.ID).ToList().Adapt>();
+ foreach (var city in province.Children)
+ {
+ city.Children = allProvinces.Where(r => r.PositionLevel == PositionEnum.Grandson && r.ParentID == city.ID).ToList().Adapt>()??null;
+ }
+ }
+ return JobList;
+ }
+ }
+}
diff --git a/GDZZ.Application/Service/SysRegion/Dto/SysRegionOutput.cs b/GDZZ.Application/Service/SysRegion/Dto/SysRegionOutput.cs
index fc05fb8..266326e 100644
--- a/GDZZ.Application/Service/SysRegion/Dto/SysRegionOutput.cs
+++ b/GDZZ.Application/Service/SysRegion/Dto/SysRegionOutput.cs
@@ -8,6 +8,9 @@ namespace GDZZ.Application
///
public class SysRegionOutput
{
+
+
+
///
/// 主键Id
///
diff --git a/GDZZ.Application/Service/SysRegion/SysRegionService.cs b/GDZZ.Application/Service/SysRegion/SysRegionService.cs
index 9f100ae..1875e20 100644
--- a/GDZZ.Application/Service/SysRegion/SysRegionService.cs
+++ b/GDZZ.Application/Service/SysRegion/SysRegionService.cs
@@ -44,13 +44,36 @@ namespace GDZZ.Application
province.children = allRegions.Where(r => r.region_level == 2 && r.region_parent_id == province.region_id).ToList().Adapt>();
foreach (var city in province.children)
{
+ //rm - RazorFirst
city.children = allRegions.Where(r => r.region_level == 3 && r.region_parent_id == city.region_id).ToList().Adapt>();
}
}
return provinces;
}
+ ///
+ /// 查询地区列表
+ ///
+ ///
+ [HttpGet("/Mini/GetAddressList")]
+ [AllowAnonymous]
+ public async Task> GetAddressList()
+ {
+ //先查询 省级别
+ var allRegions = await _rep.AsQueryable().ToListAsync();
+ var provinces = allRegions.Where(x => x.region_level == 1).ToList().Adapt>();
+ foreach (var province in provinces)
+ {
+ province.Children = allRegions.Where(r => r.region_level == 2 && r.region_parent_id == province.region_id).ToList().Adapt>();
+ foreach (var city in province.Children)
+ {
+ //rm - RazorFirst
+ city.Children = allRegions.Where(r => r.region_level == 3 && r.region_parent_id == city.region_id).ToList().Adapt>();
+ }
+ }
+ return provinces;
+ }
}
}
diff --git a/GDZZ.Application/Startup.cs b/GDZZ.Application/Startup.cs
index 5d94e10..8a76310 100644
--- a/GDZZ.Application/Startup.cs
+++ b/GDZZ.Application/Startup.cs
@@ -1,4 +1,5 @@
using Furion;
+using Mapster;
using Microsoft.Extensions.DependencyInjection;
namespace GDZZ.Application;
@@ -7,6 +8,6 @@ public class Startup : AppStartup
{
public void ConfigureServices(IServiceCollection services)
{
-
+
}
}
diff --git a/GDZZ.Core/GDZZ.Core.xml b/GDZZ.Core/GDZZ.Core.xml
index 9f7f8e8..ade3d7d 100644
--- a/GDZZ.Core/GDZZ.Core.xml
+++ b/GDZZ.Core/GDZZ.Core.xml
@@ -3666,7 +3666,7 @@
-
+
换取JSCodeSessionKey
@@ -3693,7 +3693,12 @@
获取凭证
-
+
+
+
+
+ 获取二维码
+
diff --git a/GDZZ.Core/OAuth/IWechatOAuth.cs b/GDZZ.Core/OAuth/IWechatOAuth.cs
index 5b9d957..e8c1139 100644
--- a/GDZZ.Core/OAuth/IWechatOAuth.cs
+++ b/GDZZ.Core/OAuth/IWechatOAuth.cs
@@ -4,10 +4,11 @@ namespace GDZZ.Core;
public interface IWechatOAuth
{
- Task GetAccessTokenAsync(string code, string state = "");
+ Task GetCode2SessionAsync(string code, string state = "");
string GetAuthorizeUrl(string state = "");
Task GetUserInfoAsync(string accessToken, string openId);
Task GetRefreshTokenAsync(string refreshToken);
Task GetTokenAsync();
+ Task GetShareCodeAsync(string access_token, string scene, string page);
}
diff --git a/GDZZ.Core/OAuth/WechatOAuth.cs b/GDZZ.Core/OAuth/WechatOAuth.cs
index 72b4bdc..14c9baf 100644
--- a/GDZZ.Core/OAuth/WechatOAuth.cs
+++ b/GDZZ.Core/OAuth/WechatOAuth.cs
@@ -1,6 +1,7 @@
using Furion.DependencyInjection;
using Furion.FriendlyException;
using Furion.RemoteRequest.Extensions;
+using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using SqlSugar;
@@ -18,6 +19,8 @@ public class WechatOAuth : IWechatOAuth, ISingleton
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 string _getAccessToken = "https://api.weixin.qq.com/cgi-bin/token";
+ private readonly string _getShareCode = "https://api.weixin.qq.com/wxa/getwxacodeunlimit";
private readonly ThirdParty _oauthConfig;
@@ -52,7 +55,7 @@ public class WechatOAuth : IWechatOAuth, ISingleton
///
///
///
- public async Task GetAccessTokenAsync(string code, string state = "")
+ public async Task GetCode2SessionAsync(string code, string state = "")
{
var param = new Dictionary()
{
@@ -110,21 +113,35 @@ public class WechatOAuth : IWechatOAuth, ISingleton
///
/// 获取凭证
///
- ///
///
public async Task GetTokenAsync()
{
var param = new Dictionary()
{
- ["code"] = "client_credential",
+ ["grant_type"] = "client_credential",
["appid"] = _oauthConfig.app_id,
["secret"] = _oauthConfig.app_key,
};
- var refreshTokenModel = await $"{_assessToken}?{param.ToQueryString()}".GetAsAsync();
+ var refreshTokenModel = await $"{_getAccessToken}?{param.ToQueryString()}".GetAsAsync();
if (refreshTokenModel.HasError())
throw Oops.Oh($"{refreshTokenModel.Errmsg}");
return refreshTokenModel;
}
+ ///
+ /// 获取二维码
+ ///
+ ///
+ public async Task GetShareCodeAsync(string access_token, string scene , string page = "")
+ {
+ var param = new Dictionary()
+ {
+ ["access_token"] = access_token
+ };
+ var refreshTokenModel = await $"{_getShareCode}?{param.ToQueryString()}".SetBody(new { page=page,scene=scene }, "application/json").PostAsByteArrayAsync();
+ if (!refreshTokenModel.IsFixedSize)
+ throw Oops.Oh($"{refreshTokenModel.SyncRoot}");
+ return refreshTokenModel;
+ }
}
diff --git a/GDZZ.Core/Service/OAuth/SysOauthService.cs b/GDZZ.Core/Service/OAuth/SysOauthService.cs
index fb177f4..fa64a8b 100644
--- a/GDZZ.Core/Service/OAuth/SysOauthService.cs
+++ b/GDZZ.Core/Service/OAuth/SysOauthService.cs
@@ -53,7 +53,7 @@ public class SysOauthService : ISysOauthService, IDynamicApiController, ITransie
{
if (!string.IsNullOrEmpty(error_description))
throw Oops.Oh(error_description);
- var accessTokenModel = await _wechatOAuth.GetAccessTokenAsync(code, state);
+ var accessTokenModel = await _wechatOAuth.GetCode2SessionAsync(code, state);
return accessTokenModel;
}
diff --git a/GDZZ.Web.Core/Startup.cs b/GDZZ.Web.Core/Startup.cs
index 71f4bbb..88f2e9f 100644
--- a/GDZZ.Web.Core/Startup.cs
+++ b/GDZZ.Web.Core/Startup.cs
@@ -26,6 +26,7 @@ using Senparc.Weixin.WxOpen.Containers;
using Senparc.Weixin.Sample.CommonService.MessageHandlers.WebSocket;
using Senparc.Weixin.AspNet.RegisterServices;
using Senparc.WebSocket;
+using Mapster;
namespace GDZZ.Web.Core;
@@ -41,6 +42,7 @@ public class Startup : AppStartup
public void ConfigureServices(IServiceCollection services)
{
+ TypeAdapterConfig.GlobalSettings.Default.PreserveReference(true);
services.AddBStyle(m => m.UseDefault());
services.AddConfigurableOptions();
services.AddConfigurableOptions();
@@ -163,7 +165,7 @@ public class Startup : AppStartup
app.UseResponseCompression();
app.UseInject(string.Empty);
-
+
app.UseEndpoints(endpoints =>
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473588497457221.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473588497457221.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473588497457221.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473606734028869.jpg b/GDZZ.Web.Entry/wwwroot/Upload/Default/473606734028869.jpg
new file mode 100644
index 0000000..e82ccd5
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473606734028869.jpg differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473607919247430.jpg b/GDZZ.Web.Entry/wwwroot/Upload/Default/473607919247430.jpg
new file mode 100644
index 0000000..e82ccd5
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473607919247430.jpg differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473608933707846.jpg b/GDZZ.Web.Entry/wwwroot/Upload/Default/473608933707846.jpg
new file mode 100644
index 0000000..e82ccd5
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473608933707846.jpg differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473609784066118.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473609784066118.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473609784066118.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473610137641030.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473610137641030.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473610137641030.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473639691698245.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473639691698245.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473639691698245.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473639768662086.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473639768662086.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473639768662086.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473641799442502.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473641799442502.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473641799442502.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473643701809222.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473643701809222.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473643701809222.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473644909707334.pdf b/GDZZ.Web.Entry/wwwroot/Upload/Default/473644909707334.pdf
new file mode 100644
index 0000000..8df6519
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473644909707334.pdf differ
diff --git a/GDZZ.Web.Entry/wwwroot/Upload/Default/473647202975814.jpg b/GDZZ.Web.Entry/wwwroot/Upload/Default/473647202975814.jpg
new file mode 100644
index 0000000..e0dde7a
Binary files /dev/null and b/GDZZ.Web.Entry/wwwroot/Upload/Default/473647202975814.jpg differ