示例#1
0
        /// <summary>
        /// 본인인증 정보를 제외한 정보 update
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        public KidsNoteEntry UpdateKidsNoteEntry(KidsNoteEntry entry)
        {
            if (IsKidsNoteEntryByMobile(entry.Mobile))
            {
                throw new KidsNoteServiceException("400", "이미 참여하였습니다.", entry);
            }
            var result = repo.Update(entry);

            repo.Save();
            return(result);
        }
示例#2
0
        public ActionResult CompleteKidsNoteKMC(ResponseKMCModel model)
        {
            try {
                if (IsEventClose())
                {
                    throw new KidsNoteServiceException("400", "이벤트가 종료되었습니다.", null);
                }
                var result = kmcService.ResponseKMC(model);

                var entry = new KidsNoteEntry {
                    Name       = string.IsNullOrEmpty(result.Data.M_Name) ? result.Data.Name : result.Data.M_Name,
                    Gender     = string.IsNullOrEmpty(result.Data.M_Gender) ? result.Data.Gender : result.Data.M_Gender,
                    Mobile     = result.Data.PhoneNo,
                    BirthDay   = string.IsNullOrEmpty(result.Data.M_BirthDay) ? result.Data.BirthDay : result.Data.M_BirthDay,
                    Channel    = common.IsMobileDevice ? Domain.Entities.Abstract.ChannelType.Mobile : Domain.Entities.Abstract.ChannelType.PC,
                    IpAddress  = common.IpAddress,
                    CreateDate = common.Now,
                    EventType  = KidsNoteEventType.ThirdEvent   //4차이벤트 시작시 수정해야함
                };
                var resultModel = service.CreateKidsNoteEntry(entry);
                var data        = mapperConfig.CreateMapper().Map <KidsNoteViewModel>(resultModel);

                Session.Add("KidsNoteEntryId", resultModel.Id);

                return(Json(new {
                    Result = result.Result,
                    Message = result.Message,
                    Data = data
                }));
            } catch (KMCServiceException e) {
                logger.Debug(">>>>>>>>>>> Response KMC Service");
                logger.Debug("/////////// message:{0}, data:{1}", e.Message, e.Data);

                return(Json(new {
                    Result = false,
                    Message = string.Format("본인인증 실패되었습니다. [ 본인인증을 다시 해주시길 바랍니다. ({0}) ]", e.Message)
                }));
            } catch (KidsNoteServiceException e) {
                return(Json(new {
                    Result = false,
                    Message = e.Message
                }));
            } catch (Exception e) {
                logger.Error(e);

                return(Json(new {
                    Result = false,
                    Message = "서비스 점검중입니다. 잠시 후 시도해보시거나, 담당자에게 문의하시기 바랍니다."
                }));
            }
        }