Merge branches 'dev' and 'test' of http://git.estsh.com/i3-IMPP/i3plus-core into dev

yun-zuoyi
wei.peng 7 years ago
commit 0a1c9649b3

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-core</artifactId> <artifactId>i3plus-core</artifactId>
<groupId>i3plus.core</groupId> <groupId>i3plus.core</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-core</artifactId> <artifactId>i3plus-core</artifactId>
<groupId>i3plus.core</groupId> <groupId>i3plus.core</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -13,11 +13,6 @@ impp.cluster.regist.center=http://reg.estsh.com/eureka/
#多注册中心 #多注册中心
#impp.cluster.regist.center=http://192.168.1.20:8000/eureka/,http://192.168.1.20:8001/eureka/ #impp.cluster.regist.center=http://192.168.1.20:8000/eureka/,http://192.168.1.20:8001/eureka/
################ 功能配置2 ################
#是否允许前端跨域提交impp.web.cross.hosts
impp.web.cross = true
################ 授权过滤配置 ################
#用户登陆路径 #用户登陆路径
filter.shiro.user.loginuri = /login filter.shiro.user.loginuri = /login
#系统管理员登陆路径 #系统管理员登陆路径

@ -2,7 +2,7 @@
spring.application.name=${project.name} spring.application.name=${project.name}
#使用配置 #使用配置
spring.profiles.active=dev spring.profiles.active=test
######### 自定义参数 ######### ######### 自定义参数 #########
#项目描述信息swagger中显式中文使用uncode转码 #项目描述信息swagger中显式中文使用uncode转码

@ -141,6 +141,7 @@ public class TestExcelPermission extends TestBase {
obj.setUserInfoId(Long.parseLong(row.getCell(5).getStringCellValue())); obj.setUserInfoId(Long.parseLong(row.getCell(5).getStringCellValue()));
obj.setUserName(row.getCell(6).getStringCellValue()); obj.setUserName(row.getCell(6).getStringCellValue());
obj.setIsValid(1); obj.setIsValid(1);
obj.setUserStatus(1);
obj.setUserType(1); obj.setUserType(1);
obj.setUserLoginNum(0); obj.setUserLoginNum(0);

@ -1,207 +1,207 @@
//package cn.estsh.i3plus.core.apiservice.serviceimpl.busi; package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
//
//import cn.estsh.i3plus.pojo.platform.bean.*; import cn.estsh.i3plus.pojo.platform.bean.*;
//import cn.estsh.i3plus.pojo.platform.repository.SysConfigRepository; import cn.estsh.i3plus.pojo.platform.repository.SysConfigRepository;
//import cn.estsh.i3plus.pojo.platform.repository.SysDictionaryRepository; import cn.estsh.i3plus.pojo.platform.repository.SysDictionaryRepository;
//import cn.estsh.i3plus.pojo.platform.repository.SysLocaleLanguageRepository; import cn.estsh.i3plus.pojo.platform.repository.SysLocaleLanguageRepository;
//import cn.estsh.i3plus.pojo.platform.repository.SysLocaleResourceRepository; import cn.estsh.i3plus.pojo.platform.repository.SysLocaleResourceRepository;
//import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
//import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
//import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
//import org.junit.Test; import org.junit.Test;
//import org.slf4j.Logger; import org.slf4j.Logger;
//import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
//
//import java.io.InputStream; import java.io.InputStream;
//import java.util.ArrayList; import java.util.ArrayList;
//import java.util.List; import java.util.List;
//
///** /**
// * @Description : * @Description :
// * @Reference : * @Reference :
// * @Author : yunhao * @Author : yunhao
// * @CreateDate : 2018-11-22 11:01 * @CreateDate : 2018-11-22 11:01
// * @Modify: * @Modify:
// **/ **/
//public class TestExcelSysConfig extends TestBase { public class TestExcelSysConfig extends TestBase {
//
// public static final Logger LOGGER = LoggerFactory.getLogger(TestExcelPermission.class); public static final Logger LOGGER = LoggerFactory.getLogger(TestExcelPermission.class);
//
// // 文件路径 // 文件路径
// public static final String PATH_NAME = "init/sys-config.xlsx"; public static final String PATH_NAME = "init/sys-config.xlsx";
// // 权限Sheet 名称 // 权限Sheet 名称
// public static final String SHEET_SYS_CONFIG = "sys-config"; public static final String SHEET_SYS_CONFIG = "sys-config";
// public static final String SHEET_DICTIONARY = "dictionary"; public static final String SHEET_DICTIONARY = "dictionary";
// public static final String SHEET_LANGUAGE = "language"; public static final String SHEET_LANGUAGE = "language";
// public static final String SHEET_RESOURCE = "resource"; public static final String SHEET_RESOURCE = "resource";
//
// @Autowired @Autowired
// private SysConfigRepository sysConfigRDao; private SysConfigRepository sysConfigRDao;
// @Autowired @Autowired
// private SysDictionaryRepository sysDictionaryRDao; private SysDictionaryRepository sysDictionaryRDao;
// @Autowired @Autowired
// private SysLocaleLanguageRepository sysLocaleLanguageRDao; private SysLocaleLanguageRepository sysLocaleLanguageRDao;
// @Autowired @Autowired
// private SysLocaleResourceRepository sysLocaleResourceRDao; private SysLocaleResourceRepository sysLocaleResourceRDao;
//
// @Test @Test
// public void testInit() throws Exception { public void testInit() throws Exception {
// XSSFWorkbook workbook = getWorkbook(PATH_NAME); XSSFWorkbook workbook = getWorkbook(PATH_NAME);
// if(workbook != null){ if(workbook != null){
// XSSFSheet sheetSysConfig = workbook.getSheet(SHEET_SYS_CONFIG); XSSFSheet sheetSysConfig = workbook.getSheet(SHEET_SYS_CONFIG);
// XSSFSheet sheetDictionary = workbook.getSheet(SHEET_DICTIONARY); XSSFSheet sheetDictionary = workbook.getSheet(SHEET_DICTIONARY);
// XSSFSheet sheetLanguage = workbook.getSheet(SHEET_LANGUAGE); XSSFSheet sheetLanguage = workbook.getSheet(SHEET_LANGUAGE);
// XSSFSheet sheetResource = workbook.getSheet(SHEET_RESOURCE); XSSFSheet sheetResource = workbook.getSheet(SHEET_RESOURCE);
//
// List<SysConfig> sysConfigList = getSysConfig(sheetSysConfig); List<SysConfig> sysConfigList = getSysConfig(sheetSysConfig);
// List<SysDictionary> sysDictionaryList = getSysDictionary(sheetDictionary); List<SysDictionary> sysDictionaryList = getSysDictionary(sheetDictionary);
// List<SysLocaleLanguage> sysLocaleLanguageList = getSysLocaleLanguage(sheetLanguage); List<SysLocaleLanguage> sysLocaleLanguageList = getSysLocaleLanguage(sheetLanguage);
// List<SysLocaleResource> sysLocaleResourceList= getSysLocaleResource(sheetResource); List<SysLocaleResource> sysLocaleResourceList= getSysLocaleResource(sheetResource);
//
// LOGGER.info("System Init SysConfig Size:{}",sysConfigList.size()); LOGGER.info("System Init SysConfig Size:{}",sysConfigList.size());
// LOGGER.info("System Init SysDictionary Size:{}",sysDictionaryList.size()); LOGGER.info("System Init SysDictionary Size:{}",sysDictionaryList.size());
// LOGGER.info("System Init SysLocaleLanguage Size:{}",sysLocaleLanguageList.size()); LOGGER.info("System Init SysLocaleLanguage Size:{}",sysLocaleLanguageList.size());
// LOGGER.info("System Init SysLocaleResource Size:{}",sysLocaleResourceList.size()); LOGGER.info("System Init SysLocaleResource Size:{}",sysLocaleResourceList.size());
//
// sysConfigRDao.saveAll(sysConfigList); sysConfigRDao.saveAll(sysConfigList);
// sysDictionaryRDao.saveAll(sysDictionaryList); sysDictionaryRDao.saveAll(sysDictionaryList);
// sysLocaleLanguageRDao.saveAll(sysLocaleLanguageList); sysLocaleLanguageRDao.saveAll(sysLocaleLanguageList);
// sysLocaleResourceRDao.saveAll(sysLocaleResourceList); sysLocaleResourceRDao.saveAll(sysLocaleResourceList);
// } }
// } }
//
// public List<SysConfig> getSysConfig(XSSFSheet sheet){ public List<SysConfig> getSysConfig(XSSFSheet sheet){
// List<SysConfig> result = new ArrayList<>(); List<SysConfig> result = new ArrayList<>();
// if(sheet != null){ if(sheet != null){
// if(sheet.getLastRowNum() >= 1){ if(sheet.getLastRowNum() >= 1){
// SysConfig obj = null; SysConfig obj = null;
// for (int i = 1; i <= sheet.getLastRowNum(); i++) { for (int i = 1; i <= sheet.getLastRowNum(); i++) {
// try { try {
// Row row = sheet.getRow(i);//获取索引为i的行以0开始 Row row = sheet.getRow(i);//获取索引为i的行以0开始
// if(row.getCell(0).toString().trim().length() > 0){ if(row.getCell(0).toString().trim().length() > 0){
// obj = new SysConfig(); obj = new SysConfig();
// obj.setId(Long.parseLong(row.getCell(0).getStringCellValue())); obj.setId(Long.parseLong(row.getCell(0).getStringCellValue()));
// obj.setName(row.getCell(1).getStringCellValue()); obj.setName(row.getCell(1).getStringCellValue());
// obj.setConfigType(Integer.valueOf(row.getCell(2).getStringCellValue())); obj.setConfigType(Integer.valueOf(row.getCell(2).getStringCellValue()));
// obj.setConfigCode(row.getCell(3).getStringCellValue()); obj.setConfigCode(row.getCell(3).getStringCellValue());
// obj.setConfigValue(row.getCell(4).getStringCellValue()); obj.setConfigValue(row.getCell(4).getStringCellValue());
// obj.setConfigDescription(row.getCell(5).getStringCellValue()); obj.setConfigDescription(row.getCell(5).getStringCellValue());
// obj.setIsValid(1); obj.setIsValid(1);
//
// result.add(obj); result.add(obj);
// } }
// }catch (Exception e){ }catch (Exception e){
// LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i); LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i);
// } }
// } }
// } }
// } }
// return result; return result;
// } }
//
// public List<SysDictionary> getSysDictionary(XSSFSheet sheet){ public List<SysDictionary> getSysDictionary(XSSFSheet sheet){
// List<SysDictionary> result = new ArrayList<>(); List<SysDictionary> result = new ArrayList<>();
// if(sheet != null){ if(sheet != null){
// if(sheet.getLastRowNum() >= 1){ if(sheet.getLastRowNum() >= 1){
// SysDictionary obj = null; SysDictionary obj = null;
// for (int i = 1; i <= sheet.getLastRowNum(); i++) { for (int i = 1; i <= sheet.getLastRowNum(); i++) {
// try { try {
// Row row = sheet.getRow(i);//获取索引为i的行以0开始 Row row = sheet.getRow(i);//获取索引为i的行以0开始
// if(row.getCell(0).toString().trim().length() > 0){ if(row.getCell(0).toString().trim().length() > 0){
// obj = new SysDictionary(); obj = new SysDictionary();
// obj.setId(Long.parseLong(row.getCell(0).getStringCellValue())); obj.setId(Long.parseLong(row.getCell(0).getStringCellValue()));
// obj.setName(row.getCell(1).getStringCellValue()); obj.setName(row.getCell(1).getStringCellValue());
// obj.setDictionaryCode(row.getCell(2).getStringCellValue()); obj.setDictionaryCode(row.getCell(2).getStringCellValue());
// obj.setParentId(Long.valueOf(row.getCell(3).getStringCellValue())); obj.setParentId(Long.valueOf(row.getCell(3).getStringCellValue()));
// obj.setParentNameRdd(row.getCell(4).getStringCellValue()); obj.setParentNameRdd(row.getCell(4).getStringCellValue());
// obj.setParentCodeRdd(row.getCell(5).getStringCellValue()); obj.setParentCodeRdd(row.getCell(5).getStringCellValue());
// obj.setDictionaryValue(row.getCell(6).getStringCellValue()); obj.setDictionaryValue(row.getCell(6).getStringCellValue());
// obj.setDictionarySort(Integer.valueOf(row.getCell(7).getStringCellValue())); obj.setDictionarySort(Integer.valueOf(row.getCell(7).getStringCellValue()));
// obj.setDictionaryDescription(row.getCell(8).getStringCellValue()); obj.setDictionaryDescription(row.getCell(8).getStringCellValue());
// obj.setIsValid(1); obj.setIsValid(1);
//
// result.add(obj); result.add(obj);
// } }
// }catch (Exception e){ }catch (Exception e){
// LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i); LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i);
// } }
// } }
// } }
// } }
// return result; return result;
// } }
//
// public List<SysLocaleLanguage> getSysLocaleLanguage(XSSFSheet sheet){ public List<SysLocaleLanguage> getSysLocaleLanguage(XSSFSheet sheet){
// List<SysLocaleLanguage> result = new ArrayList<>(); List<SysLocaleLanguage> result = new ArrayList<>();
// if(sheet != null){ if(sheet != null){
// if(sheet.getLastRowNum() >= 1){ if(sheet.getLastRowNum() >= 1){
// SysLocaleLanguage obj = null; SysLocaleLanguage obj = null;
// for (int i = 1; i <= sheet.getLastRowNum(); i++) { for (int i = 1; i <= sheet.getLastRowNum(); i++) {
// try { try {
// Row row = sheet.getRow(i);//获取索引为i的行以0开始 Row row = sheet.getRow(i);//获取索引为i的行以0开始
// if(row.getCell(0).toString().trim().length() > 0){ if(row.getCell(0).toString().trim().length() > 0){
// obj = new SysLocaleLanguage(); obj = new SysLocaleLanguage();
// obj.setId(Long.parseLong(row.getCell(0).getStringCellValue())); obj.setId(Long.parseLong(row.getCell(0).getStringCellValue()));
// obj.setLanguageName(row.getCell(1).getStringCellValue()); obj.setLanguageName(row.getCell(1).getStringCellValue());
// obj.setLanguageCode(row.getCell(2).getStringCellValue()); obj.setLanguageCode(row.getCell(2).getStringCellValue());
// obj.setLanguageSort(Integer.valueOf(row.getCell(3).getStringCellValue())); obj.setLanguageSort(Integer.valueOf(row.getCell(3).getStringCellValue()));
// obj.setIsDefault(Integer.valueOf(row.getCell(4).getStringCellValue())); obj.setIsDefault(Integer.valueOf(row.getCell(4).getStringCellValue()));
// obj.setLanguageStatus(Integer.valueOf(row.getCell(5).getStringCellValue())); obj.setLanguageStatus(Integer.valueOf(row.getCell(5).getStringCellValue()));
// obj.setIsValid(1); obj.setIsValid(1);
//
// result.add(obj); result.add(obj);
// } }
// }catch (Exception e){ }catch (Exception e){
// LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i); LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i);
// } }
// } }
// } }
// } }
// return result; return result;
// } }
//
// public List<SysLocaleResource> getSysLocaleResource(XSSFSheet sheet){ public List<SysLocaleResource> getSysLocaleResource(XSSFSheet sheet){
// List<SysLocaleResource> result = new ArrayList<>(); List<SysLocaleResource> result = new ArrayList<>();
// if(sheet != null){ if(sheet != null){
// if(sheet.getLastRowNum() >= 1){ if(sheet.getLastRowNum() >= 1){
// SysLocaleResource obj = null; SysLocaleResource obj = null;
// for (int i = 1; i <= sheet.getLastRowNum(); i++) { for (int i = 1; i <= sheet.getLastRowNum(); i++) {
// try { try {
// Row row = sheet.getRow(i);//获取索引为i的行以0开始 Row row = sheet.getRow(i);//获取索引为i的行以0开始
// if(row.getCell(0).toString().trim().length() > 0){ if(row.getCell(0).toString().trim().length() > 0){
// obj = new SysLocaleResource(); obj = new SysLocaleResource();
// obj.setId(Long.parseLong(row.getCell(0).getStringCellValue())); obj.setId(Long.parseLong(row.getCell(0).getStringCellValue()));
// obj.setResourceType(Integer.valueOf(row.getCell(1).getStringCellValue())); obj.setResourceType(Integer.valueOf(row.getCell(1).getStringCellValue()));
// obj.setLanguageCode(row.getCell(2).getStringCellValue()); obj.setLanguageCode(row.getCell(2).getStringCellValue());
// obj.setLanguageNameRdd(row.getCell(3).getStringCellValue()); obj.setLanguageNameRdd(row.getCell(3).getStringCellValue());
// obj.setResourceKey(row.getCell(4).getStringCellValue()); obj.setResourceKey(row.getCell(4).getStringCellValue());
// obj.setResourceValue(row.getCell(5).getStringCellValue()); obj.setResourceValue(row.getCell(5).getStringCellValue());
// obj.setIsSystem(Integer.valueOf(row.getCell(6).getStringCellValue())); obj.setIsSystem(Integer.valueOf(row.getCell(6).getStringCellValue()));
// obj.setIsValid(1); obj.setIsValid(1);
//
// result.add(obj); result.add(obj);
// } }
// }catch (Exception e){ }catch (Exception e){
// LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i); LOGGER.error("Excel Sheet Name :{} Index:{} DataType Error", sheet.getSheetName(), i);
// } }
// } }
// } }
// } }
// return result; return result;
// } }
//
//
// public XSSFWorkbook getWorkbook(String pathName){ public XSSFWorkbook getWorkbook(String pathName){
// try { try {
// InputStream in = TestExcelPermission.class.getClassLoader().getResourceAsStream(pathName); InputStream in = TestExcelPermission.class.getClassLoader().getResourceAsStream(pathName);
// XSSFWorkbook workbook = new XSSFWorkbook(in); XSSFWorkbook workbook = new XSSFWorkbook(in);
// return workbook; return workbook;
// }catch (Exception e){ }catch (Exception e){
// LOGGER.error(" System Init Sys Data Excel Error file path {} error message :{}",pathName,e.getMessage()); LOGGER.error(" System Init Sys Data Excel Error file path {} error message :{}",pathName,e.getMessage());
// e.getMessage(); e.getMessage();
// return null; return null;
// } }
// } }
//
//} }

@ -7,7 +7,7 @@
<groupId>i3plus.core</groupId> <groupId>i3plus.core</groupId>
<artifactId>i3plus-core</artifactId> <artifactId>i3plus-core</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-TEST-SNAPSHOT</version>
<modules> <modules>
<module>modules/i3plus-core-api</module> <module>modules/i3plus-core-api</module>
<module>modules/i3plus-core-apiservice</module> <module>modules/i3plus-core-apiservice</module>

Loading…
Cancel
Save