This commit is contained in:
litianxiang
2025-10-14 18:10:59 +08:00
parent 854847a6f4
commit 3b6a9882d2
9 changed files with 37 additions and 37 deletions

View File

@@ -164,7 +164,7 @@ public class MyTaskScheduler {
// 定时任务,每十五天执行一次 // 定时任务,每十五天执行一次
// @Scheduled(cron = "0 0 0 ? * MON") // @Scheduled(cron = "0 0 0 ? * MON")
// @Scheduled(cron = "0 0 0 */15 * ?") @Scheduled(cron = "0 0 0 */15 * ?")
public void checkExpiry() { public void checkExpiry() {
// 检测正式用户是否快要过期 // 检测正式用户是否快要过期
QueryWrapper<Account> qw = new QueryWrapper<>(); QueryWrapper<Account> qw = new QueryWrapper<>();
@@ -200,7 +200,7 @@ public class MyTaskScheduler {
} }
} }
} }
// @Scheduled(cron = "0 0 9 * * ?") @Scheduled(cron = "0 0 9 * * ?")
public void sendTrialOrderExcelToManagements() { public void sendTrialOrderExcelToManagements() {
// 获取前一天日期 // 获取前一天日期
LocalDate yesterday = LocalDate.now().minusDays(1); LocalDate yesterday = LocalDate.now().minusDays(1);

View File

@@ -25,13 +25,13 @@ public class AccountTask {
* 每个月月初只刷新教育子账号的积分 * 每个月月初只刷新教育子账号的积分
*/ */
// @Scheduled(cron = "0 25 14 * * ?") // @Scheduled(cron = "0 25 14 * * ?")
// @Scheduled(cron = "0 0 0 1 * ?") @Scheduled(cron = "0 0 0 1 * ?")
public void refreshCreditsMonthly() { public void refreshCreditsMonthly() {
log.info("每月1号0点 重置教育版子账号为默认积分"); log.info("每月1号0点 重置教育版子账号为默认积分");
accountService.refreshCreditsMonthly(); accountService.refreshCreditsMonthly();
} }
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void getPaidUser() { public void getPaidUser() {
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单 // 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
accountService.extendValidityForCC(); accountService.extendValidityForCC();
@@ -51,7 +51,7 @@ public class AccountTask {
} }
// 每天检测正式用户到期情况每天凌晨0点执行 // 每天检测正式用户到期情况每天凌晨0点执行
// @Scheduled(cron = "0 0 0 * * ?") @Scheduled(cron = "0 0 0 * * ?")
public void paidUserToVisitor() { public void paidUserToVisitor() {
// 1、查询当前已过期正式用户或试用用户 // 1、查询当前已过期正式用户或试用用户
List<Account> accountList = accountService.getExpiredUserBySystemUser(1); List<Account> accountList = accountService.getExpiredUserBySystemUser(1);
@@ -74,7 +74,7 @@ public class AccountTask {
accountService.registerUserToVisitor(); accountService.registerUserToVisitor();
} }
// @Scheduled(cron = "0 0 0 1 * ?") @Scheduled(cron = "0 0 0 1 * ?")
// 每月初刷新所有用户用户名剩余修改次数 // 每月初刷新所有用户用户名剩余修改次数
public void resetUsernameModifyTimes(){ public void resetUsernameModifyTimes(){
log.info("重置所有用户的用户名修改次数"); log.info("重置所有用户的用户名修改次数");
@@ -82,7 +82,7 @@ public class AccountTask {
} }
// @Scheduled(cron = "0 35 14 * * ?") // @Scheduled(cron = "0 35 14 * * ?")
// @Scheduled(cron = "0 5 0 * * ?") @Scheduled(cron = "0 5 0 * * ?")
public void checkEduAdminExpireStatus() { public void checkEduAdminExpireStatus() {
accountService.checkEduAdminExpireStatus(); accountService.checkEduAdminExpireStatus();
} }

View File

@@ -47,7 +47,7 @@ public class GenerateTask {
* 故这里通过定时任务做补偿 * 故这里通过定时任务做补偿
* flux五分钟查询一次万相1小时查询一次 * flux五分钟查询一次万相1小时查询一次
*/ */
// @Scheduled(cron = "0 */4 * * * ?") @Scheduled(cron = "0 */4 * * * ?")
public void fluxCompensationMechanism(){ public void fluxCompensationMechanism(){
// 1、查所有 任务还没成功、还没失败正在等待或者执行中的任务id有哪些 // 1、查所有 任务还没成功、还没失败正在等待或者执行中的任务id有哪些
// 由于获取结果的polling_url在redis中只存一天大部分结果超过一天之后就无法再找到任务小部分可以通过公共路径查到结果 // 由于获取结果的polling_url在redis中只存一天大部分结果超过一天之后就无法再找到任务小部分可以通过公共路径查到结果
@@ -107,7 +107,7 @@ public class GenerateTask {
} }
// 万相 -> pose transformation 补偿 一小时执行一次 // 万相 -> pose transformation 补偿 一小时执行一次
// @Scheduled(fixedDelay = 5 * 60 * 1000) @Scheduled(fixedDelay = 5 * 60 * 1000)
public void wxCompensationMechanism(){ public void wxCompensationMechanism(){
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx"); List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
if (apiGenerates != null && !apiGenerates.isEmpty()){ if (apiGenerates != null && !apiGenerates.isEmpty()){

View File

@@ -45,7 +45,7 @@ public class PaymentTask {
@Resource @Resource
private PayPalCheckoutService payPalCheckoutService; private PayPalCheckoutService payPalCheckoutService;
// @Scheduled(cron = "0/30 * * * * ?") @Scheduled(cron = "0/30 * * * * ?")
public void orderConfirmForPaypal() throws SerializeException { public void orderConfirmForPaypal() throws SerializeException {
// log.info("PayPal orderConfirm 被执行......"); // log.info("PayPal orderConfirm 被执行......");
@@ -97,14 +97,14 @@ public class PaymentTask {
// //
} }
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void updateAffiliateInfoWithPayment(){ public void updateAffiliateInfoWithPayment(){
// log.info("佣金计算定时器"); // log.info("佣金计算定时器");
affiliateService.updateAffiliateInfoWithPayment(); affiliateService.updateAffiliateInfoWithPayment();
} }
// 定时同步(每分钟一次) // 定时同步(每分钟一次)
// @Scheduled(fixedRate = 60000) @Scheduled(fixedRate = 60000)
public void syncLinkViewCountToDB(){ public void syncLinkViewCountToDB(){
affiliateService.syncLinkViewCountToDB(); affiliateService.syncLinkViewCountToDB();
} }
@@ -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(){ public void calcCouponsCommission(){
log.info("优惠券佣金计算定时器"); log.info("优惠券佣金计算定时器");
affiliateService.calcCouponsCommission(); affiliateService.calcCouponsCommission();

View File

@@ -766,7 +766,7 @@ public class SendEmailUtil {
try { try {
String merchantEmail = "kimwong@code-create.com.hk"; String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com"; String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail,*/ developer}; String[] receiverEmail = {merchantEmail, developer};
Credential cred = new Credential(SECRET_ID, SECRET_KEy); Credential cred = new Credential(SECRET_ID, SECRET_KEy);
// 实例化一个http选项可选的没有特殊需求可以跳过 // 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile(); HttpProfile httpProfile = new HttpProfile();
@@ -937,7 +937,7 @@ public class SendEmailUtil {
req.setFromEmailAddress(SEND_ADDRESS); req.setFromEmailAddress(SEND_ADDRESS);
String merchantEmail = "kimwong@code-create.com.hk"; String merchantEmail = "kimwong@code-create.com.hk";
String developerEmail = "xupei@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(); Template template = new Template();
req.setSubject("New Credit Purchase Order"); req.setSubject("New Credit Purchase Order");
template.setTemplateID(CREDITS_PURCHASE_MERCHANT); template.setTemplateID(CREDITS_PURCHASE_MERCHANT);

View File

@@ -82,7 +82,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
// 邮件通知审批者 // 邮件通知审批者
String merchantEmail = "kimwong@code-create.com.hk"; String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com"; String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail*,*/ developer}; String[] receiverEmail = {merchantEmail, developer};
SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new"); SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new"); // emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
}else { }else {
@@ -389,7 +389,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
String merchantEmail = "kimwong@code-create.com.hk"; String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com"; String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail, */developer}; String[] receiverEmail = {merchantEmail, developer};
// 邮件通知 // 邮件通知
SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary"); SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary");
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), affiliateEmailParamsDTO, "summary"); // emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), affiliateEmailParamsDTO, "summary");

View File

@@ -586,7 +586,7 @@ public class EmailServiceImpl implements EmailService {
try { try {
String merchantEmail = "kimwong@code-create.com.hk"; String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com"; String developer = "xupei3360@163.com";
List<String> merchantReceiver = Arrays.asList(/*merchantEmail, */developer); List<String> merchantReceiver = Arrays.asList(merchantEmail, developer);
String merchantSubject = null; String merchantSubject = null;
String merchantTemplate = null; String merchantTemplate = null;
@@ -706,7 +706,7 @@ public class EmailServiceImpl implements EmailService {
jsonObject.put("quantity", quantity); jsonObject.put("quantity", quantity);
jsonObject.put("totalFee", amount); 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"; private final static String COMMON_EXCEPTION_REMINDER = "135279_common-exception-reminder.html";

View File

@@ -2,7 +2,7 @@
#spring.profiles.active=test #spring.profiles.active=test
#<23><><EFBFBD><EFBFBD>application-prod<6F>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) #<23><><EFBFBD><EFBFBD>application-prod<6F>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
#spring.profiles.active=prod spring.profiles.active=prod
#<23><><EFBFBD><EFBFBD>application-dev<65>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) #<23><><EFBFBD><EFBFBD>application-dev<65>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
spring.profiles.active=dev #spring.profiles.active=dev

View File

@@ -27,9 +27,9 @@ paypal.webhook_id=1D107312EX592781K
##### Stripe ##### Stripe
# developer # developer
stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2 #stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2
# dev 端点 # dev 端点
stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w #stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
# local 端点 # local 端点
#stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm #stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm
@@ -43,8 +43,8 @@ stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
#stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL #stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL
# kim - live # kim - live
#stripe.private-key=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 stripe.private-key=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
# prod 端点 # prod 端点
#stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11 stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11
# dev 端点 # dev 端点
#stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr #stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr