提交 5eb327f5 authored 作者: xc's avatar xc

[excel导入]修改路径

上级 98686cd9
......@@ -9,6 +9,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -38,10 +39,10 @@ public class ExcelController {
@ApiOperation("导入excel模板")
@PostMapping("/template")
public ResponseEntity importTemplate(@RequestBody MultipartFile template){
public ResponseEntity importTemplate( MultipartFile file){
Map<String, int[]> i = null;
try {
i = excelData.getIndenxMap(template);
i = excelData.getIndenxMap(file);
} catch (IOException e) {
e.printStackTrace();
return ResultUtil.failed("导入失败!");
......
......@@ -2,9 +2,11 @@ package com.tykj.setting.controller;
import com.tykj.base.result.ResultUtil;
import com.tykj.setting.entity.vo.ScreenSettingVo;
import com.tykj.setting.repository.ConditionSettingRepository;
import com.tykj.setting.service.ScreenSettingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
......@@ -18,6 +20,9 @@ public class ScreenSettingController {
@Autowired
private ScreenSettingService screenSettingService;
@Autowired
ConditionSettingRepository conditionSettingRepository;
@PostMapping
@ApiOperation("新增筛选设置")
public ResponseEntity save(@RequestBody ScreenSettingVo screenSettingVo){
......@@ -51,4 +56,13 @@ public class ScreenSettingController {
return ResultUtil.success("", "删除成功");
}
@DeleteMapping("/condition/{id}")
@ApiOperation("按id删除单个筛选设置")
public ResponseEntity conditionDeleteById(@PathVariable Integer id){
conditionSettingRepository.deleteById(id);
return ResultUtil.success("", "删除成功");
}
}
spring:
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
datasource:
username: root
password: Huang123+
url: jdbc:mysql://47.106.142.73:3306/dataTest?useSSL=false&serverTimezone=GMT%2b8&characterEncoding=utf-8&nullCatalogMeansCurrent=true
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:h2:file:/home/xie/dataBase/dataBase
# url: jdbc:h2:file:/opt/dateDec/dataBase
driver-class-name: org.h2.Driver
h2:
console:
path=/h2-console:
enabled: true
hikari:
read-only: false
connection-timeout: 60000
......@@ -16,7 +22,6 @@ spring:
login-timeout: 5
maximum-pool-size: 60
minimum-idle: 10
jpa:
show-sql: true
hibernate:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论