mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-15 12:57:25 +08:00
update
This commit is contained in:
@@ -22,6 +22,7 @@ import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.domain.ykcCommond.PublishPileBillingTemplateCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.MemberCouponService;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import com.jsowell.thirdparty.amap.service.AMapService;
|
||||
@@ -83,6 +84,9 @@ public class JsowellTask {
|
||||
@Autowired
|
||||
private AdapayUnsplitRecordService adapayUnsplitRecordService;
|
||||
|
||||
@Autowired
|
||||
private MemberCouponService memberCouponService;
|
||||
|
||||
/**
|
||||
* 设置挡板, PRE环境不执行
|
||||
*/
|
||||
@@ -495,6 +499,21 @@ public class JsowellTask {
|
||||
orderBasicInfoService.updateOrderReviewFlagTemp(start, end, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量归档过期优惠券(status=0 且 expire_time <= now 的记录更新为 status=2)
|
||||
* jsowellTask.expireCoupons()
|
||||
* Cron: 0 5 0 * * ?(每日 00:05 执行)
|
||||
*/
|
||||
public void expireCoupons() {
|
||||
log.info("[expireCoupons] 开始归档过期优惠券...");
|
||||
try {
|
||||
int count = memberCouponService.batchExpire();
|
||||
log.info("[expireCoupons] 归档完成,共归档 {} 张过期券", count);
|
||||
} catch (Exception e) {
|
||||
log.error("[expireCoupons] 归档过期券异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// private void processUnSettledOrderOld() {
|
||||
// String startTime = "2023-01-01 00:00:00";
|
||||
|
||||
Reference in New Issue
Block a user