|
@ -4,9 +4,11 @@ import com.yihu.utils.context.SpringContextUtils;
|
|
|
import org.hibernate.Query;
|
|
|
import org.hibernate.Session;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.repository.CrudRepository;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.StringUtils;
|
|
@ -44,6 +46,8 @@ public abstract class BaseJpaService<T, R extends CrudRepository> {
|
|
|
|
|
|
@PersistenceContext
|
|
|
protected EntityManager entityManager;
|
|
|
@Autowired
|
|
|
protected JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
public BaseJpaService() {
|
|
|
Type genType = getClass().getGenericSuperclass();
|