Esempio n. 1
0
        public TRouletteEventInstantLotteryPrizeSetting UpdateTRoulettePrizeSetting(TRouletteEventInstantLotteryPrizeSetting entity)
        {
            var result = service.UpdateInstantLotteryPrizeSetting(entity.Date, entity.PrizeType, entity.TotalCount, entity.StartTime, entity.Rate);

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// 관리자 즉석당첨 경품 등록
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public TRouletteEventInstantLotteryPrizeSetting CreateInstantLotteryPrizeSetting(TRouletteEventInstantLotteryPrizeSetting data)
        {
            // 날짜, 경품이 같은 데이터가 있는지 확인
            var isOverlapPrize = settingRepo.Filter(x => x.Date == data.Date && x.PrizeType == data.PrizeType).SingleOrDefault();

            if (isOverlapPrize != null)
            {
                throw new TRouletteServiceException("400", "이미 등록된 데이터가 있습니다.", null);
            }
            var result = settingRepo.Add(data);

            settingRepo.Save();

            return(result);
        }