You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
40 lines
1.4 KiB
using MathNet.Numerics.Distributions;
|
|
|
|
namespace Tiobon.Core.Services;
|
|
|
|
/// <summary>
|
|
/// 面试工单 (服务)
|
|
/// </summary>
|
|
public class Ghrh_InterviewOrderServices : BaseServices<Ghrh_InterviewOrder, Ghrh_InterviewOrderDto, InsertGhrh_InterviewOrderInput, EditGhrh_InterviewOrderInput>, IGhrh_InterviewOrderServices
|
|
{
|
|
private readonly IBaseRepository<Ghrh_InterviewOrder> _dal;
|
|
private readonly IGhrh_InterviewLogServices _ghrh_InterviewLogServices;
|
|
public Ghrh_InterviewOrderServices(ICaching caching,
|
|
IGhrh_InterviewLogServices ghrh_InterviewLogServices,
|
|
IBaseRepository<Ghrh_InterviewOrder> dal)
|
|
{
|
|
this._dal = dal;
|
|
base.BaseDal = dal;
|
|
base._caching = caching;
|
|
_ghrh_InterviewLogServices = ghrh_InterviewLogServices;
|
|
}
|
|
|
|
|
|
public override async Task<long> Add(InsertGhrh_InterviewOrderInput entity)
|
|
{
|
|
var result = await base.Add(entity);
|
|
var usser = await GetUser();
|
|
await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput()
|
|
{
|
|
OrderId = result,
|
|
RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】推荐了简历!"
|
|
});
|
|
|
|
await Db.Updateable<Ghrh_HumanRequest>()
|
|
.SetColumns(it => it.RecommendCount == it.RecommendCount + 1)
|
|
.Where(it => it.Id == entity.RequestId)
|
|
.ExecuteCommandAsync();
|
|
|
|
return result;
|
|
}
|
|
} |