public ServiceResult UserSign(BookingSignupOrderContact view) { var orders = Resolve <IBookingSignupOrderService>().GetList(u => u.IsPay); var list = new List <BookingSignupOrderContact>(); foreach (var item in orders) { foreach (var temp in item.Contacts) { if (temp.Name == view.Name && temp.Mobile == view.Mobile) { if (temp.IsSign == false) { temp.IsSign = true; var result = Resolve <IBookingSignupOrderService>().Update(item); if (!result) { return(ServiceResult.FailedWithMessage("签到失败,请再次尝试")); } return(ServiceResult.Success); } return(ServiceResult.FailedWithMessage("您已经签到过了,请勿重复签到")); } } } return(ServiceResult.FailedWithMessage("未找到您的信息,请确认输入信息是否正确")); }
public ApiResult UserSign(BookingSignupOrderContact model) { if (model.Name.IsNullOrEmpty()) { return(ApiResult.Failure("姓名不能为空")); } if (model.Mobile.IsNullOrEmpty()) { return(ApiResult.Failure("手机号不能为空")); } var result = Resolve <IBookingSignupOrderService>().UserSign(model); return(ApiResult.Success(result)); }