图书详细信息返回结果添加图书类型

This commit is contained in:
wuchunlei
2024-01-10 16:11:22 +08:00
parent bab3941807
commit 9745cbfefe
2 changed files with 23 additions and 10 deletions

View File

@@ -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";