use of com.platform.quartza.entity.BasePostgreResponse in project platform-base by SummerWindL.
the class BaseTask method test3.
// @Scheduled(fixedRate = 3 * SECOND)
public void test3() {
BasePostgreResponse basePostgreResponse = postgreSqlNotifyService.pgNotifyTest();
// BasePostgreResponse basePostgreResponse = postgreSqlNotifyService.jdbcPgNofifyTest();
LOGGER.info("响应:{}", basePostgreResponse);
}
use of com.platform.quartza.entity.BasePostgreResponse in project platform-base by SummerWindL.
the class PostgreSqlNotifyService method jdbcPgNofifyTest.
@DS("slave_1")
public BasePostgreResponse jdbcPgNofifyTest() {
BasePostgreResponse resp = new BasePostgreResponse();
List<BasePostgreResponse> query = jdbcTemplate.query("select * from f_test_pg_notify('1')", new RowMapper<BasePostgreResponse>() {
@Override
public BasePostgreResponse mapRow(ResultSet resultSet, int i) throws SQLException {
resp.setRetcode(resultSet.getInt("retcode"));
resp.setRetvalue(resultSet.getString("retvalue"));
return resp;
}
});
return !CollectionUtils.isEmpty(query) ? query.get(0) : new BasePostgreResponse();
}
Aggregations