|
|
@@ -496,8 +496,8 @@ public class PrintServiceImpl implements PrintService {
|
|
|
* @return
|
|
|
*/
|
|
|
private DataSource getDataSource(String userName, String profile) {
|
|
|
- // 如果userName是B2C,直接获取配置好的B2C数据源
|
|
|
- if (userName.equalsIgnoreCase("B2C")) {
|
|
|
+ // 如果userName是B2C或B2B,直接获取配置好的B2C数据源(B2B数据源与B2C相同)
|
|
|
+ if (userName.toUpperCase().startsWith("B2C") || userName.toUpperCase().startsWith("B2B")) {
|
|
|
if (profile.equalsIgnoreCase("dev")) {
|
|
|
return ContextUtils.getApplicationContext().getBean("b2cDevDataSource", DruidDataSource.class);
|
|
|
} else if (profile.equalsIgnoreCase("test")) {
|