mirror of
https://github.com/wahyd4/Martian.git
synced 2026-08-09 05:16:21 +10:00
update version
This commit is contained in:
@@ -29,7 +29,7 @@ public class BaseJdbcTemplate {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
protected static ConnectionManager getConnection(String dataSourceName) throws Exception {
|
||||
public static ConnectionManager getConnection(String dataSourceName) throws Exception {
|
||||
ConnectionManager connectionManager = new ConnectionManager();
|
||||
|
||||
/* 获取当前线程中的Connection */
|
||||
@@ -56,7 +56,7 @@ public class BaseJdbcTemplate {
|
||||
*
|
||||
* @return str
|
||||
*/
|
||||
protected static String getDataSourceName(String dataSourceName) {
|
||||
public static String getDataSourceName(String dataSourceName) {
|
||||
if (dataSourceName == null) {
|
||||
dataSourceName = marsSpace.getAttr(MarsConstant.DEFAULT_DATASOURCE_NAME).toString();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class BaseJdbcTemplate {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
protected static SqlBuilderModel builderSql(String sql, Object args) throws Exception {
|
||||
public static SqlBuilderModel builderSql(String sql, Object args) throws Exception {
|
||||
|
||||
SqlBuilderModel sqlBuilderModel = new SqlBuilderModel();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class BaseSelect {
|
||||
* @param dataSourceName 连接名
|
||||
* @return 数据
|
||||
*/
|
||||
protected static <T> List<T> selectList(String sql, Object param, Class<T> cls,String dataSourceName) throws Exception {
|
||||
public static <T> List<T> selectList(String sql, Object param, Class<T> cls,String dataSourceName) throws Exception {
|
||||
ConnectionManager connectionManager = BaseJdbcTemplate.getConnection(dataSourceName);
|
||||
try {
|
||||
List<JSONObject> result = select(sql, param, connectionManager.getConnection());
|
||||
|
||||
Reference in New Issue
Block a user