| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.domain.ZfClean; |
| | | import com.ruoyi.domain.ZfLog; |
| | | import com.ruoyi.service.ZfLogService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | |
| | | private ZfLogService zfLogService; |
| | | |
| | | @GetMapping("/list") |
| | | public AjaxResult list(){ |
| | | public AjaxResult list(ZfLog zfLog) throws ParseException { |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | |
| | | Page<ZfLog> zfLogPage = new Page<>(pageNum,pageSize); |
| | | Page<ZfLog> page = zfLogService.page(zfLogPage); |
| | | |
| | | return AjaxResult.success(MapUtils.getResult(page)); |
| | | String st = ServletUtils.getParameter("module"); |
| | | if(st!=null&&!st.equals("")) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | LocalDateTime dateTime = LocalDate.parse(st, DateTimeFormatter.ofPattern("yyyy-MM-dd")).atStartOfDay(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | return zfLogService.selectDataList(dateTime, pageNum, pageSize); |
| | | } |
| | | else |
| | | { |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | // List<ZfLog> beanRecords = pageResult.getRecords();//得到查询出来的数据 |
| | | // Page<ZfLog> zfLogPage = new Page<>(pageNum,pageSize); |
| | | // Page<ZfLog> page = zfLogService.page(zfLogPage); |
| | | |
| | | // return AjaxResult.success(MapUtils.getResult(pageResult)); |
| | | } |
| | | |
| | | |