fix(deploy): identify development wallet runtime

This commit is contained in:
2026-09-05 09:01:43 +08:00
parent 3df6fb511f
commit 37183ac2f0
3 changed files with 7 additions and 5 deletions
@@ -56,14 +56,15 @@ public class FinanceWalletService {
@Value("${baiyue.security.internal-service-token:}") String internalToken,
@Value("${baiyue.finance.recharge.wechat-qr-code-url:}") String wechatQrCodeUrl,
@Value("${baiyue.finance.recharge.alipay-qr-code-url:}") String alipayQrCodeUrl,
@Value("${spring.profiles.active:}") String activeProfiles) {
@Value("${spring.profiles.active:}") String activeProfiles,
@Value("${DEPLOY_ENV:}") String deployEnvironment) {
this.jdbc = jdbc;
this.objectMapper = objectMapper;
this.fileClient = fileClient;
this.numberGenerator = numberGenerator;
this.internalToken = internalToken;
boolean development = List.of(activeProfiles.split(",")).stream()
.map(String::trim).anyMatch("dev"::equalsIgnoreCase);
boolean development = "development".equalsIgnoreCase(deployEnvironment.trim())
|| List.of(activeProfiles.split(",")).stream().map(String::trim).anyMatch("dev"::equalsIgnoreCase);
this.wechatQrCodeUrl = rechargeQrCode(wechatQrCodeUrl, development);
this.alipayQrCodeUrl = rechargeQrCode(alipayQrCodeUrl, development);
}