Exemplo n.º 1
0
 public AjaxResult <string> EditStaffPassword([FromBody] EditStaffPasswordRequestModel request)
 {
     #region 验证提交数据是否有误
     if (!ModelState.IsValid)
     {
         foreach (var item in ModelState.Values)
         {
             foreach (var errordetails in item.Errors)
             {
                 NotifyError("", errordetails.ErrorMessage);
             }
         }
     }
     #endregion
     var user = _identityManager.UserInfo;
     _staffAppService.EditStaffPassword(request, user.StaffId, user.StaffId);
     return(Response("ok"));
 }
Exemplo n.º 2
0
        public void EditStaffPassword(EditStaffPasswordRequestModel request, Guid id, Guid updateBy, DateTime?updateDateTime = null)
        {
            EditStaffPasswordCommand command = new EditStaffPasswordCommand(id, request.Password, request.NewPassword, updateBy, updateDateTime ?? DateTime.Now);

            _bus.SendCommand(command);
        }