using YD_Event.Application.ScoreRule.Dtos; namespace YD_Event.Application.ScoreRule; [ApiDescriptionSettings("打分系统")] public class ScoreRuleService : BaseService, ITransient { private readonly ISqlSugarRepository _repository; public ScoreRuleService(ISqlSugarRepository repository) : base(repository) => _repository = repository; [DisplayName("获取可用计分规则")] public async Task> GetList() => await _repository.AsQueryable() .Where(x => x.Status == AvailabilityStatus.Enable) .OrderBy(x => x.Sort) .Select(x => new ScoreRuleOutput { Id = x.Id, RuleCode = x.RuleCode, RuleName = x.RuleName, JudgeRoleSchemaJson = x.JudgeRoleSchemaJson, Sort = x.Sort }) .ToListAsync(); }