Assume that the dividends can only be paid at some randomized observation times and dividends were paid according to a barrier strategy,the differential equations for the moment-generating function,the n-th moment function and the Laplace transform of ruin time were derived. The explicit expressions for the expected discounted dividends until ruin and the Laplace transform of ruin time were also obtained.