完善接口命名规范
This commit is contained in:
parent
0dc276a9ab
commit
13346252b0
@ -310,7 +310,7 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
|
||||
/// <returns></returns>
|
||||
[HttpGet("athlete/page")]
|
||||
[DisplayName("分页查询运动员")]
|
||||
public async Task<PageResult<AthleteOutput>> PageAsync([FromQuery] AthleteQueryInput input)
|
||||
public async Task<PageResult<AthleteOutput>> Page([FromQuery] AthleteQueryInput input)
|
||||
{
|
||||
var query = _appUserRep.AsQueryable()
|
||||
// 过滤运动员类型 (PersonType = 3)
|
||||
@ -332,7 +332,7 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
|
||||
/// <returns></returns>
|
||||
[HttpPost("athlete/add")]
|
||||
[DisplayName("新增运动员")]
|
||||
public async Task AddAsync([FromBody] AddAthleteInput input)
|
||||
public async Task Add([FromBody] AddAthleteInput input)
|
||||
{
|
||||
var isExist = await _appUserRep.IsAnyAsync(u => u.IdCardNumber == input.IdCardNumber && !u.DeleteMark);
|
||||
if (isExist) throw Oops.Bah("身份证号已存在");
|
||||
@ -360,7 +360,7 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
|
||||
/// <returns></returns>
|
||||
[HttpPut("athlete/update")]
|
||||
[DisplayName("修改运动员")]
|
||||
public async Task UpdateAsync([FromBody] UpdateAthleteInput input)
|
||||
public async Task Update([FromBody] UpdateAthleteInput input)
|
||||
{
|
||||
var user = await _appUserRep.GetFirstAsync(u => u.Id == input.Id);
|
||||
if (user == null) throw Oops.Bah("运动员不存在");
|
||||
@ -389,7 +389,7 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
|
||||
/// <returns></returns>
|
||||
[HttpPost("athlete/ocr")]
|
||||
[DisplayName("OCR识别身份证")]
|
||||
public async Task<OcrResult> RecognizeIdCardAsync([FromBody] AthleteOcrInput input)
|
||||
public async Task<OcrResult> RecognizeIdCard([FromBody] AthleteOcrInput input)
|
||||
{
|
||||
return await _ocrService.RecognizeIdCardAsync(input.ImageUrl);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,7 @@ public class AliyunSmsService : ITransient
|
||||
/// <summary>
|
||||
/// 发送验证码短信
|
||||
/// </summary>
|
||||
public async Task SendVerificationCodeAsync(string phone, string code)
|
||||
public async Task SendVerificationCode(string phone, string code)
|
||||
{
|
||||
// 校验配置
|
||||
ValidateConfig();
|
||||
@ -73,13 +73,13 @@ public class AliyunSmsService : ITransient
|
||||
throw Oops.Bah("短信验证码模板未配置");
|
||||
|
||||
var param = JsonConvert.SerializeObject(new { code = code });
|
||||
await SendSmsAsync(phone, _options.VerificationCodeTemplateCode, param);
|
||||
await SendSms(phone, _options.VerificationCodeTemplateCode, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送短信核心方法
|
||||
/// </summary>
|
||||
public async Task SendSmsAsync(string phone, string templateCode, string templateParam)
|
||||
public async Task SendSms(string phone, string templateCode, string templateParam)
|
||||
{
|
||||
// 1. 参数校验
|
||||
if (string.IsNullOrWhiteSpace(phone)) throw Oops.Bah("手机号不能为空");
|
||||
|
||||
@ -37,7 +37,7 @@ public class TeamService : BaseService<Core.Entities.Team>, IDynamicApiControlle
|
||||
/// <returns></returns>
|
||||
[HttpGet("page")]
|
||||
[DisplayName("分页查询团队")]
|
||||
public async Task<PageResult<TeamOutput>> PageAsync([FromQuery] TeamQueryInput input)
|
||||
public async Task<PageResult<TeamOutput>> Page([FromQuery] TeamQueryInput input)
|
||||
{
|
||||
var query = _teamRep.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), t => t.Name.Contains(input.Name))
|
||||
@ -77,7 +77,7 @@ public class TeamService : BaseService<Core.Entities.Team>, IDynamicApiControlle
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
[DisplayName("获取团队详情")]
|
||||
public async Task<TeamDetailOutput> DetailAsync([FromRoute] long id)
|
||||
public async Task<TeamDetailOutput> Detail([FromRoute] long id)
|
||||
{
|
||||
var team = await _teamRep.GetFirstAsync(t => t.Id == id);
|
||||
if (team == null) throw Oops.Bah("团队不存在");
|
||||
@ -107,7 +107,7 @@ public class TeamService : BaseService<Core.Entities.Team>, IDynamicApiControlle
|
||||
/// <returns></returns>
|
||||
[HttpPost("add")]
|
||||
[DisplayName("新增团队")]
|
||||
public async Task AddAsync([FromBody] AddTeamInput input)
|
||||
public async Task Add([FromBody] AddTeamInput input)
|
||||
{
|
||||
var isExist = await _teamRep.IsAnyAsync(t => t.Name == input.Name);
|
||||
if (isExist) throw Oops.Bah("团队名称已存在");
|
||||
@ -150,7 +150,7 @@ public class TeamService : BaseService<Core.Entities.Team>, IDynamicApiControlle
|
||||
await _teamRep.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||
{
|
||||
// 逻辑删除团队
|
||||
await _teamRep.UpdateAsync(x => new Core.Entities.Team { DeleteMark = true }, x => x.Id == dto.Id);
|
||||
await base.Delete(dto);
|
||||
// 逻辑删除团队成员关联
|
||||
await _memberRep.UpdateAsync(x => new TeamMember { DeleteMark = true }, x => x.TeamId == dto.Id);
|
||||
});
|
||||
@ -183,7 +183,7 @@ public class TeamService : BaseService<Core.Entities.Team>, IDynamicApiControlle
|
||||
/// <returns></returns>
|
||||
[HttpPut("update")]
|
||||
[DisplayName("修改团队")]
|
||||
public async Task UpdateAsync([FromBody] UpdateTeamInput input)
|
||||
public async Task Update([FromBody] UpdateTeamInput input)
|
||||
{
|
||||
var team = await _teamRep.GetFirstAsync(t => t.Id == input.Id);
|
||||
if (team == null) throw Oops.Bah("团队不存在");
|
||||
|
||||
@ -120,28 +120,28 @@
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.PageAsync(YD_Event.Application.AppUser.Dtos.AthleteQueryInput)">
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.Page(YD_Event.Application.AppUser.Dtos.AthleteQueryInput)">
|
||||
<summary>
|
||||
分页查询运动员
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.AddAsync(YD_Event.Application.AppUser.Dtos.AddAthleteInput)">
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.Add(YD_Event.Application.AppUser.Dtos.AddAthleteInput)">
|
||||
<summary>
|
||||
新增运动员
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.UpdateAsync(YD_Event.Application.AppUser.Dtos.UpdateAthleteInput)">
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.Update(YD_Event.Application.AppUser.Dtos.UpdateAthleteInput)">
|
||||
<summary>
|
||||
修改运动员
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.RecognizeIdCardAsync(YD_Event.Application.AppUser.Dtos.AthleteOcrInput)">
|
||||
<member name="M:YD_Event.Application.AppUser.AppUserService.RecognizeIdCard(YD_Event.Application.AppUser.Dtos.AthleteOcrInput)">
|
||||
<summary>
|
||||
识别身份证信息
|
||||
</summary>
|
||||
@ -4681,12 +4681,12 @@
|
||||
初始化阿里云短信客户端
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Sms.AliyunSmsService.SendVerificationCodeAsync(System.String,System.String)">
|
||||
<member name="M:YD_Event.Application.Sms.AliyunSmsService.SendVerificationCode(System.String,System.String)">
|
||||
<summary>
|
||||
发送验证码短信
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Sms.AliyunSmsService.SendSmsAsync(System.String,System.String,System.String)">
|
||||
<member name="M:YD_Event.Application.Sms.AliyunSmsService.SendSms(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
发送短信核心方法
|
||||
</summary>
|
||||
@ -4856,21 +4856,21 @@
|
||||
团队管理服务
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Team.TeamService.PageAsync(YD_Event.Application.Team.Dtos.TeamQueryInput)">
|
||||
<member name="M:YD_Event.Application.Team.TeamService.Page(YD_Event.Application.Team.Dtos.TeamQueryInput)">
|
||||
<summary>
|
||||
分页查询团队
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Team.TeamService.DetailAsync(System.Int64)">
|
||||
<member name="M:YD_Event.Application.Team.TeamService.Detail(System.Int64)">
|
||||
<summary>
|
||||
获取团队详情
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Team.TeamService.AddAsync(YD_Event.Application.Team.Dtos.AddTeamInput)">
|
||||
<member name="M:YD_Event.Application.Team.TeamService.Add(YD_Event.Application.Team.Dtos.AddTeamInput)">
|
||||
<summary>
|
||||
新增团队
|
||||
</summary>
|
||||
@ -4891,7 +4891,7 @@
|
||||
<param name="ids"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:YD_Event.Application.Team.TeamService.UpdateAsync(YD_Event.Application.Team.Dtos.UpdateTeamInput)">
|
||||
<member name="M:YD_Event.Application.Team.TeamService.Update(YD_Event.Application.Team.Dtos.UpdateTeamInput)">
|
||||
<summary>
|
||||
修改团队
|
||||
</summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user