push to prod 开启定时任务
This commit is contained in:
@@ -15,7 +15,7 @@ public class AccountTask {
|
|||||||
private AccountService accountService;
|
private AccountService accountService;
|
||||||
|
|
||||||
/** 每周日晚上刷新 年付用户、月付用户的积分 */
|
/** 每周日晚上刷新 年付用户、月付用户的积分 */
|
||||||
// @Scheduled(cron = "59 59 23 ? * SUN")
|
@Scheduled(cron = "59 59 23 ? * SUN")
|
||||||
// @Scheduled(cron = "59 59 23 * * ?")
|
// @Scheduled(cron = "59 59 23 * * ?")
|
||||||
public void refreshCreditsMonthly(){
|
public void refreshCreditsMonthly(){
|
||||||
log.info("每周日晚11:59:59刷新付费用户积分为 6000");
|
log.info("每周日晚11:59:59刷新付费用户积分为 6000");
|
||||||
@@ -23,7 +23,7 @@ public class AccountTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo 多久执行一次?
|
// todo 多久执行一次?
|
||||||
// @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();
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ public class PaypalTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private PayPalCheckoutService payPalCheckoutService;
|
private PayPalCheckoutService payPalCheckoutService;
|
||||||
|
|
||||||
// @Scheduled(cron = "0/30 * * * * ?")
|
@Scheduled(cron = "0/30 * * * * ?")
|
||||||
public void orderConfirm() throws SerializeException {
|
public void orderConfirm() throws SerializeException {
|
||||||
|
|
||||||
// log.info("PayPal orderConfirm 被执行......");
|
// log.info("PayPal orderConfirm 被执行......");
|
||||||
|
|
||||||
List<OrderInfo> orderInfoList = orderInfoService.getNoPayOrderByDuration(5, PayTypeEnum.PAYPAL.getType());
|
List<OrderInfo> orderInfoList = orderInfoService.getNoPayOrderByDuration(30, PayTypeEnum.PAYPAL.getType());
|
||||||
|
|
||||||
for (OrderInfo orderInfo : orderInfoList) {
|
for (OrderInfo orderInfo : orderInfoList) {
|
||||||
String orderNo = orderInfo.getOrderNo();
|
String orderNo = orderInfo.getOrderNo();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class StripeTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private StripeService stripeService;
|
private StripeService stripeService;
|
||||||
|
|
||||||
// @Scheduled(cron = "0/30 * * * * ?")
|
@Scheduled(cron = "0/30 * * * * ?")
|
||||||
public void orderConfirm() throws SerializeException {
|
public void orderConfirm() throws SerializeException {
|
||||||
|
|
||||||
// 查看超过30分钟以上仍未支付的订单 置为超时订单
|
// 查看超过30分钟以上仍未支付的订单 置为超时订单
|
||||||
|
|||||||
Reference in New Issue
Block a user