sunyj пре 9 година
родитељ
комит
ee74762de3

+ 1 - 1
src/main/java/com/uas/report/service/impl/FileServiceImpl.java

@@ -46,7 +46,7 @@ public class FileServiceImpl implements FileService {
 					.execute(new HttpGet(URI.create(sysConf.getStandardJrxmlsUrl()))).getEntity().getContent()));
 			byte[] data = jsonObject.getBytes("data");
 			if (ArrayUtils.isEmpty(data)) {
-				throw new ReportException("标准模板获取失败");
+				throw new ReportException("标准模板不存在");
 			}
 			// 写入本地zip文件
 			String filePath = new StringBuilder(sysConf.getLocalBaseDir()).append("/")

+ 2 - 2
src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

@@ -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")) {