remove:移除了poi模块
This commit is contained in:
7
pom.xml
7
pom.xml
@@ -23,7 +23,6 @@
|
|||||||
<module>springboot-login</module>
|
<module>springboot-login</module>
|
||||||
<module>springboot-web</module>
|
<module>springboot-web</module>
|
||||||
<module>springboot-util</module>
|
<module>springboot-util</module>
|
||||||
<module>springboot-poi</module>
|
|
||||||
<module>springboot-platform</module>
|
<module>springboot-platform</module>
|
||||||
<module>springboot-message</module>
|
<module>springboot-message</module>
|
||||||
<module>springboot-annotation</module>
|
<module>springboot-annotation</module>
|
||||||
@@ -104,12 +103,6 @@
|
|||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
|
||||||
<artifactId>springboot-poi</artifactId>
|
|
||||||
<version>2.0.1</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>easyexcel</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.tiesheng.annotation.token.TokenIgnore;
|
|||||||
import com.tiesheng.database.config.DbBackupConfig;
|
import com.tiesheng.database.config.DbBackupConfig;
|
||||||
import com.tiesheng.demo.pojos.JsonTest;
|
import com.tiesheng.demo.pojos.JsonTest;
|
||||||
import com.tiesheng.demo.pojos.PoiBean;
|
import com.tiesheng.demo.pojos.PoiBean;
|
||||||
import com.tiesheng.demo.pojos.TestFile;
|
|
||||||
import com.tiesheng.platform.config.ding.PlatformDingConfig;
|
import com.tiesheng.platform.config.ding.PlatformDingConfig;
|
||||||
import com.tiesheng.platform.config.ding.bean.DingUserInfo;
|
import com.tiesheng.platform.config.ding.bean.DingUserInfo;
|
||||||
import com.tiesheng.util.config.EncryptConfig;
|
import com.tiesheng.util.config.EncryptConfig;
|
||||||
@@ -160,16 +159,6 @@ public class TestController {
|
|||||||
return ApiResp.respOK(search);
|
return ApiResp.respOK(search);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("desensitize")
|
|
||||||
@TokenIgnore
|
|
||||||
public ApiResp<List<TestFile>> desensitize() {
|
|
||||||
TestFile file = new TestFile("11111");
|
|
||||||
file.setTest("111111");
|
|
||||||
TestFile file1 = new TestFile("22222");
|
|
||||||
file1.setTest("22222");
|
|
||||||
return ApiResp.respOK(CollUtil.newArrayList(file, file1));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("passwd")
|
@RequestMapping("passwd")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.tiesheng.demo.pojos;
|
|
||||||
|
|
||||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
|
||||||
|
|
||||||
|
|
||||||
public class TestFile extends TestParent implements PoiWriteBase {
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
public TestFile(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.tiesheng.demo.pojos;
|
|
||||||
|
|
||||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
|
||||||
|
|
||||||
|
|
||||||
public class TestParent implements PoiWriteBase {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
private String test;
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
// setter、getter
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTest() {
|
|
||||||
return test;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTest(String test) {
|
|
||||||
this.test = test;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
|
||||||
<artifactId>springboot-parent</artifactId>
|
|
||||||
<version>2.0.1</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>springboot-poi</artifactId>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>easyexcel</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
|
||||||
<artifactId>springboot-util</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package com.tiesheng.poi.pojos;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hao
|
|
||||||
*/
|
|
||||||
public interface PoiReadBase {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.tiesheng.poi.pojos;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.write.style.*;
|
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
|
|
||||||
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hao
|
|
||||||
*/
|
|
||||||
@HeadRowHeight(24)
|
|
||||||
@HeadFontStyle(fontHeightInPoints = 13)
|
|
||||||
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
|
|
||||||
@ContentRowHeight(20)
|
|
||||||
@ContentFontStyle(fontHeightInPoints = 12)
|
|
||||||
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER)
|
|
||||||
@ColumnWidth(20)
|
|
||||||
public interface PoiWriteBase {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.tiesheng.poi.util;
|
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
|
||||||
import com.alibaba.excel.read.listener.ReadListener;
|
|
||||||
import com.tiesheng.poi.pojos.PoiReadBase;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
public class PoiReadUtil {
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 读取文件
|
|
||||||
*
|
|
||||||
* @param file
|
|
||||||
* @param readListener
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static <T extends PoiReadBase> void read(File file, Class<T> tClass, ReadListener<T> readListener) {
|
|
||||||
EasyExcel.read(file, tClass, readListener).autoTrim(true).headRowNumber(1).sheet().doRead();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package com.tiesheng.poi.util;
|
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
|
||||||
import com.alibaba.excel.annotation.write.style.*;
|
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
|
|
||||||
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
|
|
||||||
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
||||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hao
|
|
||||||
*/
|
|
||||||
@HeadRowHeight(24)
|
|
||||||
@HeadFontStyle(fontHeightInPoints = 13)
|
|
||||||
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
|
|
||||||
@ContentRowHeight(20)
|
|
||||||
@ContentFontStyle(fontHeightInPoints = 12)
|
|
||||||
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER)
|
|
||||||
@ColumnWidth(20)
|
|
||||||
public class PoiWriteUtil {
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出数据
|
|
||||||
*
|
|
||||||
* @param list
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static <T extends PoiWriteBase> boolean export(List<T> list, Class<T> tClass, String absPath, String sheetName) {
|
|
||||||
EasyExcel.write(absPath, tClass).excelType(ExcelTypeEnum.XLSX)
|
|
||||||
.sheet(sheetName)
|
|
||||||
.doWrite(list);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -49,11 +49,6 @@
|
|||||||
<artifactId>springboot-database</artifactId>
|
<artifactId>springboot-database</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
|
||||||
<artifactId>springboot-poi</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-login</artifactId>
|
<artifactId>springboot-login</artifactId>
|
||||||
|
|||||||
Reference in New Issue
Block a user