提交 4f1dc433 authored 作者: lizhuo's avatar lizhuo

--no commit message

上级 f4a6e422
......@@ -126,9 +126,11 @@ public class EbookServiceImpl extends BaseServiceImpl<Ebook, String> implements
PdfLibrary pdf = new PdfLibrary();
pdf.setName(form.getPdfName());
pdf.setPdf(form.getPdf());
Integer count = pdfLibraryMapper.selectCount(pdf);
if (count == 0) {
pdf.setId(form.getPdf());
List<PdfLibrary> pdfList = pdfLibraryMapper.select(pdf);
if (pdfList.size() == 0) {
pdf.setId(null);
pdf.setPdf(form.getPdf());
pdf.setUploadTime(new Date());
pdf.setStatus(0);
pdfLibraryMapper.insert(pdf);
......
......@@ -19,14 +19,14 @@ default:
spring-sleuth-sampler-percentage: 1.0
#数据库连接信息
spring-datasource-driver-class-name: com.mysql.jdbc.Driver
spring-datasource-url: jdbc:mysql://192.168.2.229:3306/
#spring-datasource-url: jdbc:mysql://10.20.7.82:3306/
#spring-datasource-url: jdbc:mysql://192.168.2.229:3306/
spring-datasource-url: jdbc:mysql://10.20.7.82:3306/
spring-datasource-username: root
spring-datasource-password: root
spring-datasource-password: zrqx2020
spring-datasource-initialize: true
#redis链接信息
redis:
host: 192.168.2.231
host: localhost
port: 6379
password: 123456
timeout: 3000 # 连接超时时间 单位 ms(毫秒)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论