예제 #1
0
 /// <summary>
 /// 删除用户
 /// </summary>
 /// <param name="deleteInfo">删除信息</param>
 /// <returns></returns>
 public Result DeleteUser(DeleteUserCmdDto deleteInfo)
 {
     if (deleteInfo == null || deleteInfo.UserIds.IsNullOrEmpty())
     {
         return(Result.FailedResult("没有指定任何要删除的用户信息"));
     }
     using (var businessWork = WorkFactory.Create())
     {
         var deleteResult = userService.DeleteUser(deleteInfo.UserIds);
         if (!deleteResult.Success)
         {
             return(deleteResult);
         }
         var commitResult = businessWork.Commit();
         return(commitResult.ExecutedSuccess ? Result.SuccessResult("删除成功") : Result.FailedResult("删除失败"));
     }
 }
예제 #2
0
 /// <summary>
 /// 删除用户
 /// </summary>
 /// <param name="deleteInfo">删除信息</param>
 /// <returns></returns>
 public Result DeleteUser(DeleteUserCmdDto deleteInfo)
 {
     return(userBusiness.DeleteUser(deleteInfo));
 }