Commit 2fb4d864 authored by 黄奎's avatar 黄奎

新增接口

parent 69d85471
......@@ -16,6 +16,11 @@ namespace Edu.Model.Entity.Web
/// </summary>
public int Id { get; set; }
/// <summary>
/// 招聘类型编号
/// </summary>
public int TypeId { get; set; }
/// <summary>
/// 岗位名称
/// </summary>
......
......@@ -42,7 +42,7 @@ namespace Edu.Module.Web
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Web_RecruitmentType_ViewModel> GetWebRecruitmentTypeListRepository(RB_Web_RecruitmentType_ViewModel query)
public List<RB_Web_RecruitmentType_ViewModel> GetWebRecruitmentTypeListModule(RB_Web_RecruitmentType_ViewModel query)
{
return web_RecruitmentTypeRepository.GetWebRecruitmentTypeListRepository(query);
}
......@@ -111,9 +111,9 @@ namespace Edu.Module.Web
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Web_Recruitment_ViewModel> GetWebRecruitmentTypePageModule(int pageIndex, int pageSize, out long rowsCount, RB_Web_Recruitment_ViewModel query)
public List<RB_Web_Recruitment_ViewModel> GetWebRecruitmentPageModule(int pageIndex, int pageSize, out long rowsCount, RB_Web_Recruitment_ViewModel query)
{
return web_RecruitmentRepository.GetWebRecruitmentTypePageRepository(pageIndex, pageSize, out rowsCount, query);
return web_RecruitmentRepository.GetWebRecruitmentPageRepository(pageIndex, pageSize, out rowsCount, query);
}
/// <summary>
......@@ -128,6 +128,7 @@ namespace Edu.Module.Web
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Web_Recruitment_ViewModel.TypeId),model.TypeId },
{nameof(RB_Web_Recruitment_ViewModel.PositionName),model.PositionName },
{nameof(RB_Web_Recruitment_ViewModel.SalaryType),model.SalaryType },
{nameof(RB_Web_Recruitment_ViewModel.SalaryStart),model.SalaryStart },
......
......@@ -22,7 +22,7 @@ namespace Edu.Repository.Web
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Web_Recruitment_ViewModel> GetWebRecruitmentTypePageRepository(int pageIndex, int pageSize, out long rowsCount, RB_Web_Recruitment_ViewModel query)
public List<RB_Web_Recruitment_ViewModel> GetWebRecruitmentPageRepository(int pageIndex, int pageSize, out long rowsCount, RB_Web_Recruitment_ViewModel query)
{
rowsCount = 0;
var parameters = new DynamicParameters();
......
......@@ -43,6 +43,11 @@ namespace Edu.WebApi.Controllers.Web
/// </summary>
private readonly WebAdvisoryModule advisoryModule = new WebAdvisoryModule();
/// <summary>
/// 招聘管理处理类对象
/// </summary>
private readonly WebRecruitmentModule webRecruitmentModule = new WebRecruitmentModule();
#region 网站导航管理
/// <summary>
/// 获取网站导航列表
......@@ -723,5 +728,167 @@ namespace Edu.WebApi.Controllers.Web
}
#endregion
#region 招聘管理
/// <summary>
/// 获取招聘类型分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebRecruitmentTypePage()
{
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Web_RecruitmentType_ViewModel()
{
TypeName = base.ParmJObj.GetStringValue("TypeName"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = webRecruitmentModule.GetWebRecruitmentTypePageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.Count = rowsCount;
pageModel.PageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取招聘类型列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebRecruitmentTypeList()
{
var query = new RB_Web_RecruitmentType_ViewModel()
{
TypeName = base.ParmJObj.GetStringValue("TypeName"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = webRecruitmentModule.GetWebRecruitmentTypeListModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 新增修改招聘类型
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetWebRecruitmentType()
{
var extModel = new RB_Web_RecruitmentType_ViewModel()
{
Id = base.ParmJObj.GetInt("Id"),
TypeName = base.ParmJObj.GetStringValue("TypeName"),
ImgCover = base.ParmJObj.GetStringValue("ImgCover"),
};
extModel.School_Id = base.UserInfo.School_Id;
extModel.Group_Id = base.UserInfo.Group_Id;
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateDate = DateTime.Now;
extModel.Status = DateStateEnum.Normal;
bool flag = webRecruitmentModule.SetWebRecruitmentTypeModule(extModel);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取招聘类型详情
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebRecruitmentType()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var extModel = webRecruitmentModule.GetWebRecruitmentTypeModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 修改招聘类型状态
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RemoveWebRecruitmentTypeStatus()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var Status = base.ParmJObj.GetInt("Status", 0);
var flag = webRecruitmentModule.RemoveWebRecruitmentTypeStatusModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取招聘信息分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebRecruitmentPage()
{
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Web_Recruitment_ViewModel()
{
PositionName = base.ParmJObj.GetStringValue("PositionName"),
TypeId=base.ParmJObj.GetInt("TypeId")
};
query.Group_Id = base.UserInfo.Group_Id;
var list = webRecruitmentModule.GetWebRecruitmentPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.Count = rowsCount;
pageModel.PageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 新增修改招聘信息
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetWebRecruitment()
{
var extModel = new RB_Web_Recruitment_ViewModel()
{
Id = base.ParmJObj.GetInt("Id"),
TypeId=base.ParmJObj.GetInt("TypeId"),
PositionName = base.ParmJObj.GetStringValue("PositionName"),
SalaryType=base.ParmJObj.GetInt("SalaryType"),
SalaryStart=base.ParmJObj.GetDecimal("SalaryStart"),
SalaryEnd=base.ParmJObj.GetDecimal("SalaryEnd"),
SalaryNum=base.ParmJObj.GetInt("SalaryNum"),
Experience = base.ParmJObj.GetStringValue("Experience"),
Education = base.ParmJObj.GetStringValue("Education"),
WorkPlace = base.ParmJObj.GetStringValue("WorkPlace"),
PublishTime = base.ParmJObj.GetDateTime("PublishTime"),
PositionDesc = base.ParmJObj.GetStringValue("PositionDesc"),
};
extModel.School_Id = base.UserInfo.School_Id;
extModel.Group_Id = base.UserInfo.Group_Id;
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateDate = DateTime.Now;
extModel.Status = DateStateEnum.Normal;
bool flag = webRecruitmentModule.SetWebRecruitmentModule(extModel);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取招聘详情
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetWebRecruitment()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var extModel = webRecruitmentModule.GetWebRecruitmentModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 修改招聘状态
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RemoveWebRecruitmentStatus()
{
var Id = base.ParmJObj.GetInt("Id", 0);
var Status = base.ParmJObj.GetInt("Status", 0);
var flag = webRecruitmentModule.RemoveWebRecruitmentStatusModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment