修复bug

This commit is contained in:
马梓彭 2026-05-25 16:48:34 +08:00
parent e4b416d6fa
commit 52c3c9ecca
2 changed files with 14 additions and 2 deletions

View File

@ -39,6 +39,7 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
public async Task<PageResult<AppUserOutput>> Page([FromQuery] AppUserPageInput input)
{
var query = _appUserRep.AsQueryable()
.Where(u => u.PersonType == PersonType.Athlete)
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name))
.WhereIF(input.Gender.HasValue, u => u.Gender == input.Gender)
.WhereIF(!string.IsNullOrWhiteSpace(input.Mobile), u => u.Mobile.Contains(input.Mobile))
@ -77,6 +78,17 @@ public class AppUserService : BaseService<AppUserEntity>, ITransient
{
if (input.Ids == null || !input.Ids.Any()) return;
// 检查是否存在未提交认证申请的用户
var pendingUsers = await _appUserRep.AsQueryable()
.Where(u => input.Ids.Contains(u.Id) && u.AuditStatus == AuditStatus.PendingSubmission)
.Select(u => u.Name)
.ToListAsync();
if (pendingUsers.Any())
{
throw Oops.Bah("所选人员中存在未提交认证的申请,请核对后再操作");
}
// 更新状态
await _appUserRep.UpdateAsync(u => new AppUserEntity
{

View File

@ -365,8 +365,8 @@ public class EventClientController : IDynamicApiController
var limit = await _limitRepository.GetFirstAsync(l => l.EventId == id && !l.DeleteMark);
string refundRule = "开赛前7天扣除金额5%,3-7天扣除金额10%,3天内扣除金额20%";
string pointsRule = "参与积分:5积分;名次积分:1-8名 15积分,9-20名 10积分";
string refundRule = "开赛前7天扣除金额0%,3-7天扣除金额0%,3天内扣除金额0%";
string pointsRule = "";
// 优先从快照读取配置并生成描述文本
if (refundRuleSnapshots != null && refundRuleSnapshots.Any())