/// <summary> /// 餐饮系统注册 /// </summary> /// <param name="Param"></param> /// <returns></returns> public string RegistRepastAccount(RequestMerchant Param) { Param.AuditType = AuditEnum.WaitAduit; RepastRoleAuthor Author = Kily.Set <RepastRoleAuthor>().Where(t => t.IsDelete == false).Where(t => t.AuthorName.Contains("基本")).OrderBy(t => t.CreateTime).FirstOrDefault(); Param.DingRoleId = Author.Id; RepastInfo Info = Param.MapToEntity <RepastInfo>(); var IsReplay = Kily.Set <RepastInfo>().Where(t => t.Account == Param.Account).FirstOrDefault(); if (IsReplay != null) { return("账号已经被注册"); } var IsReplays = Kily.Set <RepastInfo>().Where(t => t.MerchantName == Param.MerchantName).FirstOrDefault(); if (IsReplays != null) { return("企业已经注册,请勿重复注册"); } if (!NormalUtil.CheckStringChineseUn(Info.Account)) { if (Insert <RepastInfo>(Info)) { return(ServiceMessage.INSERTSUCCESS); } else { return(ServiceMessage.INSERTFAIL); } } else { return("账号不能包含中文和特殊字符"); } }
/// <summary> /// 厨师注册 /// </summary> /// <param name="Param"></param> /// <returns></returns> public string RegistCookAccount(RequestCookInfo Param) { Param.IsVip = false; CookVip vip = Param.MapToEntity <CookVip>(); CookRoleAuthor author = Kily.Set <CookRoleAuthor>().Where(t => t.IsDelete == false).Where(t => t.AuthorName.Contains("基本")).FirstOrDefault(); vip.RoleId = author.Id; if (NormalUtil.CheckStringChineseUn(vip.Account)) { return("账号不能包含中文和特殊字符"); } return(Insert <CookVip>(vip) ? ServiceMessage.INSERTSUCCESS : ServiceMessage.INSERTFAIL); }