/**标签:SchoolCalendarDetail,导出,list,RuoYi,param,ids,util,方法,response From: https://www.cnblogs.com/zhfblogs/p/16768632.html
* 导出部分校历详细条目列表
* @param response
* @param ids
*/
@PostMapping("/export/{ids}")
public void export(HttpServletResponse response, @PathVariable("ids") List<Integer> ids) {
List<SchoolCalendarDetail> list = schoolCalendarDetailService.listByIds(ids);
ExcelUtil<SchoolCalendarDetail> util = new ExcelUtil<>(SchoolCalendarDetail.class);
util.exportExcel(response,list,"push");
}
/**
* 导出全部校历详细条目列表
* @param response
* @param schoolCalendarDetail
*/
@PostMapping("/export")
public void exportAll(HttpServletResponse response, SchoolCalendarDetail schoolCalendarDetail) {
LambdaQueryWrapper<SchoolCalendarDetail> lqw = new LambdaQueryWrapper<>();
lqw
//delflag是逻辑删除,查找未被删除的
.eq(SchoolCalendarDetail::getDelFlag,'0')
.orderByDesc(SchoolCalendarDetail::getStartTime)
;
List<SchoolCalendarDetail> list = schoolCalendarDetailService.list(lqw);
ExcelUtil<SchoolCalendarDetail> util = new ExcelUtil<>(SchoolCalendarDetail.class);
util.exportExcel(response,list,"push");
}