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