From bbc8b025a9319daf129c5e601c733eb85185126f Mon Sep 17 00:00:00 2001 From: xupei Date: Thu, 20 Nov 2025 16:57:48 +0800 Subject: [PATCH 1/4] CONFIG:to Prod --- .../java/com/ai/da/common/config/MyTaskScheduler.java | 3 ++- src/main/java/com/ai/da/common/task/AccountTask.java | 4 ++-- src/main/java/com/ai/da/common/task/PaymentTask.java | 6 +++--- src/main/java/com/ai/da/common/utils/SendEmailUtil.java | 4 ++-- .../java/com/ai/da/service/impl/AffiliateServiceImpl.java | 4 ++-- .../java/com/ai/da/service/impl/EmailServiceImpl.java | 4 ++-- src/main/resources/application.properties | 4 ++-- src/main/resources/payment.properties | 8 ++++---- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/ai/da/common/config/MyTaskScheduler.java b/src/main/java/com/ai/da/common/config/MyTaskScheduler.java index cb0cdc75..3e6eca27 100644 --- a/src/main/java/com/ai/da/common/config/MyTaskScheduler.java +++ b/src/main/java/com/ai/da/common/config/MyTaskScheduler.java @@ -200,7 +200,8 @@ public class MyTaskScheduler { } } } -// @Scheduled(cron = "0 0 9 * * ?") + + @Scheduled(cron = "0 0 9 * * ?") public void sendTrialOrderExcelToManagements() { // 获取前一天日期 LocalDate yesterday = LocalDate.now().minusDays(1); diff --git a/src/main/java/com/ai/da/common/task/AccountTask.java b/src/main/java/com/ai/da/common/task/AccountTask.java index 5a480661..6baba322 100644 --- a/src/main/java/com/ai/da/common/task/AccountTask.java +++ b/src/main/java/com/ai/da/common/task/AccountTask.java @@ -31,14 +31,14 @@ public class AccountTask { accountService.refreshCreditsMonthly(); } -// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes + @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes public void getPaidUser() { // 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单 accountService.extendValidityForCC(); } // 每天凌晨0点执行一次 -// @Scheduled(cron = "0 0 0 * * ?") + @Scheduled(cron = "0 0 0 * * ?") public void cancelActivityBenefits() { // 1、查询当前所有参与了活动且过期的用户 List accountList = accountService.getExpiredUserBySystemUser(4); diff --git a/src/main/java/com/ai/da/common/task/PaymentTask.java b/src/main/java/com/ai/da/common/task/PaymentTask.java index 4999af54..82d92f0d 100644 --- a/src/main/java/com/ai/da/common/task/PaymentTask.java +++ b/src/main/java/com/ai/da/common/task/PaymentTask.java @@ -104,12 +104,12 @@ public class PaymentTask { } // 定时同步(每分钟一次) -// @Scheduled(fixedRate = 60000) + @Scheduled(fixedRate = 60000) public void syncLinkViewCountToDB(){ affiliateService.syncLinkViewCountToDB(); } - // @Scheduled(cron = "0 0 8 28-31 * ?") + @Scheduled(cron = "0 0 8 28-31 * ?") public void commissionSummaryReminder(){ // 每个月末的最后一天的早上八点执行 LocalDate today = LocalDate.now(); @@ -120,7 +120,7 @@ public class PaymentTask { } } -// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes + @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes public void calcCouponsCommission(){ log.info("优惠券佣金计算定时器"); affiliateService.calcCouponsCommission(); diff --git a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java index fd49e25c..96798683 100644 --- a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java +++ b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java @@ -766,7 +766,7 @@ public class SendEmailUtil { try { String merchantEmail = "kimwong@code-create.com.hk"; String developer = "xupei3360@163.com"; - String[] receiverEmail = {/*merchantEmail,*/ developer}; + String[] receiverEmail = {merchantEmail, developer}; Credential cred = new Credential(SECRET_ID, SECRET_KEy); // 实例化一个http选项,可选的,没有特殊需求可以跳过 HttpProfile httpProfile = new HttpProfile(); @@ -953,7 +953,7 @@ public class SendEmailUtil { req.setFromEmailAddress(SEND_ADDRESS); String merchantEmail = "kimwong@code-create.com.hk"; String developerEmail = "xupei@code-create.com.hk"; - req.setDestination(new String[]{/*merchantEmail,*/ developerEmail}); + req.setDestination(new String[]{merchantEmail, developerEmail}); Template template = new Template(); req.setSubject("New Credit Purchase Order"); template.setTemplateID(CREDITS_PURCHASE_MERCHANT); diff --git a/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java b/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java index f54a488f..51fe8a28 100644 --- a/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java @@ -82,7 +82,7 @@ public class AffiliateServiceImpl extends ServiceImpl merchantReceiver = Arrays.asList(/*merchantEmail,*/ developer); + List merchantReceiver = Arrays.asList(merchantEmail, developer); String merchantSubject = null; String merchantTemplate = null; @@ -730,7 +730,7 @@ public class EmailServiceImpl implements EmailService { jsonObject.put("quantity", quantity); jsonObject.put("totalFee", amount); - sendEmail(Arrays.asList(/*merchantEmail,*/developerEmail), jsonObject, CREDITS_PURCHASE_MERCHANT, "New Credit Purchase Order", null, null); + sendEmail(Arrays.asList(merchantEmail,developerEmail), jsonObject, CREDITS_PURCHASE_MERCHANT, "New Credit Purchase Order", null, null); } private final static String COMMON_EXCEPTION_REMINDER = "135279_common-exception-reminder.html"; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 974fee23..8550475d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,7 +2,7 @@ #spring.profiles.active=test #����application-prod�ļ�(��������) -#spring.profiles.active=prod +spring.profiles.active=prod #����application-dev�ļ�(��������) -spring.profiles.active=dev +#spring.profiles.active=dev diff --git a/src/main/resources/payment.properties b/src/main/resources/payment.properties index 0f2800d6..f4b98130 100644 --- a/src/main/resources/payment.properties +++ b/src/main/resources/payment.properties @@ -27,9 +27,9 @@ paypal.webhook_id=1D107312EX592781K ##### Stripe # developer -stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2 +#stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2 # dev 端点 -stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w +#stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w # local 端点 #stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm @@ -43,8 +43,8 @@ stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w #stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL # kim - live -#stripe.private-key=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 +stripe.private-key=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 # prod 端点 -#stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11 +stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11 # dev 端点 #stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr From c4da4ea111e2252e8852433b08d3888753347de6 Mon Sep 17 00:00:00 2001 From: xupei Date: Fri, 21 Nov 2025 17:09:53 +0800 Subject: [PATCH 2/4] CONFIG:to Prod --- src/main/java/com/ai/da/common/task/GenerateTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ai/da/common/task/GenerateTask.java b/src/main/java/com/ai/da/common/task/GenerateTask.java index 604b8b2c..7617032b 100644 --- a/src/main/java/com/ai/da/common/task/GenerateTask.java +++ b/src/main/java/com/ai/da/common/task/GenerateTask.java @@ -101,9 +101,9 @@ public class GenerateTask { // 万相 -> pose transformation 补偿 当前任务执行完后,5分钟再执行一次(不会出现任务重叠的情况) @Scheduled(fixedDelay = 5 * 60 * 1000) public void wxCompensationMechanism(){ - log.info("=====万相补偿获取结果开始====="); List apiGenerates = apiGenerateService.getPendingTaskByStatus("wx"); if (apiGenerates != null && !apiGenerates.isEmpty()){ + log.info("=====万相补偿获取结果开始====="); for (APIGenerate apiGenerate : apiGenerates){ String taskId = apiGenerate.getTaskId(); PoseTransformation poseTransformation = poseTransformationMapper.selectOne(new QueryWrapper().eq("unique_id", taskId)); From 97c5be7b22a995fb159d03fb4a9bbe850cc2440b Mon Sep 17 00:00:00 2001 From: xupei Date: Sat, 22 Nov 2025 00:15:13 +0800 Subject: [PATCH 3/4] =?UTF-8?q?CONFIG:=E4=BF=AE=E6=94=B9=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=9A=84=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-prod.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index cea732ba..ef5174de 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -7,7 +7,7 @@ spring.datasource.primary.username=root spring.datasource.primary.password=QWa998345 spring.datasource.secondary.driver-class-name=com.mysql.cj.jdbc.Driver -spring.datasource.secondary.jdbcUrl=jdbc:mysql://18.167.251.121:33008/attribute_retrieval_new_style?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true +spring.datasource.secondary.jdbcUrl=jdbc:mysql://18.167.251.121:33008/attribute_retrieval_style?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true spring.datasource.secondary.username=aida_con spring.datasource.secondary.password=123456 From 059d6edc1276194de70018de9b7355f60ce5c4a3 Mon Sep 17 00:00:00 2001 From: xupei Date: Sat, 22 Nov 2025 00:41:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?BUGFIX:=20=E6=9F=A5=E8=AF=A2affiliate?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=B7=B2=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E8=AE=B0=E5=BD=95=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?affiliate=E6=97=B6=EF=BC=8C=E7=8A=B6=E6=80=81=E4=B9=9F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/service/impl/AffiliateServiceImpl.java | 9 +++++---- src/main/resources/mapper/primary/AffiliateMapper.xml | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java b/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java index 51fe8a28..49ac6658 100644 --- a/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/AffiliateServiceImpl.java @@ -212,10 +212,7 @@ public class AffiliateServiceImpl extends ServiceImpl 激活 | Inactive -> 关闭 | Delete -> 删除 if (!StringUtil.isNullOrEmpty(operationType)) { - if (operationType.equals("Delete")) { - baseMapper.deleteById(id); - return; - } else if (operationType.equals("Active") || operationType.equals("Inactive")) { + if (operationType.equals("Delete") || operationType.equals("Active") || operationType.equals("Inactive")) { affiliate.setStatus(operationType); } else { throw new BusinessException("unknown.operationType"); @@ -223,6 +220,10 @@ public class AffiliateServiceImpl extends ServiceImpl AND f.id = #{affiliateId} + AND f.is_deleted = 0 @@ -83,6 +84,7 @@ AND f.id = #{affiliateId} + AND f.is_deleted = 0