diff --git a/GDZZ.Application/Entity/Candidate.cs b/GDZZ.Application/Entity/Candidate.cs new file mode 100644 index 0000000..0dff20a --- /dev/null +++ b/GDZZ.Application/Entity/Candidate.cs @@ -0,0 +1,29 @@ +using System; +using SqlSugar; +using System.ComponentModel; +using GDZZ.Core.Entity; +using GDZZ.Application.Enum; + +namespace GDZZ.Application.Entity +{ + /// + /// 候选人管理表 + /// + [SugarTable("mini_candidate")] + [Description("候选人管理表")] + public class Candidate : DEntityBase + { + /// + /// 猎头ID + /// + public long HeadID { get; set; } + /// + /// 候选人ID + /// + public long CanndidateID { get; set; } + /// + /// 状态 + /// + public CandidateEnum Status { get; set; } + } +} \ No newline at end of file diff --git a/GDZZ.Application/Entity/MiniPayTake.cs b/GDZZ.Application/Entity/MiniPayTake.cs index 48ed0be..b92cb7b 100644 --- a/GDZZ.Application/Entity/MiniPayTake.cs +++ b/GDZZ.Application/Entity/MiniPayTake.cs @@ -22,7 +22,7 @@ namespace GDZZ.Application.Entity /// /// 支付状态 /// - public int PayStatus { get; set; } + public PayStatusEnum PayStatus { get; set; } /// /// 金额 /// diff --git a/GDZZ.Application/Entity/MiniRecharge.cs b/GDZZ.Application/Entity/MiniRecharge.cs index 48e16bf..c4a7813 100644 --- a/GDZZ.Application/Entity/MiniRecharge.cs +++ b/GDZZ.Application/Entity/MiniRecharge.cs @@ -22,10 +22,10 @@ namespace GDZZ.Application.Entity /// /// 充值状态 /// - public int Status { get; set; } + public RechargeEnum Status { get; set; } /// /// 充值类型 /// - public int Type { get; set; } + public RechargeTypeEnum Type { get; set; } } } \ No newline at end of file diff --git a/GDZZ.Application/Enum/CandidateEnum.cs b/GDZZ.Application/Enum/CandidateEnum.cs new file mode 100644 index 0000000..051a215 --- /dev/null +++ b/GDZZ.Application/Enum/CandidateEnum.cs @@ -0,0 +1,26 @@ +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 CandidateEnum + { + /// + /// 请求合作 + /// + [Description("请求合作")] REQUEST = 0, + /// + /// 同意合作 + /// + [Description("同意合作")] AGREE = 1, + + /// + /// 解除合作 + /// + [Description("解除合作")] SECURE = 2, + } +} diff --git a/GDZZ.Application/GDZZ.Application.xml b/GDZZ.Application/GDZZ.Application.xml index c99ed70..4c59f76 100644 --- a/GDZZ.Application/GDZZ.Application.xml +++ b/GDZZ.Application/GDZZ.Application.xml @@ -89,6 +89,26 @@ 描述 + + + 候选人管理表 + + + + + 猎头ID + + + + + 候选人ID + + + + + 状态 + + 公司属性 @@ -799,6 +819,21 @@ 待审核 + + + 请求合作 + + + + + 同意合作 + + + + + 解除合作 + + 热招 @@ -1433,6 +1468,11 @@ 充值状态 + + + 充值类型 + + 微信支付 @@ -1862,6 +1902,133 @@ 开放平台ID + + + 猎头合作管理服务 + + + + + 新增合作 + + + + + + + 分页查询猎头合作管理 + + + + + + + 删除猎头合作管理 + + + + + + + 更新猎头合作管理 + + + + + + + 获取猎头合作管理 + + + + + + + 获取猎头合作管理列表 + + + + + + + 猎头合作管理输出参数 + + + + + 主键Id + + + + + 猎头ID + + + + + 候选人ID + + + + + 状态 + + + + + 猎头合作管理输入参数 + + + + + 猎头ID + + + + + 候选人ID + + + + + 状态 + + + + + 主键Id + + + + + 主键Id + + + + + 猎头合作管理输出参数 + + + + + 主键Id + + + + + 猎头ID + + + + + 候选人ID + + + + + 状态 + + 公司属性服务 diff --git a/GDZZ.Application/Service/Candidate/CandidateService.cs b/GDZZ.Application/Service/Candidate/CandidateService.cs new file mode 100644 index 0000000..f9415b1 --- /dev/null +++ b/GDZZ.Application/Service/Candidate/CandidateService.cs @@ -0,0 +1,112 @@ +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 = "Candidate", Order = 1)] + public class CandidateService : ICandidateService, IDynamicApiController, ITransient + { + private readonly SqlSugarRepository _rep; + + public CandidateService(SqlSugarRepository rep) + { + _rep = rep; + } + + + /// + /// 新增合作 + /// + /// + /// + [HttpPost("/Candidate/AddOrUpdate")] + public async Task AddOrUpdate(AddCandidateInput input) + { + + var res = await this._rep.AsQueryable().Where(x => x.CanndidateID == input.CanndidateID && x.HeadID == input.HeadID).FirstAsync(); + if (res.IsEmpty()) + { + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + } + else + { + res.Status = input.Status; + await _rep.UpdateAsync(res); + } + + } + + + + /// + /// 分页查询猎头合作管理 + /// + /// + /// + [HttpGet("/Candidate/page")] + public async Task Page([FromQuery] CandidateInput input) + { + var entities = await _rep.AsQueryable() + .ToPagedListAsync(input.PageNo, input.PageSize); + return entities.XnPagedResult(); + } + + + + /// + /// 删除猎头合作管理 + /// + /// + /// + [HttpPost("/Candidate/delete")] + public async Task Delete(DeleteCandidateInput input) + { + var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); + await _rep.DeleteAsync(entity); + } + + /// + /// 更新猎头合作管理 + /// + /// + /// + [HttpPost("/Candidate/edit")] + public async Task Update(UpdateCandidateInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync(); + } + + /// + /// 获取猎头合作管理 + /// + /// + /// + [HttpGet("/Candidate/detail")] + public async Task Get([FromQuery] QueryeCandidateInput input) + { + return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); + } + + /// + /// 获取猎头合作管理列表 + /// + /// + /// + [HttpGet("/Candidate/list")] + public async Task List([FromQuery] CandidateInput input) + { + return await _rep.ToListAsync(); + } + } +} diff --git a/GDZZ.Application/Service/Candidate/Dto/CandidateDto.cs b/GDZZ.Application/Service/Candidate/Dto/CandidateDto.cs new file mode 100644 index 0000000..890cc11 --- /dev/null +++ b/GDZZ.Application/Service/Candidate/Dto/CandidateDto.cs @@ -0,0 +1,32 @@ +using System; +using GDZZ.Core; + +namespace GDZZ.Application +{ + /// + /// 猎头合作管理输出参数 + /// + public class CandidateDto + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 猎头ID + /// + public long HeadID { get; set; } + + /// + /// 候选人ID + /// + public long CanndidateID { get; set; } + + /// + /// 状态 + /// + public int Status { get; set; } + + } +} diff --git a/GDZZ.Application/Service/Candidate/Dto/CandidateInput.cs b/GDZZ.Application/Service/Candidate/Dto/CandidateInput.cs new file mode 100644 index 0000000..b4c9317 --- /dev/null +++ b/GDZZ.Application/Service/Candidate/Dto/CandidateInput.cs @@ -0,0 +1,58 @@ +using GDZZ.Application.Enum; +using GDZZ.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace GDZZ.Application +{ + /// + /// 猎头合作管理输入参数 + /// + public class CandidateInput : PageInputBase + { + /// + /// 猎头ID + /// + public virtual long HeadID { get; set; } + + /// + /// 候选人ID + /// + public virtual long CanndidateID { get; set; } + + /// + /// 状态 + /// + public virtual CandidateEnum Status { get; set; } + + } + + public class AddCandidateInput : CandidateInput + { + } + + public class DeleteCandidateInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + public class UpdateCandidateInput : CandidateInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + public class QueryeCandidateInput : DeleteCandidateInput + { + + } +} diff --git a/GDZZ.Application/Service/Candidate/Dto/CandidateOutput.cs b/GDZZ.Application/Service/Candidate/Dto/CandidateOutput.cs new file mode 100644 index 0000000..ce5de4b --- /dev/null +++ b/GDZZ.Application/Service/Candidate/Dto/CandidateOutput.cs @@ -0,0 +1,31 @@ +using System; + +namespace GDZZ.Application +{ + /// + /// 猎头合作管理输出参数 + /// + public class CandidateOutput + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 猎头ID + /// + public long HeadID { get; set; } + + /// + /// 候选人ID + /// + public long CanndidateID { get; set; } + + /// + /// 状态 + /// + public int Status { get; set; } + + } +} diff --git a/GDZZ.Application/Service/Candidate/ICandidateService.cs b/GDZZ.Application/Service/Candidate/ICandidateService.cs new file mode 100644 index 0000000..bcba7ce --- /dev/null +++ b/GDZZ.Application/Service/Candidate/ICandidateService.cs @@ -0,0 +1,16 @@ +using GDZZ.Core; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; +using GDZZ.Application.Entity; +namespace GDZZ.Application +{ + public interface ICandidateService + { + Task AddOrUpdate(AddCandidateInput input); + Task Delete(DeleteCandidateInput input); + Task Get([FromQuery] QueryeCandidateInput input); + Task List([FromQuery] CandidateInput input); + Task Page([FromQuery] CandidateInput input); + Task Update(UpdateCandidateInput input); + } +} \ No newline at end of file diff --git a/GDZZ.Application/Service/Company/CompanyService.cs b/GDZZ.Application/Service/Company/CompanyService.cs index 3ab1d51..b5be59e 100644 --- a/GDZZ.Application/Service/Company/CompanyService.cs +++ b/GDZZ.Application/Service/Company/CompanyService.cs @@ -44,17 +44,6 @@ namespace GDZZ.Application { var entities = await _rep.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Name.Contains(input.SearchValue.Trim())) - .WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Code.Contains(input.SearchValue.Trim())) - //.Select((u) => new CompanyInput() - //{ - // CompanyID = u.Id, - // CompanyName = u.Name, - // Logo = u.logo, - // Id = u.Id, - // Info = u.Info, - // Title = u.Name, - // Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"), - //}) .ToPagedListAsync(input.PageNo, input.PageSize); return entities.XnPagedResult(); } diff --git a/GDZZ.Application/Service/UtilService.cs b/GDZZ.Application/Service/UtilService.cs index 4ba3c5d..7c5fa2f 100644 --- a/GDZZ.Application/Service/UtilService.cs +++ b/GDZZ.Application/Service/UtilService.cs @@ -37,8 +37,8 @@ namespace GDZZ.Application.Service { CreatedUserId = userID, PaymentMoney = prize, - Status = (int)RechargeEnum.Finish, - Type = (int)RechargeTypeEnum.Reward, + Status = RechargeEnum.Finish, + Type = RechargeTypeEnum.Reward, TotalPrice = prize }); if (recharge < 1) diff --git a/GDZZ.Application/Service/WXPay/Dto/RechargeOut.cs b/GDZZ.Application/Service/WXPay/Dto/RechargeOut.cs index 2405a57..d42a22e 100644 --- a/GDZZ.Application/Service/WXPay/Dto/RechargeOut.cs +++ b/GDZZ.Application/Service/WXPay/Dto/RechargeOut.cs @@ -20,9 +20,13 @@ namespace GDZZ.Application.Service.WXPay.Dto /// /// 充值状态 /// - public int Status { get; set; } + public PayStatusEnum Status { get; set; } + /// + /// 充值类型 + /// + public RechargeTypeEnum Type { get; set; } } } diff --git a/GDZZ.Application/Service/WXPay/WXPayService.cs b/GDZZ.Application/Service/WXPay/WXPayService.cs index 998541d..0496790 100644 --- a/GDZZ.Application/Service/WXPay/WXPayService.cs +++ b/GDZZ.Application/Service/WXPay/WXPayService.cs @@ -176,8 +176,8 @@ namespace GDZZ.Application.Service.WXPay var recharge = await this.rechargeRep.InsertReturnEntityAsync(new MiniRecharge() { PaymentMoney = authUserInput.Money, - Status = (int)RechargeEnum.NoFinis, - Type = (int)RechargeTypeEnum.StoredValue, + Status = RechargeEnum.NoFinis, + Type = RechargeTypeEnum.StoredValue, TotalPrice = authUserInput.Money }); @@ -186,7 +186,7 @@ namespace GDZZ.Application.Service.WXPay PaymentMoney = authUserInput.Money, OrderId = recharge.Id, PaySn = "", - PayStatus = (int)PayStatusEnum.NotPaying + PayStatus = PayStatusEnum.NotPaying }); int pMoney = (int)(authUserInput.Money * 100); @@ -254,13 +254,13 @@ namespace GDZZ.Application.Service.WXPay var paytake = await this.payTakeRep.Where(x => x.OrderId == paymentId).SingleAsync(); if (!paytake.IsEmpty()) { - paytake.PayStatus = (int)PayStatusEnum.Paying; + paytake.PayStatus = PayStatusEnum.Paying; this.payTakeRep.Update(paytake); } var recharge = await this.rechargeRep.Where(x => x.Id == paymentId).SingleAsync(); if (!recharge.IsEmpty()) { - recharge.Status = (int)RechargeEnum.Finish; + recharge.Status = RechargeEnum.Finish; this.rechargeRep.Update(recharge); var balan = await this.balance.AsQueryable().Filter("TenantId", true).Where(x => x.UserID == paytake.CreatedUserId).SingleAsync(); if (!balan.IsEmpty()) diff --git a/GDZZ.sln b/GDZZ.sln index b261343..83a7f6d 100644 --- a/GDZZ.sln +++ b/GDZZ.sln @@ -17,6 +17,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GDZZ.CodeFirst", "GDZZ.Code EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docker", "Docker", "{DFF1AFDC-3203-4914-AAFD-9303BC953C7E}" ProjectSection(SolutionItems) = preProject + db.txt = db.txt Dockerfile = Dockerfile EndProjectSection EndProject diff --git a/db.txt b/db.txt new file mode 100644 index 0000000..26b7910 --- /dev/null +++ b/db.txt @@ -0,0 +1,7 @@ +VUE_APP_API_BASE_URL=https://admin.gdzongzhi.com/api/ +VUE_APP_SOCKET_BASE_URL=wss://admin.gdzongzhi.com +VUE_APP_API_DRAWING_URL=https://admin.gdzongzhi.com/api + +VUE_APP_API_BASE_URL=http://localhost:8080 +VUE_APP_SOCKET_BASE_URL=ws://localhost:8080 +VUE_APP_API_DRAWING_URL=http://localhost:8080 \ No newline at end of file