| | |
| | | import com.ruoyi.system.dto.SysVisitorRecordPageRequest; |
| | | import com.ruoyi.system.service.ISysVisitorRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping("/system/visitor/record") |
| | | public class SysVisitorRecordController extends BaseController |
| | | { |
| | | private static final int EXPORT_PAGE_SIZE = 10000; |
| | | |
| | | @Autowired |
| | | private ISysVisitorRecordService visitorRecordService; |
| | | |
| | |
| | | * 分页查询访客登记记录 |
| | | */ |
| | | @Log(title = "访客登记记录", businessType = BusinessType.SELECT) |
| | | @PreAuthorize("@ss.hasPermi('visitor:record:view')") |
| | | @PostMapping("/page") |
| | | public AjaxResult page(@RequestBody(required = false) SysVisitorRecordPageRequest request) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出访客登记记录 |
| | | */ |
| | | @Log(title = "访客登记记录", businessType = BusinessType.EXPORT) |
| | | @PreAuthorize("@ss.hasPermi('visitor:record:export')") |
| | | @PostMapping("/export") |
| | | public AjaxResult export(@RequestBody(required = false) SysVisitorRecordPageRequest request) |
| | | { |
| | | SysVisitorRecordPageRequest query = request == null ? new SysVisitorRecordPageRequest() : request; |
| | | query.setPageNum(1); |
| | | query.setPageSize(EXPORT_PAGE_SIZE); |
| | | return success(visitorRecordService.pageList(query).getRecords()); |
| | | } |
| | | |
| | | /** |
| | | * 查看访客登记详情 |
| | | */ |
| | | @Log(title = "访客登记记录", businessType = BusinessType.SELECT) |
| | | @PreAuthorize("@ss.hasPermi('visitor:record:view')") |
| | | @PostMapping("/detail") |
| | | public AjaxResult detail(@RequestBody SysVisitorRecordDetailRequest request) |
| | | { |
| | |
| | | * 删除访客登记记录 |
| | | */ |
| | | @Log(title = "访客登记记录", businessType = BusinessType.DELETE) |
| | | @PreAuthorize("@ss.hasPermi('visitor:record:remove')") |
| | | @PostMapping("/delete") |
| | | public AjaxResult delete(@RequestBody SysVisitorRecordDeleteRequest request) |
| | | { |