Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
f3a84263
Commit
f3a84263
authored
Nov 26, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-chat-activity' into 'master'
Feature chat activity See merge request
!2317
parents
267edf59
ee897278
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+7
-3
ApolloUtils.java
.../java/com/gic/haoban/manage/service/util/ApolloUtils.java
+16
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
f3a84263
...
@@ -209,6 +209,8 @@ public class ImageCombined {
...
@@ -209,6 +209,8 @@ public class ImageCombined {
Graphics2D
g
=
combinedImage
.
createGraphics
();
Graphics2D
g
=
combinedImage
.
createGraphics
();
g
.
setColor
(
Color
.
WHITE
);
g
.
setColor
(
Color
.
WHITE
);
g
.
drawImage
(
resizedImage
,
0
,
1
,
null
);
g
.
drawImage
(
resizedImage
,
0
,
1
,
null
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_ANTIALIASING
,
RenderingHints
.
VALUE_ANTIALIAS_ON
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_TEXT_ANTIALIASING
,
RenderingHints
.
VALUE_TEXT_ANTIALIAS_ON
);
if
(
showStyle
==
1
)
{
if
(
showStyle
==
1
)
{
// 不需要留白时,QR码距离底部20px
// 不需要留白时,QR码距离底部20px
...
@@ -238,15 +240,17 @@ public class ImageCombined {
...
@@ -238,15 +240,17 @@ public class ImageCombined {
// 添加白色背景
// 添加白色背景
g
.
setColor
(
Color
.
WHITE
);
g
.
setColor
(
Color
.
WHITE
);
g
.
fillRect
(
0
,
finalHeight
-
WHITE_SPACE_HEIGHT
,
width
,
WHITE_SPACE_HEIGHT
);
g
.
fillRect
(
0
,
finalHeight
-
WHITE_SPACE_HEIGHT
,
width
,
WHITE_SPACE_HEIGHT
);
String
font
=
ApolloUtils
.
combinedFonts
();
int
type
=
ApolloUtils
.
combinedFontsType
();
// 添加门店名称,距底部88px
// 添加门店名称,距底部88px
g
.
setColor
(
new
Color
(
36
,
40
,
53
));
g
.
setColor
(
new
Color
(
36
,
40
,
53
));
g
.
setFont
(
new
Font
(
"Arial"
,
Font
.
PLAIN
,
30
));
g
.
setFont
(
new
Font
(
font
,
type
,
30
));
logger
.
info
(
"使用字体:{}"
,
g
.
getFont
().
getFontName
());
drawSingleLineText
(
g
,
lineOne
,
30
,
finalHeight
-
WHITE_SPACE_HEIGHT
+
72
,
width
-
196
);
// 留出左右边距
drawSingleLineText
(
g
,
lineOne
,
30
,
finalHeight
-
WHITE_SPACE_HEIGHT
+
72
,
width
-
196
);
// 留出左右边距
// 添加推荐人信息,距底部40px
// 添加推荐人信息,距底部40px
g
.
setColor
(
new
Color
(
151
,
155
,
165
));
g
.
setColor
(
new
Color
(
151
,
155
,
165
));
g
.
setFont
(
new
Font
(
"Arial"
,
Font
.
PLAIN
,
26
));
g
.
setFont
(
new
Font
(
font
,
type
,
26
));
drawSingleLineText
(
g
,
lineTwo
,
30
,
finalHeight
-
WHITE_SPACE_HEIGHT
+
120
,
width
-
196
);
// 留出左右边距
drawSingleLineText
(
g
,
lineTwo
,
30
,
finalHeight
-
WHITE_SPACE_HEIGHT
+
120
,
width
-
196
);
// 留出左右边距
// 添加二维码,距底部12px
// 添加二维码,距底部12px
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ApolloUtils.java
View file @
f3a84263
...
@@ -49,6 +49,22 @@ public class ApolloUtils {
...
@@ -49,6 +49,22 @@ public class ApolloUtils {
}
}
/**
/**
* 字体
* @return
*/
public
static
String
combinedFonts
()
{
Config
config
=
ConfigService
.
getAppConfig
();
String
combinedFonts
=
config
.
getProperty
(
"combinedFonts"
,
""
);
return
combinedFonts
;
}
public
static
Integer
combinedFontsType
()
{
Config
config
=
ConfigService
.
getAppConfig
();
String
combinedFontsType
=
config
.
getProperty
(
"combinedFontsType"
,
"0"
);
return
Integer
.
parseInt
(
combinedFontsType
);
}
/**
* 线程池核心线程数
* 线程池核心线程数
* @return
* @return
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment