|
|
@ -3,13 +3,11 @@ using Furion.DependencyInjection;
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
using Mapster;
|
|
|
|
using Mapster;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using GDZZ.Application.Entity;
|
|
|
|
using GDZZ.Application.Entity;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Magic.Application
|
|
|
|
namespace GDZZ.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 求职列表服务
|
|
|
|
/// 求职列表服务
|
|
|
@ -34,12 +32,7 @@ namespace Magic.Application
|
|
|
|
public async Task<dynamic> Page([FromQuery] JobHuntInput input)
|
|
|
|
public async Task<dynamic> Page([FromQuery] JobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entities = await _rep.AsQueryable()
|
|
|
|
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.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);
|
|
|
|
.ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
return entities.XnPagedResult();
|
|
|
|
return entities.XnPagedResult();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -50,6 +43,7 @@ namespace Magic.Application
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("/JobHunt/add")]
|
|
|
|
[HttpPost("/JobHunt/add")]
|
|
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
public async Task Add(AddJobHuntInput input)
|
|
|
|
public async Task Add(AddJobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity = input.Adapt<JobHunt>();
|
|
|
|
var entity = input.Adapt<JobHunt>();
|
|
|
@ -62,6 +56,7 @@ namespace Magic.Application
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("/JobHunt/delete")]
|
|
|
|
[HttpPost("/JobHunt/delete")]
|
|
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
public async Task Delete(DeleteJobHuntInput input)
|
|
|
|
public async Task Delete(DeleteJobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
|
|
|
|
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
|
|
|
@ -74,6 +69,7 @@ namespace Magic.Application
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("/JobHunt/edit")]
|
|
|
|
[HttpPost("/JobHunt/edit")]
|
|
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
public async Task Update(UpdateJobHuntInput input)
|
|
|
|
public async Task Update(UpdateJobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity = input.Adapt<JobHunt>();
|
|
|
|
var entity = input.Adapt<JobHunt>();
|
|
|
@ -86,6 +82,7 @@ namespace Magic.Application
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("/JobHunt/detail")]
|
|
|
|
[HttpGet("/JobHunt/detail")]
|
|
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
public async Task<JobHunt> Get([FromQuery] QueryeJobHuntInput input)
|
|
|
|
public async Task<JobHunt> Get([FromQuery] QueryeJobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
|
|
|
|
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
|
|
|
@ -97,9 +94,13 @@ namespace Magic.Application
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("/JobHunt/list")]
|
|
|
|
[HttpGet("/JobHunt/list")]
|
|
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
public async Task<dynamic> List([FromQuery] JobHuntInput input)
|
|
|
|
public async Task<dynamic> List([FromQuery] JobHuntInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _rep.ToListAsync();
|
|
|
|
return await _rep.AsQueryable()
|
|
|
|
|
|
|
|
.Where(x=>x.CreatedUserId == UserManager.UserId)
|
|
|
|
|
|
|
|
.OrderByDescending(x=>x.Tags)
|
|
|
|
|
|
|
|
.ToListAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|