v1.1 充值-订单校验改回用amount
This commit is contained in:
@@ -2,18 +2,11 @@ package com.accompany.payment.google.config;
|
||||
|
||||
import com.accompany.core.base.SpringContextHolder;
|
||||
import com.accompany.payment.google.AndroidPublisherHelper;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.api.exception.NacosException;
|
||||
import com.google.api.services.androidpublisher.AndroidPublisher;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.annotation.Order;
|
||||
@@ -21,7 +14,6 @@ import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.Arrays;
|
||||
@@ -33,7 +25,7 @@ import java.util.List;
|
||||
@ConfigurationProperties(prefix = "google-play")
|
||||
@RefreshScope
|
||||
@Data
|
||||
public class GooglePlayConfig {
|
||||
public class GooglePlayConfig implements InitializingBean {
|
||||
|
||||
private String applicationName;
|
||||
|
||||
@@ -42,11 +34,6 @@ public class GooglePlayConfig {
|
||||
private static final String CONFIG_NAME_APPLICATIONNAME = "google-play.applicationName";
|
||||
private static final String CONFIG_NAME_JSON = "google-play.credentialJson";
|
||||
|
||||
@PostConstruct
|
||||
@Async
|
||||
public void initAndroidPublisherHelper() throws GeneralSecurityException, IOException {
|
||||
AndroidPublisherHelper.init(applicationName, credentialJson);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置修改监听器,用于当配置修改后,重新生成AndroidPublisher bean
|
||||
@@ -72,4 +59,9 @@ public class GooglePlayConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AndroidPublisherHelper.init(applicationName, credentialJson);
|
||||
}
|
||||
}
|
||||
|
@@ -390,7 +390,7 @@ public class ChargeService extends BaseService {
|
||||
private int handleAppPayGoldBuss(ChargeRecord chargeRecord) {
|
||||
log.info("handleAppPayGoldBuss: {}", JSON.toJSONString(chargeRecord));
|
||||
|
||||
Long amountLong = chargeRecord.getLocalAmount();
|
||||
Long amountLong = chargeRecord.getAmount();
|
||||
String chargeRecordProdId = chargeRecord.getChargeProdId();
|
||||
ChargeProd chargeProd = chargeProdService.getChargeProdById(chargeRecordProdId);
|
||||
Long money;
|
||||
|
Reference in New Issue
Block a user