|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.dao.admin.response.VisitEventDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.VisitEvent; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.VisitEventVo; | 
|---|
|  |  |  | import com.doumee.service.business.VisitEventService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @RequiresPermissions("business:visitevent:query") | 
|---|
|  |  |  | public ApiResponse<PageData<VisitEvent>> findPage (@RequestBody PageWrap<VisitEvent> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(visitEventService.findPage(pageWrap)); | 
|---|
|  |  |  | return ApiResponse.success(visitEventService.findVisitPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:visitevent:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<VisitEvent> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(VisitEvent.class).export(visitEventService.findPage(pageWrap).getRecords(), "访客事件推送记录表", response); | 
|---|
|  |  |  | ExcelExporter.build(VisitEvent.class).export(visitEventService.findPageExcel(pageWrap), "访客出入事件_" + System.currentTimeMillis(), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|