通用下载模板接口

duhanyu
dongdingding 1 year ago
parent c38ecb779f
commit ef354e723c

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tcZz.domain.TcAqg;
@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.util.List;
/**
@ -99,7 +102,6 @@ public class TcAqgController extends BaseController {
}
/**
*
*
@ -109,8 +111,16 @@ public class TcAqgController extends BaseController {
@ApiOperation("批量启用禁用")
@GetMapping("/isStatus")
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus,@RequestParam("ids") List<String> ids) {
tcAqgService.updateByisStatus(isStatus,ids);
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus, @RequestParam("ids") List<String> ids) {
tcAqgService.updateByisStatus(isStatus, ids);
return AjaxResult.success();
}
@ApiOperation("通用下载excel模板")
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response)
{
ExcelUtil<TcAqg> util = new ExcelUtil<TcAqg>(TcAqg.class);
util.importTemplateExcel(response, " 网络安全官");
}
}

@ -29,7 +29,7 @@ public class BaseEntity implements Serializable
private String createBy;
/** 创建时间 */
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ -40,7 +40,6 @@ public class BaseEntity implements Serializable
private String updateBy;
/** 更新时间 */
@Excel(name = "更新时间", dateFormat = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

Loading…
Cancel
Save