Compare commits
2 Commits
d1daa00258
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 21eb5cc0d8 | |||
| 625ce49c7e |
@@ -245,7 +245,3 @@ justauth:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=gitlab
|
||||
|
||||
# 字体文件路径
|
||||
ttfFile:
|
||||
path: E:\giftBook\MicrosoftYaHei.ttf
|
||||
|
||||
@@ -247,7 +247,3 @@ justauth:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=gitlab
|
||||
|
||||
# 字体文件路径
|
||||
ttfFile:
|
||||
path: /usr/local/project/giftBook/jar/fonts/MicrosoftYaHei.ttf
|
||||
|
||||
@@ -279,3 +279,7 @@ warm-flow:
|
||||
- 255,205,23
|
||||
## 已办理
|
||||
- 157,255,0
|
||||
|
||||
# 字体文件名称
|
||||
ttfFile:
|
||||
name: simhei.ttf
|
||||
|
||||
BIN
giftBook-admin/src/main/resources/font/simhei.ttf
Normal file
BIN
giftBook-admin/src/main/resources/font/simhei.ttf
Normal file
Binary file not shown.
@@ -64,8 +64,8 @@ public class TGiftBookDetailsServiceImpl implements ITGiftBookDetailsService {
|
||||
|
||||
private final ITGiftBookService giftBookService;
|
||||
|
||||
@Value("${ttfFile.path}")
|
||||
private String ttfPath;
|
||||
@Value("${ttfFile.name}")
|
||||
private String ttfName;
|
||||
|
||||
|
||||
/**
|
||||
@@ -243,7 +243,8 @@ public class TGiftBookDetailsServiceImpl implements ITGiftBookDetailsService {
|
||||
Document document = new Document(pdfDoc, PageSize.A4, false);
|
||||
|
||||
// 设置字体
|
||||
PdfFont font = PdfFontFactory.createFont(ttfPath, PdfEncodings.IDENTITY_H);
|
||||
ClassPathResource classPathResource = new ClassPathResource("font/" + ttfName);
|
||||
PdfFont font = PdfFontFactory.createFont(classPathResource.getPath(), PdfEncodings.IDENTITY_H);
|
||||
document.setFont(font);
|
||||
pdfDoc.addNewPage();
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ public class TGiftBookServiceImpl implements ITGiftBookService {
|
||||
private LambdaQueryWrapper<TGiftBook> buildQueryWrapper(TGiftBookBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TGiftBook> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TGiftBook::getDelFlag, 0);
|
||||
lqw.orderByAsc(TGiftBook::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), TGiftBook::getName, bo.getName());
|
||||
return lqw;
|
||||
|
||||
@@ -20,6 +20,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="null != bo.eventType">
|
||||
and tgbd.event_type = #{bo.eventType}
|
||||
</if>
|
||||
<if test="null != bo.isReturn">
|
||||
and tgbd.is_return = #{bo.isReturn}
|
||||
</if>
|
||||
<if test="null != bo.address">
|
||||
and tgbd.address like concat('%', #{bo.address}, '%')
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user