资料下载bug
This commit is contained in:
+28
-7
@@ -9,6 +9,7 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -19,10 +20,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.data.entity.PayCaseCommitteeExcel;
|
||||
import com.jero.data.entity.PayCaseCommitteeSubitem;
|
||||
import com.jero.data.entity.PayDistributionRecord;
|
||||
import com.jero.data.entity.PayFileDownloadRecord;
|
||||
import com.jero.data.entity.*;
|
||||
import com.jero.data.service.IPayFileDownloadRecordService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
@@ -71,13 +69,36 @@ public class PayFileDownloadRecordController extends JeroController<PayFileDownl
|
||||
@AutoLog(value = "资料下载记录-分页列表查询")
|
||||
@ApiOperation(value="资料下载记录-分页列表查询", notes="资料下载记录-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(PayFileDownloadRecord payFileDownloadRecord,
|
||||
public Result<?> queryPageList(payFileDownloadRecordPage payFileDownloadRecord,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayFileDownloadRecord> queryWrapper = QueryGenerator.initQueryWrapper(payFileDownloadRecord, req.getParameterMap());
|
||||
QueryWrapper<PayFileDownloadRecord> queryWrapper = new QueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getStartTime()) && ObjectUtil.isNotEmpty(payFileDownloadRecord.getEndTime())) {
|
||||
queryWrapper.gt("create_time", payFileDownloadRecord.getStartTime());
|
||||
queryWrapper.lt("create_time", payFileDownloadRecord.getEndTime());
|
||||
|
||||
}else if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getStartTime())){
|
||||
queryWrapper.gt("create_time", payFileDownloadRecord.getStartTime());
|
||||
|
||||
}else if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getEndTime())){
|
||||
queryWrapper.lt("create_time", payFileDownloadRecord.getEndTime());
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getFileName())){
|
||||
queryWrapper.like("file_name",payFileDownloadRecord.getFileName());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getMeetingName())){
|
||||
queryWrapper.like("meeting_name",payFileDownloadRecord.getMeetingName());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getDownloadName())){
|
||||
queryWrapper.like("download_name",payFileDownloadRecord.getDownloadName());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(payFileDownloadRecord.getCompanyName())){
|
||||
queryWrapper.like("company_name",payFileDownloadRecord.getCompanyName());
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<PayFileDownloadRecord> page = new Page<PayFileDownloadRecord>(pageNo, pageSize);
|
||||
Page<PayFileDownloadRecord> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayFileDownloadRecord> pageList = payFileDownloadRecordService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.jero.data.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/13 15:21
|
||||
*/
|
||||
@Data
|
||||
public class payFileDownloadRecordPage {
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private java.lang.String fileName;
|
||||
/**企业名称*/
|
||||
@Excel(name = "企业名称", width = 15)
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private java.lang.String companyName;
|
||||
/**下载用户名称*/
|
||||
@Excel(name = "下载用户名称", width = 15)
|
||||
@ApiModelProperty(value = "下载用户名称")
|
||||
private java.lang.String downloadName;
|
||||
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
private java.lang.String meetingName;
|
||||
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date startTime;
|
||||
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.util.Date endTime;
|
||||
}
|
||||
Reference in New Issue
Block a user