package com.kxs.product.biz.task;

import com.kxs.common.security.annotation.Inner;
import com.kxs.product.biz.service.KxsMachineService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 产品模块定时任务
 *
 * @author 没秃顶的码农
 * @date 2024-03-13
 */
@RequiredArgsConstructor
@Slf4j
@RestController
@RequestMapping("product-job")
public class KxsProductTask {

    private final KxsMachineService kxsMachineService;

    /**
     * 循环过期机具添加预扣款
     * 一个小时执行一次
     * 异步执行
     */
    @Inner
    @GetMapping("/recycleMachineSchedule")
    public void recycleMachineSchedule(@RequestParam("param") String para)  {

        kxsMachineService.recycleMachineSchedule(para);

    }
}
