Merge remote-tracking branch 'origin/master'

This commit is contained in:
张松
2025-03-17 13:54:56 +08:00
16 changed files with 408 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ import com.czg.service.account.util.AliOssUtil;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Service;
@@ -50,6 +51,8 @@ public class ShopMsgStateServiceImpl extends ServiceImpl<ShopMsgStateMapper, Sho
private AliOssUtil aliOssUtil;
@Resource
private ShopPushOpenIdMapper shopPushOpenIdMapper;
@Value("${spring.profiles.active}")
private String active;
@Override
@@ -98,7 +101,7 @@ public class ShopMsgStateServiceImpl extends ServiceImpl<ShopMsgStateMapper, Sho
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
org.springframework.core.io.Resource resource = resourceLoader.getResource("classpath:/static/logo.jpg");
InputStream inputStream = resource.getInputStream();
String url = StrUtil.format("https://invoice.sxczgkj.cn/index/wechat/weuserk?shopId={}", shopId);
String url = StrUtil.format("https://invoice.sxczgkj.cn/index/wechat/weuserk?source=ysk&active={}&shopId={}", active, shopId);
QrCodeUtil.generate(url, new QrConfig(500, 500).
setImg(ImageIO.read(inputStream)).setErrorCorrection(ErrorCorrectionLevel.H).setRatio(4), "png", outputStream);