private void fineUser(Criteria criteria, AbstractDao dao) throws DaoException {
        Criteria bean = new Criteria();
        bean.addParam(DAO_ID_USER, criteria.getParam(DAO_ID_USER));
        bean.addParam(DAO_USER_SELECT_FOR_UPDATE, true);
        List<User> users = dao.findUsers(bean);
        if (users.isEmpty()) {
            throw new DaoException("User not found.");
        }
        User user = users.get(0);
        Integer userDiscount = user.getDiscount();
        Integer discountForDeleteOrder = PriceDiscountManager.getDiscountForDeleteOrder(userDiscount);
        Criteria crit = new Criteria();
        crit.addParam(DAO_USER_DISCOUNT, discountForDeleteOrder);
        dao.updateUser(bean, crit);
    }