单位认证表重构
This commit is contained in:
parent
369fed08f8
commit
1d7acde24e
162
YD_Event.Application/Merchant/Dtos/MerchantCertificationDtos.cs
Normal file
162
YD_Event.Application/Merchant/Dtos/MerchantCertificationDtos.cs
Normal file
@ -0,0 +1,162 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using YD_Event.Core.Enum;
|
||||
|
||||
namespace YD_Event.Application.Merchant.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 单位认证输出
|
||||
/// </summary>
|
||||
public class MerchantCertificationOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键ID
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
public string MerchantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统一社会信用代码
|
||||
/// </summary>
|
||||
public string CreditCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照图片URL
|
||||
/// </summary>
|
||||
public string BusinessLicenseUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系电话
|
||||
/// </summary>
|
||||
public string ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核状态
|
||||
/// </summary>
|
||||
public AuditStatus AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核备注
|
||||
/// </summary>
|
||||
public string? AuditRemark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交单位认证输入
|
||||
/// </summary>
|
||||
public class SubmitCertificationInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "单位名称不能为空")]
|
||||
public string MerchantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统一社会信用代码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "统一社会信用代码不能为空")]
|
||||
public string CreditCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照图片URL
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "请上传营业执照")]
|
||||
public string BusinessLicenseUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "地址不能为空")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系方式
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "联系方式不能为空")]
|
||||
[RegularExpression(@"^1[3456789]\d{9}$", ErrorMessage = "手机号格式不正确")]
|
||||
public string ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "验证码不能为空")]
|
||||
public string VerificationCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核单位认证输入
|
||||
/// </summary>
|
||||
public class AuditCertificationInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 认证ID列表
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "认证ID不能为空")]
|
||||
public List<long> Ids { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核状态
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "审核状态不能为空")]
|
||||
public AuditStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核备注
|
||||
/// </summary>
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位认证查询输入
|
||||
/// </summary>
|
||||
public class MerchantCertificationQueryInput : Pagination
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
public string? MerchantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系电话
|
||||
/// </summary>
|
||||
public string? ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核状态
|
||||
/// </summary>
|
||||
public AuditStatus? AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndTime { get; set; }
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace YD_Event.Application.Merchant.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 提交认证输入
|
||||
/// </summary>
|
||||
public class SubmitCertificationInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "单位名称不能为空")]
|
||||
public string MerchantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统一社会信用代码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "统一社会信用代码不能为空")]
|
||||
public string CreditCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照图片URL
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "请上传营业执照")]
|
||||
public string BusinessLicenseUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "地址不能为空")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系方式
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "联系方式不能为空")]
|
||||
[RegularExpression(@"^1[3456789]\d{9}$", ErrorMessage = "手机号格式不正确")]
|
||||
public string ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "验证码不能为空")]
|
||||
public string VerificationCode { get; set; }
|
||||
}
|
||||
219
YD_Event.Application/Merchant/MerchantCertificationService.cs
Normal file
219
YD_Event.Application/Merchant/MerchantCertificationService.cs
Normal file
@ -0,0 +1,219 @@
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using YD_Event.Application.Auth;
|
||||
using YD_Event.Application.Merchant.Dtos;
|
||||
using YD_Event.Core.Entities;
|
||||
using YD_Event.Core.Enum;
|
||||
using YD_Event.Core.Infrastructure.Aliyun.Sms;
|
||||
|
||||
namespace YD_Event.Application.Merchant;
|
||||
|
||||
/// <summary>
|
||||
/// 单位认证管理
|
||||
/// </summary>
|
||||
public class MerchantCertificationService : BaseService<MerchantCertification>, ITransient
|
||||
{
|
||||
private readonly ISqlSugarRepository<MerchantCertification> _repository;
|
||||
private readonly ISqlSugarRepository<YD_Event.Core.Entities.Merchant> _merchantRepository;
|
||||
private readonly AuthManager _authManager;
|
||||
private readonly IIdGenerator _idGenerator;
|
||||
private readonly IMemoryCache _memoryCache;
|
||||
private readonly AliyunSmsService _smsService;
|
||||
|
||||
public MerchantCertificationService(
|
||||
ISqlSugarRepository<MerchantCertification> repository,
|
||||
ISqlSugarRepository<YD_Event.Core.Entities.Merchant> merchantRepository,
|
||||
AuthManager authManager,
|
||||
IIdGenerator idGenerator,
|
||||
IMemoryCache memoryCache,
|
||||
AliyunSmsService smsService) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_merchantRepository = merchantRepository;
|
||||
_authManager = authManager;
|
||||
_idGenerator = idGenerator;
|
||||
_memoryCache = memoryCache;
|
||||
_smsService = smsService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
[DisplayName("发送验证码")]
|
||||
[HttpPost("sendVerificationCode")]
|
||||
[AllowAnonymous]
|
||||
public async Task SendVerificationCode([FromQuery] string phone)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(phone) || !System.Text.RegularExpressions.Regex.IsMatch(phone, @"^1[3456789]\d{9}$"))
|
||||
throw Oops.Bah("手机号格式不正确");
|
||||
|
||||
var code = new Random().Next(100000, 999999).ToString();
|
||||
_memoryCache.Set($"verification_code_{phone}", code, TimeSpan.FromMinutes(5));
|
||||
await _smsService.SendVerificationCodeAsync(phone, code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交单位认证
|
||||
/// </summary>
|
||||
[DisplayName("提交单位认证")]
|
||||
[HttpPost("submitCertification")]
|
||||
public async Task SubmitCertification(SubmitCertificationInput input)
|
||||
{
|
||||
if (!_memoryCache.TryGetValue($"verification_code_{input.ContactPhone}", out string? cachedCode) || cachedCode != input.VerificationCode)
|
||||
{
|
||||
throw Oops.Bah("验证码错误或已过期");
|
||||
}
|
||||
|
||||
var userId = _authManager.UserId;
|
||||
var certification = await _repository.GetFirstAsync(c => c.UserId == userId && !c.DeleteMark);
|
||||
|
||||
if (certification == null)
|
||||
{
|
||||
certification = new MerchantCertification
|
||||
{
|
||||
Id = _idGenerator.NextId(),
|
||||
UserId = userId,
|
||||
MerchantName = input.MerchantName,
|
||||
CreditCode = input.CreditCode,
|
||||
BusinessLicenseUrl = input.BusinessLicenseUrl,
|
||||
Address = input.Address,
|
||||
ContactPhone = input.ContactPhone,
|
||||
AuditStatus = AuditStatus.PendingAudit,
|
||||
Status = AvailabilityStatus.Enable,
|
||||
DeleteMark = false,
|
||||
CreatedUserId = userId,
|
||||
CreatedTime = DateTime.Now
|
||||
};
|
||||
await _repository.InsertAsync(certification);
|
||||
}
|
||||
else
|
||||
{
|
||||
certification.MerchantName = input.MerchantName;
|
||||
certification.CreditCode = input.CreditCode;
|
||||
certification.BusinessLicenseUrl = input.BusinessLicenseUrl;
|
||||
certification.Address = input.Address;
|
||||
certification.ContactPhone = input.ContactPhone;
|
||||
certification.AuditStatus = AuditStatus.PendingAudit;
|
||||
certification.UpdatedUserId = userId;
|
||||
certification.UpdatedTime = DateTime.Now;
|
||||
await _repository.UpdateAsync(certification);
|
||||
}
|
||||
|
||||
_memoryCache.Remove($"verification_code_{input.ContactPhone}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取我的认证信息
|
||||
/// </summary>
|
||||
[DisplayName("获取我的认证信息")]
|
||||
[HttpGet("myCertification")]
|
||||
public async Task<MerchantCertificationOutput?> GetMyCertification()
|
||||
{
|
||||
var userId = _authManager.UserId;
|
||||
var certification = await _repository.GetFirstAsync(c => c.UserId == userId && !c.DeleteMark);
|
||||
return certification?.Adapt<MerchantCertificationOutput>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位认证分页查询
|
||||
/// </summary>
|
||||
[DisplayName("单位认证分页查询")]
|
||||
[HttpGet("page")]
|
||||
public async Task<PageResult<MerchantCertificationOutput>> Page([FromQuery] MerchantCertificationQueryInput input)
|
||||
{
|
||||
var pageResult = await _repository.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.MerchantName), x => x.MerchantName.Contains(input.MerchantName))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.ContactPhone), x => x.ContactPhone.Contains(input.ContactPhone))
|
||||
.WhereIF(input.AuditStatus.HasValue, x => x.AuditStatus == input.AuditStatus)
|
||||
.WhereIF(input.StartTime.HasValue, x => x.CreatedTime >= input.StartTime)
|
||||
.WhereIF(input.EndTime.HasValue, x => x.CreatedTime <= input.EndTime)
|
||||
.OrderByDescending(x => x.CreatedTime)
|
||||
.Select(x => new MerchantCertificationOutput
|
||||
{
|
||||
Id = x.Id,
|
||||
UserId = x.UserId,
|
||||
MerchantName = x.MerchantName,
|
||||
CreditCode = x.CreditCode,
|
||||
BusinessLicenseUrl = x.BusinessLicenseUrl,
|
||||
ContactPhone = x.ContactPhone,
|
||||
Address = x.Address,
|
||||
AuditStatus = x.AuditStatus,
|
||||
AuditRemark = x.AuditRemark,
|
||||
CreatedTime = x.CreatedTime,
|
||||
UpdatedTime = x.UpdatedTime
|
||||
})
|
||||
.ToPagedListAsync(input);
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位认证详情
|
||||
/// </summary>
|
||||
[DisplayName("获取单位认证详情")]
|
||||
[HttpGet("detail")]
|
||||
public async Task<MerchantCertificationOutput?> Detail([FromQuery] long id)
|
||||
{
|
||||
var certification = await _repository.GetByIdAsync(id);
|
||||
return certification?.Adapt<MerchantCertificationOutput>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核单位认证
|
||||
/// </summary>
|
||||
[DisplayName("审核单位认证")]
|
||||
[HttpPost("audit")]
|
||||
[UnitOfWork]
|
||||
public async Task Audit([FromBody] AuditCertificationInput input)
|
||||
{
|
||||
if (input.Ids == null || !input.Ids.Any()) return;
|
||||
|
||||
var certifications = await _repository.GetListAsync(c => input.Ids.Contains(c.Id) && !c.DeleteMark);
|
||||
var userId = _authManager.UserId;
|
||||
|
||||
foreach (var certification in certifications)
|
||||
{
|
||||
certification.AuditStatus = input.Status;
|
||||
certification.AuditRemark = input.Remark;
|
||||
certification.UpdatedUserId = userId;
|
||||
certification.UpdatedTime = DateTime.Now;
|
||||
|
||||
if (input.Status == AuditStatus.Pass)
|
||||
{
|
||||
var merchant = await _merchantRepository.GetFirstAsync(m => m.CreatedUserId == certification.UserId && !m.DeleteMark);
|
||||
if (merchant == null)
|
||||
{
|
||||
merchant = new YD_Event.Core.Entities.Merchant
|
||||
{
|
||||
Id = _idGenerator.NextId(),
|
||||
MerchantName = certification.MerchantName,
|
||||
CreditCode = certification.CreditCode,
|
||||
BusinessLicenseUrl = certification.BusinessLicenseUrl,
|
||||
Address = certification.Address,
|
||||
ContactPhone = certification.ContactPhone,
|
||||
BankName = "",
|
||||
AccountNumber = "",
|
||||
AuditStatus = AuditStatus.Pass,
|
||||
Status = AvailabilityStatus.Enable,
|
||||
DeleteMark = false,
|
||||
CreatedUserId = certification.UserId,
|
||||
CreatedTime = DateTime.Now
|
||||
};
|
||||
await _merchantRepository.InsertAsync(merchant);
|
||||
}
|
||||
else
|
||||
{
|
||||
merchant.MerchantName = certification.MerchantName;
|
||||
merchant.CreditCode = certification.CreditCode;
|
||||
merchant.BusinessLicenseUrl = certification.BusinessLicenseUrl;
|
||||
merchant.Address = certification.Address;
|
||||
merchant.ContactPhone = certification.ContactPhone;
|
||||
merchant.UpdatedUserId = userId;
|
||||
merchant.UpdatedTime = DateTime.Now;
|
||||
await _merchantRepository.UpdateAsync(merchant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await _repository.UpdateRangeAsync(certifications);
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,5 @@
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using YD_Event.Application.Auth;
|
||||
using YD_Event.Application.Merchant.Dtos;
|
||||
using YD_Event.Core.Infrastructure.Aliyun.Sms;
|
||||
using YD_Event.Core.Entities;
|
||||
using YD_Event.Core.Enum;
|
||||
|
||||
@ -17,113 +15,18 @@ public class MerchantService : BaseService<YD_Event.Core.Entities.Merchant>, ITr
|
||||
private readonly ISqlSugarRepository<WeChatPayConfig> _weChatPayConfigRepository;
|
||||
private readonly AuthManager _authManager;
|
||||
private readonly IIdGenerator _idGenerator;
|
||||
private readonly IMemoryCache _memoryCache;
|
||||
private readonly AliyunSmsService _smsService;
|
||||
|
||||
public MerchantService(ISqlSugarRepository<YD_Event.Core.Entities.Merchant> repository,
|
||||
ISqlSugarRepository<UserCoupon> userCouponRepository,
|
||||
ISqlSugarRepository<WeChatPayConfig> weChatPayConfigRepository,
|
||||
AuthManager authManager,
|
||||
IIdGenerator idGenerator,
|
||||
IMemoryCache memoryCache,
|
||||
AliyunSmsService smsService) : base(repository)
|
||||
IIdGenerator idGenerator) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_userCouponRepository = userCouponRepository;
|
||||
_weChatPayConfigRepository = weChatPayConfigRepository;
|
||||
_authManager = authManager;
|
||||
_idGenerator = idGenerator;
|
||||
_memoryCache = memoryCache;
|
||||
_smsService = smsService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送验证码
|
||||
/// </summary>
|
||||
[DisplayName("发送验证码")]
|
||||
[HttpPost("sendVerificationCode")]
|
||||
[AllowAnonymous]
|
||||
public async Task SendVerificationCode([FromQuery] string phone)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(phone) || !System.Text.RegularExpressions.Regex.IsMatch(phone, @"^1[3456789]\d{9}$"))
|
||||
throw Oops.Bah("手机号格式不正确");
|
||||
|
||||
// 生成6位验证码
|
||||
var code = new Random().Next(100000, 999999).ToString();
|
||||
|
||||
// 存入缓存,有效期5分钟
|
||||
_memoryCache.Set($"verification_code_{phone}", code, TimeSpan.FromMinutes(5));
|
||||
|
||||
// 发送短信
|
||||
await _smsService.SendVerificationCodeAsync(phone, code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交单位认证
|
||||
/// </summary>
|
||||
[DisplayName("提交单位认证")]
|
||||
[HttpPost("submitCertification")]
|
||||
public async Task SubmitCertification(SubmitCertificationInput input)
|
||||
{
|
||||
// 验证验证码
|
||||
if (!_memoryCache.TryGetValue($"verification_code_{input.ContactPhone}", out string? cachedCode) || cachedCode != input.VerificationCode)
|
||||
{
|
||||
throw Oops.Bah("验证码错误或已过期");
|
||||
}
|
||||
|
||||
// 获取当前用户关联的商户信息
|
||||
var userId = _authManager.UserId;
|
||||
var merchant = await _repository.GetFirstAsync(m => m.CreatedUserId == userId);
|
||||
|
||||
if (merchant == null)
|
||||
{
|
||||
// 新增商户
|
||||
merchant = new YD_Event.Core.Entities.Merchant
|
||||
{
|
||||
Id = _idGenerator.NextId(),
|
||||
MerchantName = input.MerchantName,
|
||||
CreditCode = input.CreditCode,
|
||||
BusinessLicenseUrl = input.BusinessLicenseUrl,
|
||||
Address = input.Address,
|
||||
ContactPhone = input.ContactPhone,
|
||||
BankName = "", // 默认为空,后续完善
|
||||
AccountNumber = "", // 默认为空,后续完善
|
||||
AuditStatus = AuditStatus.PendingAudit, // 待审核
|
||||
Status = AvailabilityStatus.Enable,
|
||||
CreatedUserId = userId,
|
||||
CreatedTime = DateTime.Now
|
||||
};
|
||||
await _repository.InsertAsync(merchant);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 更新商户信息
|
||||
merchant.MerchantName = input.MerchantName;
|
||||
merchant.CreditCode = input.CreditCode;
|
||||
merchant.BusinessLicenseUrl = input.BusinessLicenseUrl;
|
||||
merchant.Address = input.Address;
|
||||
merchant.ContactPhone = input.ContactPhone;
|
||||
merchant.AuditStatus = AuditStatus.PendingAudit; // 重新提交后变为待审核
|
||||
merchant.UpdatedUserId = userId;
|
||||
merchant.UpdatedTime = DateTime.Now;
|
||||
|
||||
await _repository.UpdateAsync(merchant);
|
||||
}
|
||||
|
||||
// 清除验证码
|
||||
_memoryCache.Remove($"verification_code_{input.ContactPhone}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取我的认证信息
|
||||
/// </summary>
|
||||
[DisplayName("获取我的认证信息")]
|
||||
[HttpGet("myCertification")]
|
||||
public async Task<YD_Event.Core.Entities.Merchant> GetMyCertification()
|
||||
{
|
||||
var userId = _authManager.UserId;
|
||||
var merchant = await _repository.GetFirstAsync(m => m.CreatedUserId == userId);
|
||||
return merchant;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -263,25 +166,6 @@ public class MerchantService : BaseService<YD_Event.Core.Entities.Merchant>, ITr
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核商户
|
||||
/// </summary>
|
||||
[DisplayName("审核商户")]
|
||||
[HttpPost("audit")]
|
||||
[UnitOfWork]
|
||||
public async Task Audit([FromBody] MerchantAuditInput input)
|
||||
{
|
||||
if (input.Ids == null || !input.Ids.Any()) return;
|
||||
|
||||
await _repository.UpdateAsync(u => new YD_Event.Core.Entities.Merchant
|
||||
{
|
||||
AuditStatus = input.Status,
|
||||
AuditRemark = input.Remark,
|
||||
UpdatedTime = DateTime.Now,
|
||||
UpdatedUserId = _authManager.UserId
|
||||
}, u => input.Ids.Contains(u.Id));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发放优惠券
|
||||
/// </summary>
|
||||
|
||||
@ -6063,6 +6063,151 @@
|
||||
微信支付配置
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput">
|
||||
<summary>
|
||||
单位认证输出
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.Id">
|
||||
<summary>
|
||||
主键ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.UserId">
|
||||
<summary>
|
||||
用户ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.MerchantName">
|
||||
<summary>
|
||||
单位名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.CreditCode">
|
||||
<summary>
|
||||
统一社会信用代码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.BusinessLicenseUrl">
|
||||
<summary>
|
||||
营业执照图片URL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.ContactPhone">
|
||||
<summary>
|
||||
联系电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.Address">
|
||||
<summary>
|
||||
地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.AuditStatus">
|
||||
<summary>
|
||||
审核状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.AuditRemark">
|
||||
<summary>
|
||||
审核备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.CreatedTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationOutput.UpdatedTime">
|
||||
<summary>
|
||||
更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput">
|
||||
<summary>
|
||||
提交单位认证输入
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.MerchantName">
|
||||
<summary>
|
||||
单位名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.CreditCode">
|
||||
<summary>
|
||||
统一社会信用代码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.BusinessLicenseUrl">
|
||||
<summary>
|
||||
营业执照图片URL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.Address">
|
||||
<summary>
|
||||
地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.ContactPhone">
|
||||
<summary>
|
||||
联系方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.VerificationCode">
|
||||
<summary>
|
||||
验证码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.AuditCertificationInput">
|
||||
<summary>
|
||||
审核单位认证输入
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.AuditCertificationInput.Ids">
|
||||
<summary>
|
||||
认证ID列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.AuditCertificationInput.Status">
|
||||
<summary>
|
||||
审核状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.AuditCertificationInput.Remark">
|
||||
<summary>
|
||||
审核备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput">
|
||||
<summary>
|
||||
单位认证查询输入
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput.MerchantName">
|
||||
<summary>
|
||||
单位名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput.ContactPhone">
|
||||
<summary>
|
||||
联系电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput.AuditStatus">
|
||||
<summary>
|
||||
审核状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput.StartTime">
|
||||
<summary>
|
||||
开始时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput.EndTime">
|
||||
<summary>
|
||||
结束时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.MerchantOutput">
|
||||
<summary>
|
||||
商户输出DTO
|
||||
@ -6238,41 +6383,6 @@
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput">
|
||||
<summary>
|
||||
提交认证输入
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.MerchantName">
|
||||
<summary>
|
||||
单位名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.CreditCode">
|
||||
<summary>
|
||||
统一社会信用代码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.BusinessLicenseUrl">
|
||||
<summary>
|
||||
营业执照图片URL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.Address">
|
||||
<summary>
|
||||
地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.ContactPhone">
|
||||
<summary>
|
||||
联系方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Application.Merchant.Dtos.SubmitCertificationInput.VerificationCode">
|
||||
<summary>
|
||||
验证码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.Dtos.UpdateMerchantInput">
|
||||
<summary>
|
||||
更新商户输入
|
||||
@ -6353,26 +6463,46 @@
|
||||
可用状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.MerchantService">
|
||||
<member name="T:YD_Event.Application.Merchant.MerchantCertificationService">
|
||||
<summary>
|
||||
商户管理
|
||||
单位认证管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.SendVerificationCode(System.String)">
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.SendVerificationCode(System.String)">
|
||||
<summary>
|
||||
发送验证码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.SubmitCertification(YD_Event.Application.Merchant.Dtos.SubmitCertificationInput)">
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.SubmitCertification(YD_Event.Application.Merchant.Dtos.SubmitCertificationInput)">
|
||||
<summary>
|
||||
提交单位认证
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.GetMyCertification">
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.GetMyCertification">
|
||||
<summary>
|
||||
获取我的认证信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.Page(YD_Event.Application.Merchant.Dtos.MerchantCertificationQueryInput)">
|
||||
<summary>
|
||||
单位认证分页查询
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.Detail(System.Int64)">
|
||||
<summary>
|
||||
获取单位认证详情
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantCertificationService.Audit(YD_Event.Application.Merchant.Dtos.AuditCertificationInput)">
|
||||
<summary>
|
||||
审核单位认证
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Application.Merchant.MerchantService">
|
||||
<summary>
|
||||
商户管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.Page(YD_Event.Application.Merchant.Dtos.MerchantQueryInput)">
|
||||
<summary>
|
||||
商户分页查询
|
||||
@ -6398,11 +6528,6 @@
|
||||
获取商户详情
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.Audit(YD_Event.Application.Merchant.Dtos.MerchantAuditInput)">
|
||||
<summary>
|
||||
审核商户
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Merchant.MerchantService.IssueCoupon(YD_Event.Application.Merchant.Dtos.IssueCouponInput)">
|
||||
<summary>
|
||||
发放优惠券
|
||||
|
||||
86
YD_Event.Core/Entities/MerchantCertification.cs
Normal file
86
YD_Event.Core/Entities/MerchantCertification.cs
Normal file
@ -0,0 +1,86 @@
|
||||
using YD_Event.Core.Enum;
|
||||
|
||||
namespace YD_Event.Core.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 单位认证表
|
||||
/// </summary>
|
||||
[SugarTable("MerchantCertification")]
|
||||
public class MerchantCertification : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位名称
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 128)]
|
||||
public string MerchantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统一社会信用代码
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string CreditCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照图片URL
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 256)]
|
||||
public string BusinessLicenseUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系电话
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 16)]
|
||||
public string ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 256)]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核状态
|
||||
/// </summary>
|
||||
public AuditStatus AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核备注
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 512)]
|
||||
public string? AuditRemark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 可用状态
|
||||
/// </summary>
|
||||
public AvailabilityStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标记删除
|
||||
/// </summary>
|
||||
public bool DeleteMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public long CreatedUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
public long? UpdatedUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
@ -2455,6 +2455,81 @@
|
||||
更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Core.Entities.MerchantCertification">
|
||||
<summary>
|
||||
单位认证表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.UserId">
|
||||
<summary>
|
||||
用户ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.MerchantName">
|
||||
<summary>
|
||||
单位名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.CreditCode">
|
||||
<summary>
|
||||
统一社会信用代码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.BusinessLicenseUrl">
|
||||
<summary>
|
||||
营业执照图片URL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.ContactPhone">
|
||||
<summary>
|
||||
联系电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.Address">
|
||||
<summary>
|
||||
地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.AuditStatus">
|
||||
<summary>
|
||||
审核状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.AuditRemark">
|
||||
<summary>
|
||||
审核备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.Status">
|
||||
<summary>
|
||||
可用状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.DeleteMark">
|
||||
<summary>
|
||||
标记删除
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.CreatedUserId">
|
||||
<summary>
|
||||
创建人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.CreatedTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.UpdatedUserId">
|
||||
<summary>
|
||||
更新人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:YD_Event.Core.Entities.MerchantCertification.UpdatedTime">
|
||||
<summary>
|
||||
更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:YD_Event.Core.Entities.Order">
|
||||
<summary>
|
||||
订单表
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user