package com.yeshi.fanli.job.order.elme;
|
|
import java.util.List;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
import com.yeshi.fanli.service.inter.elme.ElmeOrderProcessService;
|
import com.yeshi.fanli.service.inter.order.OrderProcessService;
|
import com.yeshi.fanli.util.Constant;
|
|
//旧版饿了么到账
|
@Component
|
public class UpdateElmeOrderJob {
|
|
@Resource
|
private ElmeOrderProcessService elmeOrderProcessService;
|
|
@Resource
|
private OrderProcessService orderProcessService;
|
|
// 每天凌晨过2分到账
|
@Scheduled(cron = "0 2 0 * * ? ")
|
public void fanli() {
|
if (!Constant.IS_TASK)
|
return;
|
List<HongBaoV2> hongBaoList = orderProcessService.getCanBalanceElmeFanliHongBao();
|
for (HongBaoV2 v2 : hongBaoList)
|
orderProcessService.elmeFanli(v2.getId());
|
}
|
|
}
|