  Let $[x]$ be the integral part of $x$, $n>1$ be a positive integer and
$\chi_n$ denote the trivial Dirichlet character modulo $n$. In this paper, we
use an identity established by Z. H. Sun to get congruences of
$T_{m,k}(n)=\sum_{x=1}^{[n/m]}\frac{\chi_n(x)}{x^k}\left(\bmod n^{r+1}\right)$
for $r\in \{1,2\}$, any positive integer $m $ with $n \equiv \pm 1 \left(\bmod
m \right)$ in terms of Bernoulli polynomials. As its an application, we also
obtain some new congruences involving binomial coefficients modulo $n^4$ in
terms of generalized Bernoulli numbers.
