图书详细信息返回结果添加图书类型
This commit is contained in:
@@ -8,6 +8,7 @@ import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
@@ -44,8 +45,7 @@ public class CertificateUtil extends Thread{
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Date startTime = new Date();
|
||||
System.out.println(name+"-开始!");
|
||||
// System.out.println(name+"-开始!");
|
||||
try {
|
||||
Image src = ImageIO.read(new File(inputSrc));
|
||||
// 获取图片的高和宽
|
||||
@@ -107,12 +107,11 @@ public class CertificateUtil extends Thread{
|
||||
|
||||
// 释放资源
|
||||
g.dispose();
|
||||
File outputfile = new File(outputSrc+name+".png");
|
||||
ImageIO.write(image, "png", outputfile);
|
||||
String filename = UUID.randomUUID().toString() + System.currentTimeMillis();
|
||||
File outputfile = new File(outputSrc+ filename +".jpg");
|
||||
ImageIO.write(image, "jpg", outputfile);
|
||||
|
||||
Date endTime = new Date();
|
||||
System.out.println(endTime.getTime()-startTime.getTime() + "");
|
||||
System.out.println(name+"-生成完成!");
|
||||
System.out.println(no +","+ name +","+ filename);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -128,8 +127,8 @@ public class CertificateUtil extends Thread{
|
||||
String time = "于2024年1月4日至5日";
|
||||
String des = "圆满完成中医形质病学培训班";
|
||||
String trans = "Successful completion of the";
|
||||
String trans2 = "Chinese Medicine Morphology and Disease Training";
|
||||
String trans3 = "course on 2024 1.4-5";
|
||||
String trans2 = "Training course on TCM somatology";
|
||||
String trans3 = "on 2024.01.04-05";
|
||||
//Traditional Chinese Medicine Morphology and Disease Training Course
|
||||
String endy = "2024";
|
||||
String endm = "1";
|
||||
|
||||
@@ -114,7 +114,21 @@ public class BookController {
|
||||
// @RequiresPermissions("book:book:info")
|
||||
public R info(@PathVariable("id") Integer id) {
|
||||
BookEntity book = bookService.getById(id);
|
||||
|
||||
//返回结果添加图书类型
|
||||
LambdaQueryWrapper<MedicaldesBook> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(MedicaldesBook::getBookId,id);
|
||||
List<MedicaldesBook> list = medicaldesBookService.list(wrapper);
|
||||
if (list.size() > 0) {
|
||||
String type = "";
|
||||
for (MedicaldesBook mb : list) {
|
||||
if (StringUtils.isEmpty(type)){
|
||||
type += mb.getTypeId();
|
||||
}else {
|
||||
type += "," + mb.getTypeId();
|
||||
}
|
||||
}
|
||||
book.setMedicaldesBookType(type);
|
||||
}
|
||||
return R.ok().put("book", book);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user