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