You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.7 KiB
44 lines
1.7 KiB
package com.demo.cost;
|
|
|
|
import org.noear.wood.DbContext;
|
|
|
|
import java.util.Properties;
|
|
|
|
/**
|
|
* @author YenHex
|
|
* @since 2023/6/14
|
|
**/
|
|
public class TbsMapper {
|
|
|
|
private static DbContext jslCtx;
|
|
private static DbContext xltCtx;
|
|
|
|
public static DbContext getJslDbContext() {
|
|
if (jslCtx == null) {
|
|
// jslCtx = new DbContext("test",
|
|
// "jdbc:mysql://192.168.0.9:3306/jsl_mall_qs_dev07?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true",
|
|
// "kpjsl",
|
|
// "123456");
|
|
jslCtx = new DbContext("pro",
|
|
"jdbc:mysql://183.56.249.148/jsl_cost_base?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true",
|
|
"root",
|
|
"@Jsl2282125");
|
|
//jslCtx = new DbContext("test", "jdbc:mysql://183.234.29.228:3333/jsl_mall_qs_dev2?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true", "kpjsl", "123456");
|
|
}
|
|
return jslCtx;
|
|
}
|
|
|
|
public static DbContext getXltDbContext() {
|
|
if (xltCtx == null) {
|
|
Properties properties = new Properties();
|
|
properties.setProperty("schema", "xlt");
|
|
properties.setProperty("url", "jdbc:sqlserver://rm-wz93l107hc277n9ieco.sqlserver.rds.aliyuncs.com:3433;DatabaseName=xiaolutong");
|
|
properties.setProperty("username", "qs_db_user");
|
|
properties.setProperty("password", "Aa135246");
|
|
properties.setProperty("driverClassName", "com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
|
xltCtx = new DbContext(properties);
|
|
}
|
|
return xltCtx;
|
|
}
|
|
|
|
}
|
|
|