资源推送微服务
parent
ac5da17e7a
commit
7213cba666
|
@ -18,28 +18,49 @@ import lombok.NoArgsConstructor;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ResourceInfo {
|
public class ResourceInfo {
|
||||||
|
@Excel(name = "序号")
|
||||||
private String id;
|
private String id;
|
||||||
|
@Excel(name = "荐购id")
|
||||||
private String recommendId;
|
private String recommendId;
|
||||||
|
@Excel(name = "题名")
|
||||||
private String title;
|
private String title;
|
||||||
|
@Excel(name = "只用来查重,格式化题名")
|
||||||
private String titleFormat;
|
private String titleFormat;
|
||||||
|
@Excel(name = "题名译名")
|
||||||
private String otherTitle;
|
private String otherTitle;
|
||||||
|
@Excel(name = "分辑号 - 预留")
|
||||||
private String seriesNumber;
|
private String seriesNumber;
|
||||||
|
@Excel(name = "分辑名")
|
||||||
private String seriesTitle;
|
private String seriesTitle;
|
||||||
|
@Excel(name = "PISSN")
|
||||||
private String pissn;
|
private String pissn;
|
||||||
|
@Excel(name = "EISSN")
|
||||||
private String eissn;
|
private String eissn;
|
||||||
|
@Excel(name = "PISBN")
|
||||||
private String pisbn;
|
private String pisbn;
|
||||||
|
@Excel(name = "EISBN")
|
||||||
private String eisbn;
|
private String eisbn;
|
||||||
|
@Excel(name = "订购号")
|
||||||
private String orderNumber;
|
private String orderNumber;
|
||||||
|
@Excel(name = "学科")
|
||||||
private String subject;
|
private String subject;
|
||||||
|
@Excel(name = "出版社")
|
||||||
private String publisher;
|
private String publisher;
|
||||||
|
@Excel(name = "国别")
|
||||||
private String country;
|
private String country;
|
||||||
|
@Excel(name = "出版年")
|
||||||
private String pubYear;
|
private String pubYear;
|
||||||
|
@Excel(name = "创刊年")
|
||||||
private String foundedYear;
|
private String foundedYear;
|
||||||
|
@Excel(name = "语种")
|
||||||
private String language;
|
private String language;
|
||||||
|
@Excel(name = "出版频率")
|
||||||
private String pubFeq;
|
private String pubFeq;
|
||||||
|
@Excel(name = "内容简介")
|
||||||
private String Intro;
|
private String Intro;
|
||||||
|
@Excel(name = "分类号")
|
||||||
private String classiNumber;
|
private String classiNumber;
|
||||||
|
@Excel(name = "期刊URL地址")
|
||||||
private String url;
|
private String url;
|
||||||
private String carrier;
|
private String carrier;
|
||||||
private String type;
|
private String type;
|
||||||
|
|
|
@ -12,6 +12,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
@ -39,9 +40,12 @@ public class ResourceController {
|
||||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||||
@RequiresPermissions("Resource:ResourceInfo:import")
|
@RequiresPermissions("Resource:ResourceInfo:import")
|
||||||
@PostMapping("/importData")
|
@PostMapping("/importData")
|
||||||
public Result importData (MultipartFile file, boolean updateSupport) throws Exception {
|
public Result importData (@RequestParam("file") MultipartFile file) throws Exception {
|
||||||
ExcelUtil<ResourceInfo> util = new ExcelUtil<ResourceInfo>(ResourceInfo.class);
|
ExcelUtil<ResourceInfo> util = new ExcelUtil<ResourceInfo>(ResourceInfo.class);
|
||||||
List<ResourceInfo> resourceList = util.importExcel(file.getInputStream());
|
List<ResourceInfo> resourceList = util.importExcel(file.getInputStream());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// String operName = SecurityUtils.getUsername();
|
// String operName = SecurityUtils.getUsername();
|
||||||
// String message = resourceService.importResource(resourceList, updateSupport, operName);
|
// String message = resourceService.importResource(resourceList, updateSupport, operName);
|
||||||
return Result.success(resourceList);
|
return Result.success(resourceList);
|
||||||
|
|
|
@ -51,4 +51,6 @@ spring:
|
||||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
# rabbit 配置文件
|
# rabbit 配置文件
|
||||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.muyu.system.mapper: DEBUG
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="logs/cloud-pay"/>
|
<property name="log.path" value="logs/cloud-resource"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="logs/cloud-pay"/>
|
<property name="log.path" value="logs/cloud-resource"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
Loading…
Reference in New Issue