允许修改赛事名称

This commit is contained in:
马梓彭 2026-06-04 21:28:26 +08:00
parent ad2a792a51
commit fea9c6095b

View File

@ -522,8 +522,6 @@ public class EventService : BaseService<EventInfo>, ITransient
var eventInfo = await _repository.GetByIdAsync(input.Id);
if (eventInfo == null) throw new InvalidOperationException("赛事不存在");
var oldEventName = eventInfo.EventName;
// 将前端传过来的Code转换为对应的Id
var provinceId = eventInfo.ProvinceId;
var cityId = eventInfo.CityId;
@ -546,7 +544,6 @@ public class EventService : BaseService<EventInfo>, ITransient
}
input.Adapt(eventInfo);
eventInfo.EventName = oldEventName; // 赛事名称不允许修改
eventInfo.ProvinceId = provinceId;
eventInfo.CityId = cityId;
eventInfo.DistrictId = districtId;