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

[excel导入]修改路径

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