Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
42834c54
Commit
42834c54
authored
Jul 29, 2018
by
Menethil
Browse files
根据系统设置决定是否自动生成分享图(商品创建或者更新的时候自动创建对应分享图)
parent
d1061b12
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-core/src/main/java/org/linlinjava/litemall/core/qcode/QCodeService.java
View file @
42834c54
...
@@ -32,6 +32,9 @@ public class QCodeService {
...
@@ -32,6 +32,9 @@ public class QCodeService {
* @param goodName
* @param goodName
*/
*/
public
void
createGoodShareImage
(
String
goodId
,
String
goodPicUrl
,
String
goodName
)
{
public
void
createGoodShareImage
(
String
goodId
,
String
goodPicUrl
,
String
goodName
)
{
if
(!
SystemConfig
.
isAutoCreateShareImage
())
return
;
try
{
try
{
//创建该商品的二维码
//创建该商品的二维码
File
file
=
wxMaService
.
getQrcodeService
().
createWxaCodeUnlimit
(
goodId
,
"pages/index/index"
);
File
file
=
wxMaService
.
getQrcodeService
().
createWxaCodeUnlimit
(
goodId
,
"pages/index/index"
);
...
...
litemall-core/src/main/java/org/linlinjava/litemall/core/system/SystemConfig.java
View file @
42834c54
...
@@ -60,6 +60,11 @@ public class SystemConfig extends BaseConfig {
...
@@ -60,6 +60,11 @@ public class SystemConfig extends BaseConfig {
return
getConfig
(
PRE_FIX
+
"mallname"
);
return
getConfig
(
PRE_FIX
+
"mallname"
);
}
}
public
static
boolean
isAutoCreateShareImage
()
{
int
autoCreate
=
getConfigInt
(
"shareimage.autocreate"
);
return
autoCreate
==
0
?
false
:
true
;
}
@Override
@Override
public
String
getPrefix
()
{
public
String
getPrefix
()
{
return
PRE_FIX
;
return
PRE_FIX
;
...
...
Write
Preview
Supports
Markdown
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