修改支付类型枚举

development
温天培 11 months ago
parent f216b2ad86
commit c8cfb8f263

@ -0,0 +1,29 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
using GDZZ.Application.Enum;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 候选人管理表
/// </summary>
[SugarTable("mini_candidate")]
[Description("候选人管理表")]
public class Candidate : DEntityBase
{
/// <summary>
/// 猎头ID
/// </summary>
public long HeadID { get; set; }
/// <summary>
/// 候选人ID
/// </summary>
public long CanndidateID { get; set; }
/// <summary>
/// 状态
/// </summary>
public CandidateEnum Status { get; set; }
}
}

@ -22,7 +22,7 @@ namespace GDZZ.Application.Entity
/// <summary>
/// 支付状态
/// </summary>
public int PayStatus { get; set; }
public PayStatusEnum PayStatus { get; set; }
/// <summary>
/// 金额
/// </summary>

@ -22,10 +22,10 @@ namespace GDZZ.Application.Entity
/// <summary>
/// 充值状态
/// </summary>
public int Status { get; set; }
public RechargeEnum Status { get; set; }
/// <summary>
/// 充值类型
/// </summary>
public int Type { get; set; }
public RechargeTypeEnum Type { get; set; }
}
}

@ -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
{
/// <summary>
/// 请求合作
/// </summary>
[Description("请求合作")] REQUEST = 0,
/// <summary>
/// 同意合作
/// </summary>
[Description("同意合作")] AGREE = 1,
/// <summary>
/// 解除合作
/// </summary>
[Description("解除合作")] SECURE = 2,
}
}

@ -89,6 +89,26 @@
描述
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Candidate">
<summary>
候选人管理表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Candidate.HeadID">
<summary>
猎头ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Candidate.CanndidateID">
<summary>
候选人ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Candidate.Status">
<summary>
状态
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Company">
<summary>
公司属性
@ -799,6 +819,21 @@
待审核
</summary>
</member>
<member name="F:GDZZ.Application.Enum.CandidateEnum.REQUEST">
<summary>
请求合作
</summary>
</member>
<member name="F:GDZZ.Application.Enum.CandidateEnum.AGREE">
<summary>
同意合作
</summary>
</member>
<member name="F:GDZZ.Application.Enum.CandidateEnum.SECURE">
<summary>
解除合作
</summary>
</member>
<member name="F:GDZZ.Application.Enum.ResumeTypeEnum.Hot">
<summary>
热招
@ -1433,6 +1468,11 @@
充值状态
</summary>
</member>
<member name="P:GDZZ.Application.Service.WXPay.Dto.RechargeOut.Type">
<summary>
充值类型
</summary>
</member>
<member name="T:GDZZ.Application.Service.WXPay.IWXPayService">
<summary>
微信支付
@ -1862,6 +1902,133 @@
开放平台ID
</summary>
</member>
<member name="T:GDZZ.Application.CandidateService">
<summary>
猎头合作管理服务
</summary>
</member>
<member name="M:GDZZ.Application.CandidateService.AddOrUpdate(GDZZ.Application.AddCandidateInput)">
<summary>
新增合作
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CandidateService.Page(GDZZ.Application.CandidateInput)">
<summary>
分页查询猎头合作管理
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CandidateService.Delete(GDZZ.Application.DeleteCandidateInput)">
<summary>
删除猎头合作管理
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CandidateService.Update(GDZZ.Application.UpdateCandidateInput)">
<summary>
更新猎头合作管理
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CandidateService.Get(GDZZ.Application.QueryeCandidateInput)">
<summary>
获取猎头合作管理
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CandidateService.List(GDZZ.Application.CandidateInput)">
<summary>
获取猎头合作管理列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.CandidateDto">
<summary>
猎头合作管理输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CandidateDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CandidateDto.HeadID">
<summary>
猎头ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateDto.CanndidateID">
<summary>
候选人ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateDto.Status">
<summary>
状态
</summary>
</member>
<member name="T:GDZZ.Application.CandidateInput">
<summary>
猎头合作管理输入参数
</summary>
</member>
<member name="P:GDZZ.Application.CandidateInput.HeadID">
<summary>
猎头ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateInput.CanndidateID">
<summary>
候选人ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateInput.Status">
<summary>
状态
</summary>
</member>
<member name="P:GDZZ.Application.DeleteCandidateInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateCandidateInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.CandidateOutput">
<summary>
猎头合作管理输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CandidateOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CandidateOutput.HeadID">
<summary>
猎头ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateOutput.CanndidateID">
<summary>
候选人ID
</summary>
</member>
<member name="P:GDZZ.Application.CandidateOutput.Status">
<summary>
状态
</summary>
</member>
<member name="T:GDZZ.Application.CompanyService">
<summary>
公司属性服务

@ -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
{
/// <summary>
/// 猎头合作管理服务
/// </summary>
[ApiDescriptionSettings("Application",Name = "Candidate", Order = 1)]
public class CandidateService : ICandidateService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<Candidate> _rep;
public CandidateService(SqlSugarRepository<Candidate> rep)
{
_rep = rep;
}
/// <summary>
/// 新增合作
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[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<Candidate>();
await _rep.InsertAsync(entity);
}
else
{
res.Status = input.Status;
await _rep.UpdateAsync(res);
}
}
/// <summary>
/// 分页查询猎头合作管理
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Candidate/page")]
public async Task<dynamic> Page([FromQuery] CandidateInput input)
{
var entities = await _rep.AsQueryable()
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
/// <summary>
/// 删除猎头合作管理
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Candidate/delete")]
public async Task Delete(DeleteCandidateInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
await _rep.DeleteAsync(entity);
}
/// <summary>
/// 更新猎头合作管理
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Candidate/edit")]
public async Task Update(UpdateCandidateInput input)
{
var entity = input.Adapt<Candidate>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommandAsync();
}
/// <summary>
/// 获取猎头合作管理
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Candidate/detail")]
public async Task<Candidate> Get([FromQuery] QueryeCandidateInput input)
{
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
}
/// <summary>
/// 获取猎头合作管理列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Candidate/list")]
public async Task<dynamic> List([FromQuery] CandidateInput input)
{
return await _rep.ToListAsync();
}
}
}

@ -0,0 +1,32 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 猎头合作管理输出参数
/// </summary>
public class CandidateDto
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 猎头ID
/// </summary>
public long HeadID { get; set; }
/// <summary>
/// 候选人ID
/// </summary>
public long CanndidateID { get; set; }
/// <summary>
/// 状态
/// </summary>
public int Status { get; set; }
}
}

@ -0,0 +1,58 @@
using GDZZ.Application.Enum;
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 猎头合作管理输入参数
/// </summary>
public class CandidateInput : PageInputBase
{
/// <summary>
/// 猎头ID
/// </summary>
public virtual long HeadID { get; set; }
/// <summary>
/// 候选人ID
/// </summary>
public virtual long CanndidateID { get; set; }
/// <summary>
/// 状态
/// </summary>
public virtual CandidateEnum Status { get; set; }
}
public class AddCandidateInput : CandidateInput
{
}
public class DeleteCandidateInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class UpdateCandidateInput : CandidateInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class QueryeCandidateInput : DeleteCandidateInput
{
}
}

@ -0,0 +1,31 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 猎头合作管理输出参数
/// </summary>
public class CandidateOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 猎头ID
/// </summary>
public long HeadID { get; set; }
/// <summary>
/// 候选人ID
/// </summary>
public long CanndidateID { get; set; }
/// <summary>
/// 状态
/// </summary>
public int Status { get; set; }
}
}

@ -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<Candidate> Get([FromQuery] QueryeCandidateInput input);
Task<dynamic> List([FromQuery] CandidateInput input);
Task<dynamic> Page([FromQuery] CandidateInput input);
Task Update(UpdateCandidateInput input);
}
}

@ -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();
}

@ -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)

@ -20,9 +20,13 @@ namespace GDZZ.Application.Service.WXPay.Dto
/// <summary>
/// 充值状态
/// </summary>
public int Status { get; set; }
public PayStatusEnum Status { get; set; }
/// <summary>
/// 充值类型
/// </summary>
public RechargeTypeEnum Type { get; set; }
}
}

@ -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())

@ -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

@ -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
Loading…
Cancel
Save