Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4934d7b1
authored
Dec 31, 2021
by
danmo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修改
1 parent
d5e1ba7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
linkwe-admin/src/main/resources/bootstrap.properties
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/welcome/WelcomeService.java
linkwe-admin/src/main/resources/bootstrap.properties
View file @
4934d7b
linkwechat.nacos.host
=
120.79.64.17
linkwechat.nacos.host
=
linkwechat.nacos.port
=
10848
linkwechat.nacos.port
=
10848
linkwechat.nacos.namespace
=
1cc3943c-fed8-46e6-907e-2d52b72044a5
linkwechat.nacos.namespace
=
linkwechat.nacos.username
=
nacos
linkwechat.nacos.username
=
linkwechat.nacos.password
=
0p-0p-0p-
linkwechat.nacos.password
=
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
View file @
4934d7b
...
@@ -453,13 +453,8 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
...
@@ -453,13 +453,8 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
private
String
getGroupFissionQrcode
(
Long
taskFissionId
,
WeTaskFissionRecord
record
,
WeCustomer
weCustomer
)
{
private
String
getGroupFissionQrcode
(
Long
taskFissionId
,
WeTaskFissionRecord
record
,
WeCustomer
weCustomer
)
{
if
(
weCustomer
!=
null
)
{
if
(
weCustomer
!=
null
)
{
String
avatarUrl
=
weCustomer
.
getAvatar
();
String
avatarUrl
=
weCustomer
.
getAvatar
();
StringBuilder
contentBuilder
=
new
StringBuilder
(
pageGroupUrl
);
String
content
=
StringUtils
.
format
(
pageGroupUrl
,
taskFissionId
,
record
.
getId
());
contentBuilder
.
append
(
"?"
)
BufferedImage
bufferedImage
=
QREncode
.
crateQRCode
(
content
,
avatarUrl
);
.
append
(
"fissionId="
)
.
append
(
taskFissionId
)
.
append
(
"&recordId="
)
.
append
(
record
.
getId
());
BufferedImage
bufferedImage
=
QREncode
.
crateQRCode
(
contentBuilder
.
toString
(),
avatarUrl
);
if
(
bufferedImage
!=
null
)
{
if
(
bufferedImage
!=
null
)
{
try
(
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
())
{
try
(
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
())
{
ImageIO
.
write
(
bufferedImage
,
"png"
,
byteArrayOutputStream
);
ImageIO
.
write
(
bufferedImage
,
"png"
,
byteArrayOutputStream
);
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/welcome/WelcomeService.java
View file @
4934d7b
...
@@ -25,6 +25,7 @@ import com.linkwechat.wecom.domain.vo.tag.WeTagVo;
...
@@ -25,6 +25,7 @@ import com.linkwechat.wecom.domain.vo.tag.WeTagVo;
import
com.linkwechat.wecom.service.*
;
import
com.linkwechat.wecom.service.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -58,6 +59,9 @@ public class WelcomeService implements ApplicationListener<WeCustomerWelcomeQuer
...
@@ -58,6 +59,9 @@ public class WelcomeService implements ApplicationListener<WeCustomerWelcomeQuer
@Autowired
@Autowired
private
IWeMaterialService
weMaterialService
;
private
IWeMaterialService
weMaterialService
;
@Value
(
"${wecome.welcome-msg-default}"
)
private
String
welcomMsgDefault
;
@Override
@Override
@Async
@Async
public
void
onApplicationEvent
(
WeCustomerWelcomeQuery
query
)
{
public
void
onApplicationEvent
(
WeCustomerWelcomeQuery
query
)
{
...
@@ -127,7 +131,7 @@ public class WelcomeService implements ApplicationListener<WeCustomerWelcomeQuer
...
@@ -127,7 +131,7 @@ public class WelcomeService implements ApplicationListener<WeCustomerWelcomeQuer
* @return
* @return
*/
*/
private
WeResultDto
sendWelcomeMsg
(
WeCustomerWelcomeQuery
query
,
List
<
WeQrAttachments
>
qrAttachments
)
{
private
WeResultDto
sendWelcomeMsg
(
WeCustomerWelcomeQuery
query
,
List
<
WeQrAttachments
>
qrAttachments
)
{
String
welcomText
=
"默认欢迎语"
;
String
welcomText
=
welcomMsgDefault
;
WeWelcomeMsg
welcomeMsg
=
WeWelcomeMsg
.
builder
().
welcome_code
(
query
.
getWelcomeCode
()).
build
();
WeWelcomeMsg
welcomeMsg
=
WeWelcomeMsg
.
builder
().
welcome_code
(
query
.
getWelcomeCode
()).
build
();
if
(
CollectionUtil
.
isNotEmpty
(
qrAttachments
)){
if
(
CollectionUtil
.
isNotEmpty
(
qrAttachments
)){
WeQrAttachments
weQrAttachments
=
qrAttachments
.
stream
()
WeQrAttachments
weQrAttachments
=
qrAttachments
.
stream
()
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment