增加用户导出时模板数据
This commit is contained in:
parent
d439395724
commit
c98455c8bd
@ -298,6 +298,10 @@ public class UserController {
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void importStudentTemplate(HttpServletResponse response) throws IOException {
|
||||
List<UserStudentExcelVO> list = new ArrayList<>();
|
||||
list.add(UserStudentExcelVO.builder().username("yunai").nickname("导入前请删除").mobile("18999999999")
|
||||
.sex("1").status("0").userNo("10001").statusType("学生").build());
|
||||
list.add(UserStudentExcelVO.builder().username("yuanma").nickname("请删除本行数据").mobile("18999999999")
|
||||
.sex("2").status("1").userNo("10002").statusType("学员").build());
|
||||
// 输出 Excel
|
||||
ExcelUtils.write(response, "学生模板.xls", "数据", UserStudentExcelVO.class,list);
|
||||
}
|
||||
@ -309,6 +313,10 @@ public class UserController {
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void importTeacherTemplate(HttpServletResponse response) throws IOException {
|
||||
List<UserTeacherExcelVO> list = new ArrayList<>();
|
||||
list.add(UserTeacherExcelVO.builder().username("yunai").userNo("10001").nickname("导入前请删除").email("18999999999@qq.com").mobile("18999999999")
|
||||
.sex("1").status("0").birthDate("2020-01-01 00:00:00").statusType("教师").build());
|
||||
list.add(UserTeacherExcelVO.builder().username("yuanma").userNo("10002").nickname("请删除本行数据").email("18999999999@qq.com").mobile("18999999999")
|
||||
.sex("2").status("1").birthDate("2020-01-01 00:00:00").statusType("培训教师").build());
|
||||
// 输出 Excel
|
||||
ExcelUtils.write(response, "教师模板.xls", "数据", UserTeacherExcelVO.class,list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user