Commit 4934d7b1 by danmo

bug修改

1 parent d5e1ba7f
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=
...@@ -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);
......
...@@ -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()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!