예제 #1
0
        public int Bus_User_Delete(BusUserDelViewModel busDelViewModel)
        {
            int DeleteRowsNum = _IBusUserRepository
                                .DeleteByBusUserIdList(busDelViewModel.DeleleIdList);

            if (DeleteRowsNum == busDelViewModel.DeleleIdList.Count)
            {
                return(DeleteRowsNum);
            }
            else
            {
                return(-1);
            }
        }
예제 #2
0
        public ActionResult <BusUserDelResModel> Bus_User_Delete(BusUserDelViewModel busUserDelViewModel)
        {
            BusUserDelResModel busUserDelResModel = new BusUserDelResModel();
            int DeleteResult = _IBusUserService.Bus_User_Delete(busUserDelViewModel);

            if (DeleteResult > 0)
            {
                busUserDelResModel.DelCount                   = DeleteResult;
                busUserDelResModel.IsSuccess                  = true;
                busUserDelResModel.baseViewModel.Message      = "删除成功";
                busUserDelResModel.baseViewModel.ResponseCode = 200;
                _ILogger.Information("删除用户缴费信息成功");
                return(Ok(busUserDelResModel));
            }
            else
            {
                busUserDelResModel.DelCount                   = -1;
                busUserDelResModel.IsSuccess                  = false;
                busUserDelResModel.baseViewModel.Message      = "删除失败";
                busUserDelResModel.baseViewModel.ResponseCode = 400;
                _ILogger.Information("删除用户缴费信息失败");
                return(BadRequest(busUserDelResModel));
            }
        }