diff --git a/src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java index c4c8d26..fea1165 100644 --- a/src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java @@ -9,6 +9,7 @@ import com.example.demo.mapper.Temporary.RedMapper; import com.example.demo.service.Temporary.RedService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +35,8 @@ import java.time.format.DateTimeFormatter; @Slf4j @Service public class RedServiceImpl implements RedService { - private static final String BASE_URLProd = "http://39.101.133.168:8828/scms"; + @Value("${red.url}") + private String BASE_URLProd ; private static final String BASE_URLDev = "http://gf977328.natappfree.cc"; private static final String PATH = "/api/coupon/IssueRechargeRedPacket"; diff --git a/src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java index ef38900..042747d 100644 --- a/src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java @@ -129,7 +129,12 @@ public class AuditServiceImpl implements AuditService { } catch (Exception e) { // log.warn("红包累加失败,主流程继续 | jwcode={}", order.getJwcode(), e); } - redService.sendJwcode(order.getJwcode()); + try { + redService.sendJwcode(order.getJwcode()); + log.info("精网号发送成功 | jwcode={}", order.getJwcode()); + }catch (Exception e){ + log.warn("精网号发送失败,主流程继续 | jwcode={}", order.getJwcode(), e); + } //erp增加充值数据 diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index db96594..b15146b 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -103,6 +103,7 @@ bean: url: http://api.homilychart.com/hljwgo/api/wallet/recharge consume: url: http://api.homilychart.com/hljwgo/api/wallet/pay - +red: + url: https://mp.legu168.com.cn/TestApi/haiwai_preview/scms server: port: 10705