public JsonActionResult <bool> BindingMobilePhone([FromUri] BindingMobilePhoneParam param) { return(SafeExecute(() => { return UserService.BindingMobilePhone(param); })); }
public bool BindingMobilePhone(BindingMobilePhoneParam param) { if (param == null || param.ID == null || string.IsNullOrEmpty(param.MobilePhoneNo)) { throw new DomainException("参数错误"); } var user = Repository.GetByKey(param.ID); if (user == null) { return(false); } user.MobilePhoneNo = param.MobilePhoneNo; return(Repository.Update(user) > 0); }