From 44693ac92de058c9bda5138dd9d60672116b30a3 Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Wed, 1 Feb 2023 23:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BA=A7=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GDZZ.Application/Entity/JobHunter.cs | 27 - GDZZ.Application/Entity/JobhuntMessage.cs | 47 -- GDZZ.Application/Entity/RecruitMessage.cs | 63 -- GDZZ.Application/Entity/SysArea.cs | 24 - GDZZ.Application/GDZZ.Application.xml | 761 ------------------ .../Service/JobHunter/Dto/JobHunterDto.cs | 32 - .../Service/JobHunter/Dto/JobHunterInput.cs | 57 -- .../Service/JobHunter/Dto/JobHunterOutput.cs | 31 - .../Service/JobHunter/IJobHunterService.cs | 16 - .../Service/JobHunter/JobHunterService.cs | 96 --- .../JobhuntMessage/Dto/JobhuntMessageDto.cs | 57 -- .../JobhuntMessage/Dto/JobhuntMessageInput.cs | 100 --- .../Dto/JobhuntMessageOutput.cs | 56 -- .../JobhuntMessage/IJobhuntMessageService.cs | 16 - .../JobhuntMessage/JobhuntMessageService.cs | 99 --- .../RecruitMessage/Dto/RecruitMessageDto.cs | 77 -- .../RecruitMessage/Dto/RecruitMessageInput.cs | 114 --- .../Dto/RecruitMessageOutput.cs | 76 -- .../RecruitMessage/IRecruitMessageService.cs | 16 - .../RecruitMessage/RecruitMessageService.cs | 100 --- GDZZ.Application/Service/Test/ITestService.cs | 12 - GDZZ.Application/Service/Test/TestService.cs | 80 -- GDZZ.Core/Enum/ErrorCode.cs | 8 +- GDZZ.Core/GDZZ.Core.xml | 5 + GDZZ.Core/Service/Auth/AuthService.cs | 5 + GDZZ.Core/Service/Emp/SysEmpService.cs | 13 +- 26 files changed, 27 insertions(+), 1961 deletions(-) delete mode 100644 GDZZ.Application/Entity/JobHunter.cs delete mode 100644 GDZZ.Application/Entity/JobhuntMessage.cs delete mode 100644 GDZZ.Application/Entity/RecruitMessage.cs delete mode 100644 GDZZ.Application/Entity/SysArea.cs delete mode 100644 GDZZ.Application/Service/JobHunter/Dto/JobHunterDto.cs delete mode 100644 GDZZ.Application/Service/JobHunter/Dto/JobHunterInput.cs delete mode 100644 GDZZ.Application/Service/JobHunter/Dto/JobHunterOutput.cs delete mode 100644 GDZZ.Application/Service/JobHunter/IJobHunterService.cs delete mode 100644 GDZZ.Application/Service/JobHunter/JobHunterService.cs delete mode 100644 GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageDto.cs delete mode 100644 GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageInput.cs delete mode 100644 GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageOutput.cs delete mode 100644 GDZZ.Application/Service/JobhuntMessage/IJobhuntMessageService.cs delete mode 100644 GDZZ.Application/Service/JobhuntMessage/JobhuntMessageService.cs delete mode 100644 GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageDto.cs delete mode 100644 GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageInput.cs delete mode 100644 GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageOutput.cs delete mode 100644 GDZZ.Application/Service/RecruitMessage/IRecruitMessageService.cs delete mode 100644 GDZZ.Application/Service/RecruitMessage/RecruitMessageService.cs delete mode 100644 GDZZ.Application/Service/Test/ITestService.cs delete mode 100644 GDZZ.Application/Service/Test/TestService.cs diff --git a/GDZZ.Application/Entity/JobHunter.cs b/GDZZ.Application/Entity/JobHunter.cs deleted file mode 100644 index 33e850d..0000000 --- a/GDZZ.Application/Entity/JobHunter.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using SqlSugar; -using System.ComponentModel; -using GDZZ.Core.Entity; -namespace GDZZ.Application.Entity -{ - /// - /// 求职者 - /// - [SugarTable("jobhunter")] - [Description("求职者")] - public class JobHunter : DEntityBase - { - /// - /// 租户Id - /// - public long TenantId { get; set; } - /// - /// 联系电话 - /// - public string Phone { get; set; } - /// - /// 性别 - /// - public Int16 Gender { get; set; } - } -} \ No newline at end of file diff --git a/GDZZ.Application/Entity/JobhuntMessage.cs b/GDZZ.Application/Entity/JobhuntMessage.cs deleted file mode 100644 index 1e890ae..0000000 --- a/GDZZ.Application/Entity/JobhuntMessage.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using SqlSugar; -using System.ComponentModel; -using GDZZ.Core.Entity; -namespace GDZZ.Application.Entity -{ - /// - /// 求职信息 - /// - [SugarTable("jobhunt_message")] - [Description("求职信息")] - public class JobhuntMessage : DEntityBase - { - /// - /// 租户Id - /// - public long TenantId { get; set; } - /// - /// 求职详情 - /// - public string PositionInfo { get; set; } - /// - /// 求职标题 - /// - public string Title { get; set; } - /// - /// 求职状态 - /// - public int Status { get; set; } - /// - /// 经验 - /// - public int Experience { get; set; } - /// - /// 标签 - /// - public string Tag { get; set; } - /// - /// 省份 - /// - public int ProvinceId { get; set; } - /// - /// 城市 - /// - public int CityId { get; set; } - } -} \ No newline at end of file diff --git a/GDZZ.Application/Entity/RecruitMessage.cs b/GDZZ.Application/Entity/RecruitMessage.cs deleted file mode 100644 index 17d096a..0000000 --- a/GDZZ.Application/Entity/RecruitMessage.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using SqlSugar; -using System.ComponentModel; -using GDZZ.Core.Entity; -namespace GDZZ.Application.Entity -{ - /// - /// 招聘消息 - /// - [SugarTable("recruit_message")] - [Description("招聘消息")] - public class RecruitMessage : DEntityBase - { - /// - /// 租户Id - /// - public long TenantId { get; set; } - /// - /// 职位详情 - /// - public string PositionInfo { get; set; } - /// - /// 标题 - /// - public string Title { get; set; } - /// - /// 状态 - /// - public int Status { get; set; } - /// - /// 省份 - /// - public int ProvinceId { get; set; } - /// - /// 城市 - /// - public int CityId { get; set; } - /// - /// 区 - /// - public int AreaId { get; set; } - /// - /// 详细地址 - /// - public int Address { get; set; } - /// - /// 联系电话 - /// - public string Phone { get; set; } - /// - /// 标签 - /// - public string Tag { get; set; } - /// - /// 学历 - /// - public int Education { get; set; } - /// - /// 经验 - /// - public int Experience { get; set; } - } -} \ No newline at end of file diff --git a/GDZZ.Application/Entity/SysArea.cs b/GDZZ.Application/Entity/SysArea.cs deleted file mode 100644 index 40d3209..0000000 --- a/GDZZ.Application/Entity/SysArea.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using SqlSugar; -using System.ComponentModel; -using GDZZ.Core.Entity; -namespace GDZZ.Application.Entity -{ - /// - /// 系统地区数据 - /// - [SugarTable("sys_area")] - [Description("系统地区数据")] - public class SysArea : AutoIncrementEntity - { - - /// - /// 父级ID - /// - public Int16 parent_id { get; set; } - /// - /// 地区名 - /// - public string name { get; set; } - } -} \ No newline at end of file diff --git a/GDZZ.Application/GDZZ.Application.xml b/GDZZ.Application/GDZZ.Application.xml index 625f110..bd67c15 100644 --- a/GDZZ.Application/GDZZ.Application.xml +++ b/GDZZ.Application/GDZZ.Application.xml @@ -79,151 +79,6 @@ 公司详情 - - - 求职者 - - - - - 租户Id - - - - - 联系电话 - - - - - 性别 - - - - - 求职信息 - - - - - 租户Id - - - - - 求职详情 - - - - - 求职标题 - - - - - 求职状态 - - - - - 经验 - - - - - 标签 - - - - - 省份 - - - - - 城市 - - - - - 招聘消息 - - - - - 租户Id - - - - - 职位详情 - - - - - 标题 - - - - - 状态 - - - - - 省份 - - - - - 城市 - - - - - 区 - - - - - 详细地址 - - - - - 联系电话 - - - - - 标签 - - - - - 学历 - - - - - 经验 - - - - - 系统地区数据 - - - - - 父级ID - - - - - 地区名 - - 获取配置文件 @@ -634,621 +489,5 @@ 公司详情 - - - 求职者输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 联系电话 - - - - - 性别 - - - - - 求职者输入参数 - - - - - 租户Id - - - - - 联系电话 - - - - - 性别 - - - - - 主键Id - - - - - 主键Id - - - - - 求职者输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 联系电话 - - - - - 性别 - - - - - 求职者服务 - - - - - 分页查询求职者 - - - - - - - 增加求职者 - - - - - - - 删除求职者 - - - - - - - 更新求职者 - - - - - - - 获取求职者 - - - - - - - 获取求职者列表 - - - - - - - 求职信息输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 求职详情 - - - - - 求职标题 - - - - - 求职状态 - - - - - 经验 - - - - - 标签 - - - - - 省份 - - - - - 城市 - - - - - 求职信息输入参数 - - - - - 租户Id - - - - - 求职详情 - - - - - 求职标题 - - - - - 求职状态 - - - - - 经验 - - - - - 标签 - - - - - 省份 - - - - - 城市 - - - - - 租户Id - - - - - 求职详情 - - - - - 求职标题 - - - - - 主键Id - - - - - 主键Id - - - - - 求职信息输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 求职详情 - - - - - 求职标题 - - - - - 求职状态 - - - - - 经验 - - - - - 标签 - - - - - 省份 - - - - - 城市 - - - - - 求职信息服务 - - - - - 分页查询求职信息 - - - - - - - 增加求职信息 - - - - - - - 删除求职信息 - - - - - - - 更新求职信息 - - - - - - - 获取求职信息 - - - - - - - 获取求职信息列表 - - - - - - - 招聘消息输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 职位详情 - - - - - 标题 - - - - - 状态 - - - - - 省份 - - - - - 城市 - - - - - 区 - - - - - 详细地址 - - - - - 联系电话 - - - - - 标签 - - - - - 学历 - - - - - 经验 - - - - - 招聘消息输入参数 - - - - - 租户Id - - - - - 职位详情 - - - - - 标题 - - - - - 状态 - - - - - 省份 - - - - - 城市 - - - - - 区 - - - - - 详细地址 - - - - - 联系电话 - - - - - 标签 - - - - - 学历 - - - - - 经验 - - - - - 职位详情 - - - - - 标题 - - - - - 主键Id - - - - - 主键Id - - - - - 招聘消息输出参数 - - - - - 主键Id - - - - - 租户Id - - - - - 职位详情 - - - - - 标题 - - - - - 状态 - - - - - 省份 - - - - - 城市 - - - - - 区 - - - - - 详细地址 - - - - - 联系电话 - - - - - 标签 - - - - - 学历 - - - - - 经验 - - - - - 招聘消息服务 - - - - - 分页查询招聘消息 - - - - - - - 增加招聘消息 - - - - - - - 删除招聘消息 - - - - - - - 更新招聘消息 - - - - - - - 获取招聘消息 - - - - - - - 获取招聘消息列表 - - - - diff --git a/GDZZ.Application/Service/JobHunter/Dto/JobHunterDto.cs b/GDZZ.Application/Service/JobHunter/Dto/JobHunterDto.cs deleted file mode 100644 index 069aa6d..0000000 --- a/GDZZ.Application/Service/JobHunter/Dto/JobHunterDto.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using GDZZ.Core; - -namespace GDZZ.Application -{ - /// - /// 求职者输出参数 - /// - public class JobHunterDto - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 联系电话 - /// - public string Phone { get; set; } - - /// - /// 性别 - /// - public Int16 Gender { get; set; } - - } -} diff --git a/GDZZ.Application/Service/JobHunter/Dto/JobHunterInput.cs b/GDZZ.Application/Service/JobHunter/Dto/JobHunterInput.cs deleted file mode 100644 index 2f0c24a..0000000 --- a/GDZZ.Application/Service/JobHunter/Dto/JobHunterInput.cs +++ /dev/null @@ -1,57 +0,0 @@ -using GDZZ.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace GDZZ.Application -{ - /// - /// 求职者输入参数 - /// - public class JobHunterInput : PageInputBase - { - /// - /// 租户Id - /// - public virtual long TenantId { get; set; } - - /// - /// 联系电话 - /// - public virtual string Phone { get; set; } - - /// - /// 性别 - /// - public virtual Int16 Gender { get; set; } - - } - - public class AddJobHunterInput : JobHunterInput - { - } - - public class DeleteJobHunterInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class UpdateJobHunterInput : JobHunterInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class QueryeJobHunterInput : DeleteJobHunterInput - { - - } -} diff --git a/GDZZ.Application/Service/JobHunter/Dto/JobHunterOutput.cs b/GDZZ.Application/Service/JobHunter/Dto/JobHunterOutput.cs deleted file mode 100644 index 70fcaa5..0000000 --- a/GDZZ.Application/Service/JobHunter/Dto/JobHunterOutput.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace GDZZ.Application -{ - /// - /// 求职者输出参数 - /// - public class JobHunterOutput - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 联系电话 - /// - public string Phone { get; set; } - - /// - /// 性别 - /// - public Int16 Gender { get; set; } - - } -} diff --git a/GDZZ.Application/Service/JobHunter/IJobHunterService.cs b/GDZZ.Application/Service/JobHunter/IJobHunterService.cs deleted file mode 100644 index 6871f34..0000000 --- a/GDZZ.Application/Service/JobHunter/IJobHunterService.cs +++ /dev/null @@ -1,16 +0,0 @@ -using GDZZ.Core; -using Microsoft.AspNetCore.Mvc; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - public interface IJobHunterService - { - Task Add(AddJobHunterInput input); - Task Delete(DeleteJobHunterInput input); - Task Get([FromQuery] QueryeJobHunterInput input); - Task List([FromQuery] JobHunterInput input); - Task Page([FromQuery] JobHunterInput input); - Task Update(UpdateJobHunterInput input); - } -} \ No newline at end of file diff --git a/GDZZ.Application/Service/JobHunter/JobHunterService.cs b/GDZZ.Application/Service/JobHunter/JobHunterService.cs deleted file mode 100644 index 5b907bd..0000000 --- a/GDZZ.Application/Service/JobHunter/JobHunterService.cs +++ /dev/null @@ -1,96 +0,0 @@ -using GDZZ.Core; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using System.Linq; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - /// - /// 求职者服务 - /// - [ApiDescriptionSettings("Application",Name = "JobHunter", Order = 1)] - public class JobHunterService : IJobHunterService, IDynamicApiController, ITransient - { - private readonly SqlSugarRepository _rep; - - public JobHunterService(SqlSugarRepository rep) - { - _rep = rep; - } - - /// - /// 分页查询求职者 - /// - /// - /// - [HttpGet("/JobHunter/page")] - public async Task Page([FromQuery] JobHunterInput input) - { - var entities = await _rep.AsQueryable() - .ToPagedListAsync(input.PageNo, input.PageSize); - return entities.XnPagedResult(); - } - - /// - /// 增加求职者 - /// - /// - /// - [HttpPost("/JobHunter/add")] - public async Task Add(AddJobHunterInput input) - { - var entity = input.Adapt(); - await _rep.InsertAsync(entity); - } - - /// - /// 删除求职者 - /// - /// - /// - [HttpPost("/JobHunter/delete")] - public async Task Delete(DeleteJobHunterInput input) - { - var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - await _rep.DeleteAsync(entity); - } - - /// - /// 更新求职者 - /// - /// - /// - [HttpPost("/JobHunter/edit")] - public async Task Update(UpdateJobHunterInput input) - { - var entity = input.Adapt(); - await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync(); - } - - /// - /// 获取求职者 - /// - /// - /// - [HttpGet("/JobHunter/detail")] - public async Task Get([FromQuery] QueryeJobHunterInput input) - { - return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - } - - /// - /// 获取求职者列表 - /// - /// - /// - [HttpGet("/JobHunter/list")] - public async Task List([FromQuery] JobHunterInput input) - { - return await _rep.ToListAsync(); - } - } -} diff --git a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageDto.cs b/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageDto.cs deleted file mode 100644 index f48ab56..0000000 --- a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageDto.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using GDZZ.Core; - -namespace GDZZ.Application -{ - /// - /// 求职信息输出参数 - /// - public class JobhuntMessageDto - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 求职详情 - /// - public string PositionInfo { get; set; } - - /// - /// 求职标题 - /// - public string Title { get; set; } - - /// - /// 求职状态 - /// - public int Status { get; set; } - - /// - /// 经验 - /// - public int Experience { get; set; } - - /// - /// 标签 - /// - public string Tag { get; set; } - - /// - /// 省份 - /// - public int ProvinceId { get; set; } - - /// - /// 城市 - /// - public int CityId { get; set; } - - } -} diff --git a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageInput.cs b/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageInput.cs deleted file mode 100644 index 82fa8fd..0000000 --- a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageInput.cs +++ /dev/null @@ -1,100 +0,0 @@ -using GDZZ.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace GDZZ.Application -{ - /// - /// 求职信息输入参数 - /// - public class JobhuntMessageInput : PageInputBase - { - /// - /// 租户Id - /// - public virtual long TenantId { get; set; } - - /// - /// 求职详情 - /// - public virtual string PositionInfo { get; set; } - - /// - /// 求职标题 - /// - public virtual string Title { get; set; } - - /// - /// 求职状态 - /// - public virtual int Status { get; set; } - - /// - /// 经验 - /// - public virtual int Experience { get; set; } - - /// - /// 标签 - /// - public virtual string Tag { get; set; } - - /// - /// 省份 - /// - public virtual int ProvinceId { get; set; } - - /// - /// 城市 - /// - public virtual int CityId { get; set; } - - } - - public class AddJobhuntMessageInput : JobhuntMessageInput - { - /// - /// 租户Id - /// - [Required(ErrorMessage = "租户Id不能为空")] - public override long TenantId { get; set; } - - /// - /// 求职详情 - /// - [Required(ErrorMessage = "求职详情不能为空")] - public override string PositionInfo { get; set; } - - /// - /// 求职标题 - /// - [Required(ErrorMessage = "求职标题不能为空")] - public override string Title { get; set; } - - } - - public class DeleteJobhuntMessageInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class UpdateJobhuntMessageInput : JobhuntMessageInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class QueryeJobhuntMessageInput : DeleteJobhuntMessageInput - { - - } -} diff --git a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageOutput.cs b/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageOutput.cs deleted file mode 100644 index b763deb..0000000 --- a/GDZZ.Application/Service/JobhuntMessage/Dto/JobhuntMessageOutput.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; - -namespace GDZZ.Application -{ - /// - /// 求职信息输出参数 - /// - public class JobhuntMessageOutput - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 求职详情 - /// - public string PositionInfo { get; set; } - - /// - /// 求职标题 - /// - public string Title { get; set; } - - /// - /// 求职状态 - /// - public int Status { get; set; } - - /// - /// 经验 - /// - public int Experience { get; set; } - - /// - /// 标签 - /// - public string Tag { get; set; } - - /// - /// 省份 - /// - public int ProvinceId { get; set; } - - /// - /// 城市 - /// - public int CityId { get; set; } - - } -} diff --git a/GDZZ.Application/Service/JobhuntMessage/IJobhuntMessageService.cs b/GDZZ.Application/Service/JobhuntMessage/IJobhuntMessageService.cs deleted file mode 100644 index 8b4eaf7..0000000 --- a/GDZZ.Application/Service/JobhuntMessage/IJobhuntMessageService.cs +++ /dev/null @@ -1,16 +0,0 @@ -using GDZZ.Core; -using Microsoft.AspNetCore.Mvc; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - public interface IJobhuntMessageService - { - Task Add(AddJobhuntMessageInput input); - Task Delete(DeleteJobhuntMessageInput input); - Task Get([FromQuery] QueryeJobhuntMessageInput input); - Task List([FromQuery] JobhuntMessageInput input); - Task Page([FromQuery] JobhuntMessageInput input); - Task Update(UpdateJobhuntMessageInput input); - } -} \ No newline at end of file diff --git a/GDZZ.Application/Service/JobhuntMessage/JobhuntMessageService.cs b/GDZZ.Application/Service/JobhuntMessage/JobhuntMessageService.cs deleted file mode 100644 index 549dbed..0000000 --- a/GDZZ.Application/Service/JobhuntMessage/JobhuntMessageService.cs +++ /dev/null @@ -1,99 +0,0 @@ -using GDZZ.Core; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using System.Linq; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - /// - /// 求职信息服务 - /// - [ApiDescriptionSettings("Application",Name = "JobhuntMessage", Order = 1)] - public class JobhuntMessageService : IJobhuntMessageService, IDynamicApiController, ITransient - { - private readonly SqlSugarRepository _rep; - - public JobhuntMessageService(SqlSugarRepository rep) - { - _rep = rep; - } - - /// - /// 分页查询求职信息 - /// - /// - /// - [HttpGet("/JobhuntMessage/page")] - public async Task Page([FromQuery] JobhuntMessageInput input) - { - var entities = await _rep.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(input.PositionInfo), u => u.PositionInfo == input.PositionInfo) - .WhereIF(!string.IsNullOrWhiteSpace(input.Title), u => u.Title == input.Title) - .WhereIF(!string.IsNullOrWhiteSpace(input.Tag), u => u.Tag == input.Tag) - .ToPagedListAsync(input.PageNo, input.PageSize); - return entities.XnPagedResult(); - } - - /// - /// 增加求职信息 - /// - /// - /// - [HttpPost("/JobhuntMessage/add")] - public async Task Add(AddJobhuntMessageInput input) - { - var entity = input.Adapt(); - await _rep.InsertAsync(entity); - } - - /// - /// 删除求职信息 - /// - /// - /// - [HttpPost("/JobhuntMessage/delete")] - public async Task Delete(DeleteJobhuntMessageInput input) - { - var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - await _rep.DeleteAsync(entity); - } - - /// - /// 更新求职信息 - /// - /// - /// - [HttpPost("/JobhuntMessage/edit")] - public async Task Update(UpdateJobhuntMessageInput input) - { - var entity = input.Adapt(); - await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync(); - } - - /// - /// 获取求职信息 - /// - /// - /// - [HttpGet("/JobhuntMessage/detail")] - public async Task Get([FromQuery] QueryeJobhuntMessageInput input) - { - return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - } - - /// - /// 获取求职信息列表 - /// - /// - /// - [HttpGet("/JobhuntMessage/list")] - public async Task List([FromQuery] JobhuntMessageInput input) - { - return await _rep.ToListAsync(); - } - } -} diff --git a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageDto.cs b/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageDto.cs deleted file mode 100644 index 3b6c3dc..0000000 --- a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageDto.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using GDZZ.Core; - -namespace GDZZ.Application -{ - /// - /// 招聘消息输出参数 - /// - public class RecruitMessageDto - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 职位详情 - /// - public string PositionInfo { get; set; } - - /// - /// 标题 - /// - public string Title { get; set; } - - /// - /// 状态 - /// - public int Status { get; set; } - - /// - /// 省份 - /// - public int ProvinceId { get; set; } - - /// - /// 城市 - /// - public int CityId { get; set; } - - /// - /// 区 - /// - public int AreaId { get; set; } - - /// - /// 详细地址 - /// - public int Address { get; set; } - - /// - /// 联系电话 - /// - public string Phone { get; set; } - - /// - /// 标签 - /// - public string Tag { get; set; } - - /// - /// 学历 - /// - public int Education { get; set; } - - /// - /// 经验 - /// - public int Experience { get; set; } - - } -} diff --git a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageInput.cs b/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageInput.cs deleted file mode 100644 index 9561608..0000000 --- a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageInput.cs +++ /dev/null @@ -1,114 +0,0 @@ -using GDZZ.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace GDZZ.Application -{ - /// - /// 招聘消息输入参数 - /// - public class RecruitMessageInput : PageInputBase - { - /// - /// 租户Id - /// - public virtual long TenantId { get; set; } - - /// - /// 职位详情 - /// - public virtual string PositionInfo { get; set; } - - /// - /// 标题 - /// - public virtual string Title { get; set; } - - /// - /// 状态 - /// - public virtual int Status { get; set; } - - /// - /// 省份 - /// - public virtual int ProvinceId { get; set; } - - /// - /// 城市 - /// - public virtual int CityId { get; set; } - - /// - /// 区 - /// - public virtual int AreaId { get; set; } - - /// - /// 详细地址 - /// - public virtual int Address { get; set; } - - /// - /// 联系电话 - /// - public virtual string Phone { get; set; } - - /// - /// 标签 - /// - public virtual string Tag { get; set; } - - /// - /// 学历 - /// - public virtual int Education { get; set; } - - /// - /// 经验 - /// - public virtual int Experience { get; set; } - - } - - public class AddRecruitMessageInput : RecruitMessageInput - { - /// - /// 职位详情 - /// - [Required(ErrorMessage = "职位详情不能为空")] - public override string PositionInfo { get; set; } - - /// - /// 标题 - /// - [Required(ErrorMessage = "标题不能为空")] - public override string Title { get; set; } - - } - - public class DeleteRecruitMessageInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class UpdateRecruitMessageInput : RecruitMessageInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } - - public class QueryeRecruitMessageInput : DeleteRecruitMessageInput - { - - } -} diff --git a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageOutput.cs b/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageOutput.cs deleted file mode 100644 index 995831b..0000000 --- a/GDZZ.Application/Service/RecruitMessage/Dto/RecruitMessageOutput.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; - -namespace GDZZ.Application -{ - /// - /// 招聘消息输出参数 - /// - public class RecruitMessageOutput - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 租户Id - /// - public long TenantId { get; set; } - - /// - /// 职位详情 - /// - public string PositionInfo { get; set; } - - /// - /// 标题 - /// - public string Title { get; set; } - - /// - /// 状态 - /// - public int Status { get; set; } - - /// - /// 省份 - /// - public int ProvinceId { get; set; } - - /// - /// 城市 - /// - public int CityId { get; set; } - - /// - /// 区 - /// - public int AreaId { get; set; } - - /// - /// 详细地址 - /// - public int Address { get; set; } - - /// - /// 联系电话 - /// - public string Phone { get; set; } - - /// - /// 标签 - /// - public string Tag { get; set; } - - /// - /// 学历 - /// - public int Education { get; set; } - - /// - /// 经验 - /// - public int Experience { get; set; } - - } -} diff --git a/GDZZ.Application/Service/RecruitMessage/IRecruitMessageService.cs b/GDZZ.Application/Service/RecruitMessage/IRecruitMessageService.cs deleted file mode 100644 index f9ceb8e..0000000 --- a/GDZZ.Application/Service/RecruitMessage/IRecruitMessageService.cs +++ /dev/null @@ -1,16 +0,0 @@ -using GDZZ.Core; -using Microsoft.AspNetCore.Mvc; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - public interface IRecruitMessageService - { - Task Add(AddRecruitMessageInput input); - Task Delete(DeleteRecruitMessageInput input); - Task Get([FromQuery] QueryeRecruitMessageInput input); - Task List([FromQuery] RecruitMessageInput input); - Task Page([FromQuery] RecruitMessageInput input); - Task Update(UpdateRecruitMessageInput input); - } -} \ No newline at end of file diff --git a/GDZZ.Application/Service/RecruitMessage/RecruitMessageService.cs b/GDZZ.Application/Service/RecruitMessage/RecruitMessageService.cs deleted file mode 100644 index e43e016..0000000 --- a/GDZZ.Application/Service/RecruitMessage/RecruitMessageService.cs +++ /dev/null @@ -1,100 +0,0 @@ -using GDZZ.Core; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using System.Linq; -using System.Threading.Tasks; -using GDZZ.Application.Entity; -namespace GDZZ.Application -{ - /// - /// 招聘消息服务 - /// - [ApiDescriptionSettings("Application",Name = "RecruitMessage", Order = 1)] - public class RecruitMessageService : IRecruitMessageService, IDynamicApiController, ITransient - { - private readonly SqlSugarRepository _rep; - - public RecruitMessageService(SqlSugarRepository rep) - { - _rep = rep; - } - - /// - /// 分页查询招聘消息 - /// - /// - /// - [HttpGet("/RecruitMessage/page")] - public async Task Page([FromQuery] RecruitMessageInput input) - { - var entities = await _rep.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(input.PositionInfo), u => u.PositionInfo == input.PositionInfo) - .WhereIF(!string.IsNullOrWhiteSpace(input.Title), u => u.Title == input.Title) - .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), u => u.Phone == input.Phone) - .WhereIF(!string.IsNullOrWhiteSpace(input.Tag), u => u.Tag == input.Tag) - .ToPagedListAsync(input.PageNo, input.PageSize); - return entities.XnPagedResult(); - } - - /// - /// 增加招聘消息 - /// - /// - /// - [HttpPost("/RecruitMessage/add")] - public async Task Add(AddRecruitMessageInput input) - { - var entity = input.Adapt(); - await _rep.InsertAsync(entity); - } - - /// - /// 删除招聘消息 - /// - /// - /// - [HttpPost("/RecruitMessage/delete")] - public async Task Delete(DeleteRecruitMessageInput input) - { - var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - await _rep.DeleteAsync(entity); - } - - /// - /// 更新招聘消息 - /// - /// - /// - [HttpPost("/RecruitMessage/edit")] - public async Task Update(UpdateRecruitMessageInput input) - { - var entity = input.Adapt(); - await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync(); - } - - /// - /// 获取招聘消息 - /// - /// - /// - [HttpGet("/RecruitMessage/detail")] - public async Task Get([FromQuery] QueryeRecruitMessageInput input) - { - return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); - } - - /// - /// 获取招聘消息列表 - /// - /// - /// - [HttpGet("/RecruitMessage/list")] - public async Task List([FromQuery] RecruitMessageInput input) - { - return await _rep.ToListAsync(); - } - } -} diff --git a/GDZZ.Application/Service/Test/ITestService.cs b/GDZZ.Application/Service/Test/ITestService.cs deleted file mode 100644 index b0a3850..0000000 --- a/GDZZ.Application/Service/Test/ITestService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GDZZ.Application.Service; - -public interface ITestService -{ - Task TestChangeDatabase(); -} diff --git a/GDZZ.Application/Service/Test/TestService.cs b/GDZZ.Application/Service/Test/TestService.cs deleted file mode 100644 index d1a3faa..0000000 --- a/GDZZ.Application/Service/Test/TestService.cs +++ /dev/null @@ -1,80 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Furion.FriendlyException; -using Furion.JsonSerialization; -using Furion.Logging.Extensions; -using GDZZ.Core; -using GDZZ.Core.Entity; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using System; -using System.Text.Json; -using System.Threading.Tasks; - -namespace GDZZ.Application.Service; - -[ApiDescriptionSettings("Application",Name = "Test", Order = 1)] -public class TestService : ITestService, IDynamicApiController, ITransient -{ - private readonly SqlSugarRepository _userRep; - - public TestService(SqlSugarRepository userRep) - { - _userRep=userRep; - } - - [AllowAnonymous] - public void TestDatabaseChange() { - Type[] types = new Type[] { typeof(SysUser) }; - var diffString = _userRep.Context.CodeFirst.GetDifferenceTables(types).ToDiffList(); - Console.Write(diffString); - } - - - [HttpGet("/test/TestChangeDatabase")] - [AllowAnonymous] - public async Task TestChangeDatabase() - { - var user = await _userRep.ToListAsync(); - - _userRep.CurrentBeginTran(); - _userRep.CurrentCommitTran(); - - } - - [AllowAnonymous] - public async Task JsonSerializerTest(string json) { - string us = UserManager.Account; - var sq = JsonSerializer.Deserialize(json); - var ss= Newtonsoft.Json.JsonConvert.DeserializeObject(json); - var s = JSON.Deserialize(json); - return s; - } - - [LoggingMonitor] - public void TestLog() - { - throw Oops.Bah($"业务异常{DateTime.Now}"); - - } - [AllowAnonymous] - public void TestLog2() - { - Student student = null; - student.FirstName = "hahah"; - - } - - [NonUnify] - public void TestLogInfo() - { - $"info日志{DateTime.Now}".LogInformation(); - } - -} - -public class Student { - public string FirstName { get; set; } - - public int RealAge { get; set; } -} \ No newline at end of file diff --git a/GDZZ.Core/Enum/ErrorCode.cs b/GDZZ.Core/Enum/ErrorCode.cs index fb36f36..f6c7cd5 100644 --- a/GDZZ.Core/Enum/ErrorCode.cs +++ b/GDZZ.Core/Enum/ErrorCode.cs @@ -402,5 +402,11 @@ public enum ErrorCode /// 表单不存在 /// [ErrorCodeItemMetadata("表单不存在")] - F1000 + F1000, + + /// + /// 租户不存在 + /// + [ErrorCodeItemMetadata("租户不存在")] + F1001 } diff --git a/GDZZ.Core/GDZZ.Core.xml b/GDZZ.Core/GDZZ.Core.xml index 0832d5c..3ed4033 100644 --- a/GDZZ.Core/GDZZ.Core.xml +++ b/GDZZ.Core/GDZZ.Core.xml @@ -2560,6 +2560,11 @@ 表单不存在 + + + 租户不存在 + + 文件扩展枚举 diff --git a/GDZZ.Core/Service/Auth/AuthService.cs b/GDZZ.Core/Service/Auth/AuthService.cs index fb78628..7db8360 100644 --- a/GDZZ.Core/Service/Auth/AuthService.cs +++ b/GDZZ.Core/Service/Auth/AuthService.cs @@ -82,7 +82,12 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient throw Oops.Oh(ErrorCode.D1017); //获取对应租户 var tenant = _sysTenantRep.Single(user.TenantId); + + if (tenant.IsNullOrZero()) + throw Oops.Oh(ErrorCode.F1001); + // 生成Token令牌 + //var accessToken = await _jwtBearerManager.CreateTokenAdmin(user); var accessToken = JWTEncryption.Encrypt(new Dictionary { diff --git a/GDZZ.Core/Service/Emp/SysEmpService.cs b/GDZZ.Core/Service/Emp/SysEmpService.cs index 9a87414..9dc9e18 100644 --- a/GDZZ.Core/Service/Emp/SysEmpService.cs +++ b/GDZZ.Core/Service/Emp/SysEmpService.cs @@ -16,16 +16,19 @@ namespace GDZZ.Core.Service; /// public class SysEmpService : ISysEmpService, ITransient { - private readonly SqlSugarRepository _sysEmpRep; // 员工表仓储 + private readonly SqlSugarRepository _sysEmpRep; // 员工表仓储 + private readonly SqlSugarRepository sysEmpPosRep; // 员工表仓储 private readonly ISysEmpExtOrgPosService _sysEmpExtOrgPosService; private readonly ISysEmpPosService _sysEmpPosService; - public SysEmpService(SqlSugarRepository sysEmpRep, + public SysEmpService(SqlSugarRepository sysEmpRep, + SqlSugarRepository sysEmpPosRep, ISysEmpExtOrgPosService sysEmpExtOrgPosService, ISysEmpPosService sysEmpPosService) { _sysEmpRep = sysEmpRep; + this.sysEmpPosRep = sysEmpPosRep; _sysEmpExtOrgPosService = sysEmpExtOrgPosService; _sysEmpPosService = sysEmpPosService; } @@ -79,13 +82,17 @@ public class SysEmpService : ISysEmpService, ITransient try { _sysEmpRep.CurrentBeginTran(); + + var emppos = await this.sysEmpPosRep.FirstOrDefaultAsync(x => x.SysEmpId == long.Parse(sysEmpParam.Id)); + + await this.sysEmpPosRep.DeleteAsync(x =>x.SysEmpId == long.Parse(sysEmpParam.Id)); // 先删除员工信息 await _sysEmpRep.DeleteAsync(u => u.Id == long.Parse(sysEmpParam.Id)); // 再新增新员工信息 var emp = sysEmpParam.Adapt(); await _sysEmpRep.InsertAsync(emp); - + //await this.sysEmpPosRep.InsertAsync(new SysEmpPos() { SysEmpId = emppos.SysEmpId, SysPosId = emp.Id }); // 更新附属机构职位信息 await _sysEmpExtOrgPosService.AddOrUpdate(emp.Id, sysEmpParam.ExtIds);