From 788deca1b4a24f8a24e49c24f7d89975a1d74bbe Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期日, 03 十一月 2019 23:31:25 +0800 Subject: [PATCH] 商城订单退款处理 --- fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java b/fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java index 3f0ea82..306a826 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java @@ -1,10 +1,13 @@ package com.yeshi.fanli.job; +import java.util.Date; + import javax.annotation.Resource; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import org.yeshi.utils.DateUtil; +import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.brand.BrandInfoService; import com.yeshi.fanli.util.Constant; @@ -23,7 +26,7 @@ /** * 姣忎袱涓皬鏃惰繘琛屾洿鏂板搧鐗屽晢鍝佷俊鎭� */ - @Scheduled(cron = "0 0 1/2 * * ? ") +// @Scheduled(cron = "0 0 1/2 * * ? ") public void updateGoods() { if (!Constant.IS_TASK) return; @@ -36,5 +39,20 @@ brandInfoService.addShopAndGoods((page - 1) * 100, 100); } } + + /** + * 娓呯悊鍓嶄竴澶╃殑 + */ +// @Scheduled(cron = "0 10 0 * * ? ") + public void removeAgoByDate() { + if (!Constant.IS_TASK) + return; + + try { + brandInfoService.removeAgoByDate(DateUtil.reduceDay(1, new Date())); + } catch (Exception e) { + LogHelper.errorDetailInfo(e); + } + } } -- Gitblit v1.8.0