Merge branch 'release/3.1' into dev/3.1_release_merge
# Conflicts: # src/main/java/com/ai/da/common/utils/SendRequestUtil.java
This commit is contained in:
@@ -202,7 +202,7 @@ public class MyTaskScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
// @Scheduled(cron = "0 0 9 * * ?")
|
||||
@Scheduled(cron = "0 0 9 * * ?")
|
||||
public void sendTrialOrderExcelToManagements() {
|
||||
// 获取前一天日期
|
||||
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class PaymentTask {
|
||||
@Resource
|
||||
private PayPalCheckoutService payPalCheckoutService;
|
||||
|
||||
// @Scheduled(cron = "0/30 * * * * ?")
|
||||
@Scheduled(cron = "0/30 * * * * ?")
|
||||
public void orderConfirmForPaypal() throws SerializeException {
|
||||
|
||||
// log.info("PayPal orderConfirm 被执行......");
|
||||
|
||||
@@ -114,8 +114,8 @@ public class SendRequestUtil {
|
||||
|
||||
public String sendFluxPost(String url, String requestBodyStr) {
|
||||
// 尝试两个API key
|
||||
String[] apiKeys = {"d447a0ac-2291-4f1c-9a36-f7614c385989",
|
||||
"84e8f5d5-b0b3-49aa-b244-ab7ba27e7ae7"};
|
||||
String[] apiKeys = {"84e8f5d5-b0b3-49aa-b244-ab7ba27e7ae7",
|
||||
"d447a0ac-2291-4f1c-9a36-f7614c385989"};
|
||||
boolean[] notified = {false, false}; // 记录是否已发送过不足提醒
|
||||
|
||||
for (int i = 0; i < apiKeys.length; i++) {
|
||||
@@ -140,22 +140,9 @@ public class SendRequestUtil {
|
||||
if (status == 402 || status == 403) {
|
||||
if (!notified[i]) {
|
||||
SendEmailUtil.commonExceptionReminder(
|
||||
"Flux账户积分不足,flux生成任务失败",
|
||||
new String[]{"xupei3360@163.com"}
|
||||
"Flux账户积分不足,flux生成任务失败。(key:)" + apiKeys[i],
|
||||
new String[]{"xupei3360@163.com", "fangjianliao@aidlab.hk", "investigation@aidlab.hk"}
|
||||
);
|
||||
log.info("发送给xupei3360@163.com");
|
||||
|
||||
SendEmailUtil.commonExceptionReminder(
|
||||
"Flux账户积分不足,flux生成任务失败",
|
||||
new String[]{"fangjianliao@aidlab.hk"}
|
||||
);
|
||||
log.info("发送给fangjianliao@aidlab.hk");
|
||||
|
||||
SendEmailUtil.commonExceptionReminder(
|
||||
"Flux账户积分不足,flux生成任务失败",
|
||||
new String[]{"investigation@aidlab.hk"}
|
||||
);
|
||||
log.info("发送给investigation@aidlab.hk");
|
||||
notified[i] = true;
|
||||
}
|
||||
continue; // 尝试下一个key
|
||||
|
||||
Reference in New Issue
Block a user