diff --git a/YD_Event.Application/AppUser/AppUserService.cs b/YD_Event.Application/AppUser/AppUserService.cs index 8ee5dc2..06413ef 100644 --- a/YD_Event.Application/AppUser/AppUserService.cs +++ b/YD_Event.Application/AppUser/AppUserService.cs @@ -105,7 +105,7 @@ public class AppUserService : BaseService, ITransient .Where(x => x.PersonType == input.PersonType && !x.DeleteMark) .WhereIF(!string.IsNullOrWhiteSpace(input.Name), x => x.Name.Contains(input.Name)) .WhereIF(input.Gender.HasValue, x => x.Gender == input.Gender) - .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), x => x.Mobile.Contains(input.Phone)) + .WhereIF(!string.IsNullOrWhiteSpace(input.Mobile), x => x.Mobile.Contains(input.Mobile)) .WhereIF(!string.IsNullOrWhiteSpace(input.IdCardNumber), u => u.IdCardNumber.Contains(input.IdCardNumber)) .WhereIF(input.PersonType == PersonType.Coach && !string.IsNullOrWhiteSpace(input.SkillLevel), x => x.SkillLevel == input.SkillLevel) .WhereIF(input.PersonType == PersonType.Coach && input.CertificationStatus.HasValue, x => x.CertificationStatus == input.CertificationStatus) @@ -142,10 +142,10 @@ public class AppUserService : BaseService, ITransient // 校验唯一性 (手机号或身份证号,具体根据角色定) // 运动员主要查身份证,领队教练查手机号。这里综合校验。 var queryPhone = _appUserRep.AsQueryable() - .Where(x => x.Mobile == input.Phone && x.PersonType == input.PersonType && !x.DeleteMark); + .Where(x => x.Mobile == input.Mobile && x.PersonType == input.PersonType && !x.DeleteMark); var queryIdCard = _appUserRep.AsQueryable() - .Where(x => x.IdCardNumber == input.IdCard && x.PersonType == input.PersonType && !x.DeleteMark); + .Where(x => x.IdCardNumber == input.IdCardNumber && x.PersonType == input.PersonType && !x.DeleteMark); if (input.Id.HasValue) { @@ -201,11 +201,11 @@ public class AppUserService : BaseService, ITransient entity.Name = input.Name; entity.Gender = input.Gender; - entity.IdCardNumber = input.IdCard; + entity.IdCardNumber = input.IdCardNumber; entity.IdCardImageUrl = input.IdCardUrl; - entity.Mobile = input.Phone; + entity.Mobile = input.Mobile; entity.Remark = input.Remark; - entity.AuditRemark = ""; + entity.AuditRemark = ""; // 计算年龄逻辑 if (input.BirthDate.HasValue) diff --git a/YD_Event.Application/AppUser/Dtos/AppUserDtos.cs b/YD_Event.Application/AppUser/Dtos/AppUserDtos.cs index aadd730..50528fb 100644 --- a/YD_Event.Application/AppUser/Dtos/AppUserDtos.cs +++ b/YD_Event.Application/AppUser/Dtos/AppUserDtos.cs @@ -64,7 +64,7 @@ public class MemberQueryInput : Pagination /// /// 联系电话 /// - public string? Phone { get; set; } + public string? Mobile { get; set; } /// /// 身份证号 (运动员常用) @@ -157,7 +157,7 @@ public class CreateOrUpdateMemberInput /// //[Required(ErrorMessage = "身份证号不能为空")] //[RegularExpression(@"(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)", ErrorMessage = "身份证号格式不正确")] - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 身份证图片URL @@ -174,7 +174,7 @@ public class CreateOrUpdateMemberInput /// [Required(ErrorMessage = "联系电话不能为空")] [RegularExpression(@"^1[3456789]\d{9}$", ErrorMessage = "手机号格式不正确")] - public string Phone { get; set; } + public string Mobile { get; set; } /// /// 技能等级(教练特有) diff --git a/YD_Event.Application/Certificate/Dtos/CertificateTemplateDtos.cs b/YD_Event.Application/Certificate/Dtos/CertificateTemplateDtos.cs index dd313ab..a0f1193 100644 --- a/YD_Event.Application/Certificate/Dtos/CertificateTemplateDtos.cs +++ b/YD_Event.Application/Certificate/Dtos/CertificateTemplateDtos.cs @@ -302,7 +302,7 @@ public class CertificateTemplateOutput /// /// 状态 /// - public string Status { get; set; } + public AvailabilityStatus Status { get; set; } /// /// 创建时间 diff --git a/YD_Event.Application/Certificate/Dtos/CreateCertificateInput.cs b/YD_Event.Application/Certificate/Dtos/CreateCertificateInput.cs deleted file mode 100644 index c8eabfc..0000000 --- a/YD_Event.Application/Certificate/Dtos/CreateCertificateInput.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace YD_Event.Application.Certificate.Dtos -{ - /// - /// 创建证书输入参数 - /// - public class CreateCertificateInput - { - /// - /// 证书名称 - /// - [Required(ErrorMessage = "证书名称不能为空")] - [StringLength(100, ErrorMessage = "证书名称长度不能超过100个字符")] - public string Name { get; set; } - - /// - /// 证书标题 - /// - [Required(ErrorMessage = "证书标题不能为空")] - [StringLength(200, ErrorMessage = "证书标题长度不能超过200个字符")] - public string Title { get; set; } - - /// - /// 发放规则 - /// - [StringLength(500, ErrorMessage = "发放规则长度不能超过500个字符")] - public string IssueRule { get; set; } - - /// - /// 证书模板内容 - /// - public string TemplateContent { get; set; } - - /// - /// 二维码地址 - /// - [StringLength(200, ErrorMessage = "二维码地址长度不能超过200个字符")] - public string QrCodeUrl { get; set; } - - /// - /// 证书状态 - /// - [Required(ErrorMessage = "证书状态不能为空")] - public AvailabilityStatus Status { get; set; } - - /// - /// 排序 - /// - public int Sort { get; set; } - } -} \ No newline at end of file diff --git a/YD_Event.Application/Client/Dtos/EventClientDtos.cs b/YD_Event.Application/Client/Dtos/EventClientDtos.cs index 05d82c3..9b817ed 100644 --- a/YD_Event.Application/Client/Dtos/EventClientDtos.cs +++ b/YD_Event.Application/Client/Dtos/EventClientDtos.cs @@ -321,7 +321,7 @@ public class PersonInput /// 身份证号 /// [Required] - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 性别 @@ -331,7 +331,7 @@ public class PersonInput /// /// 电话 /// - public string Phone { get; set; } + public string Mobile { get; set; } /// /// 出生日期 @@ -413,7 +413,7 @@ public class UpdatePlayerInput /// 身份证号 /// [Required] - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 性别 @@ -423,7 +423,7 @@ public class UpdatePlayerInput /// /// 电话 /// - public string Phone { get; set; } + public string Mobile { get; set; } } /// @@ -587,7 +587,7 @@ public class RegistrationPersonDto /// /// 身份证号 /// - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 性别 @@ -597,7 +597,7 @@ public class RegistrationPersonDto /// /// 电话 /// - public string Phone { get; set; } + public string Mobile { get; set; } } /// diff --git a/YD_Event.Application/Client/EventClientController.cs b/YD_Event.Application/Client/EventClientController.cs index 7fe5516..4a1816e 100644 --- a/YD_Event.Application/Client/EventClientController.cs +++ b/YD_Event.Application/Client/EventClientController.cs @@ -359,9 +359,9 @@ public class EventClientController : IDynamicApiController PersonType = PersonType.Athlete, // 运动员 Name = pInput.Name, Gender = pInput.Gender, - IdCard = pInput.IdCard, + IdCard = pInput.IdCardNumber, BirthDate = pInput.BirthDate, - Phone = pInput.Phone, + Phone = pInput.Mobile, GroupName = item.GroupName, ProjectName = project.Name, CreatedUserId = userId, @@ -437,9 +437,9 @@ public class EventClientController : IDynamicApiController if (reg == null || reg.CreatedUserId != userId) throw Oops.Bah("无权操作"); person.Name = input.Name; - person.IdCard = input.IdCard; + person.IdCard = input.IdCardNumber; person.Gender = input.Gender; - person.Phone = input.Phone; + person.Phone = input.Mobile; person.UpdatedTime = DateTime.Now; person.UpdatedUserId = userId; @@ -545,9 +545,9 @@ public class EventClientController : IDynamicApiController { Id = p.Id, Name = p.Name, - IdCard = p.IdCard, + IdCardNumber = p.IdCard, Gender = p.Gender, - Phone = p.Phone + Mobile = p.Phone }).ToList() }).ToList() }; diff --git a/YD_Event.Application/Event/Dtos/ScoreDtos.cs b/YD_Event.Application/Event/Dtos/ScoreDtos.cs index b6f3b0d..73e0cb0 100644 --- a/YD_Event.Application/Event/Dtos/ScoreDtos.cs +++ b/YD_Event.Application/Event/Dtos/ScoreDtos.cs @@ -104,7 +104,7 @@ public class CoachLeaderQueryInput : Pagination /// /// 电话 /// - public string? Phone { get; set; } + public string? Mobile { get; set; } } /// @@ -135,12 +135,12 @@ public class CoachLeaderListOutput /// /// 身份证号 /// - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 电话 /// - public string Phone { get; set; } + public string Mobile { get; set; } /// /// 证书ID diff --git a/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs b/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs index d84535c..67969ad 100644 --- a/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs +++ b/YD_Event.Application/Event/Dtos/UserCompetitionDtos.cs @@ -326,7 +326,7 @@ public class UserTeamMemberOutput /// /// 身份证号 (脱敏显示) /// - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 性别 diff --git a/YD_Event.Application/Event/EventScoreService.cs b/YD_Event.Application/Event/EventScoreService.cs index 6a9b92c..69b4614 100644 --- a/YD_Event.Application/Event/EventScoreService.cs +++ b/YD_Event.Application/Event/EventScoreService.cs @@ -73,15 +73,15 @@ public class EventScoreService : BaseService, ITransient .InnerJoin((p, c, r) => p.RegistrationId == r.Id) .Where((p, c, r) => r.EventId == input.EventId && p.PersonType == input.PersonType) .WhereIF(!string.IsNullOrWhiteSpace(input.Name), p => p.Name.Contains(input.Name)) - .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), p => p.Phone.Contains(input.Phone)) + .WhereIF(!string.IsNullOrWhiteSpace(input.Mobile), p => p.Phone.Contains(input.Mobile)) .Select((p, c) => new CoachLeaderListOutput { Id = p.Id, Name = p.Name, Age = p.Age, Gender = p.Gender.ToString(), - IdCard = p.IdCard, - Phone = p.Phone, + IdCardNumber = p.IdCard, + Mobile = p.Phone, CertificateId = c.Id }) .ToPagedListAsync(input); diff --git a/YD_Event.Application/Event/UserEventRegistrationService.cs b/YD_Event.Application/Event/UserEventRegistrationService.cs index 85a6c90..97dd130 100644 --- a/YD_Event.Application/Event/UserEventRegistrationService.cs +++ b/YD_Event.Application/Event/UserEventRegistrationService.cs @@ -223,7 +223,7 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient UserId = u.Id, Name = u.Name, Mobile = u.Mobile, - IdCard = MaskIdCard(u.IdCardNumber), + IdCardNumber = MaskIdCard(u.IdCardNumber), Gender = u.Gender.ToString(), IsEligible = true, IneligibilityReason = "" @@ -366,7 +366,7 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient { Name = p.Name, Mobile = p.Phone, - IdCard = MaskIdCard(p.IdCard), + IdCardNumber = MaskIdCard(p.IdCard), Gender = p.Gender.ToString() }).ToList(); diff --git a/YD_Event.Application/Order/Dtos/CreateOrderInput.cs b/YD_Event.Application/Order/Dtos/CreateOrderInput.cs index 978b3e4..c481039 100644 --- a/YD_Event.Application/Order/Dtos/CreateOrderInput.cs +++ b/YD_Event.Application/Order/Dtos/CreateOrderInput.cs @@ -53,12 +53,12 @@ public class CreateOrderPersonInput /// 证件号码 /// [Required] - public string IdCard { get; set; } + public string IdCardNumber { get; set; } /// /// 手机号 /// - public string? Phone { get; set; } + public string? Mobile { get; set; } /// /// 性别 diff --git a/YD_Event.Application/applicationsettings.json b/YD_Event.Application/applicationsettings.json index e1a49ba..f970bb1 100644 --- a/YD_Event.Application/applicationsettings.json +++ b/YD_Event.Application/applicationsettings.json @@ -99,8 +99,8 @@ }, // 微信小程序配置 "WeChat": { - "AppId": "wx1234567890abcdef", - "Secret": "1234567890abcdef1234567890abcdef" + "AppId": "wxf5a3f98d44c3a563", + "Secret": "ef6d17e0419700c137e066aa3dce23ca" }, // 雪花id 文档:https://github.com/yitter/IdGenerator "SnowId": {