Пример #1
0
 public JsonActionResult <bool> BindingMobilePhone([FromUri] BindingMobilePhoneParam param)
 {
     return(SafeExecute(() =>
     {
         return UserService.BindingMobilePhone(param);
     }));
 }
Пример #2
0
        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);
        }