/// <summary> /// 관리자 즉석당첨 경품 등록 /// </summary> /// <param name="data"></param> /// <returns></returns> public RouletteEventInstantLotteryPrizeSetting CreateInstantLotteryPrizeSetting(RouletteEventInstantLotteryPrizeSetting data) { // 날짜, 경품이 같은 데이터가 있는지 확인 var isOverlapPrize = settingRepo.Filter(x => x.Date == data.Date && x.PrizeType == data.PrizeType).SingleOrDefault(); if (isOverlapPrize != null) { throw new RouletteServiceException("400", "이미 등록된 데이터가 있습니다.", null); } var result = settingRepo.Add(data); settingRepo.Save(); return(result); }
public RouletteEventInstantLotteryPrizeSetting UpdatePrizeSetting(RouletteEventInstantLotteryPrizeSetting entity) { var result = service.UpdateInstantLotteryPrizeSetting(entity.Date, entity.PrizeType, entity.TotalCount, entity.StartTime, entity.Rate); return(result); }