package com.tofly.handler;

import com.tofly.stocks.service.DeviceDepreciateService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DeviceDepreciateHandler {
    @Autowired
    DeviceDepreciateService deviceDepreciateService;

    @XxlJob("xxlJobCurrentPrice")
    public ReturnT<String> xxlJobCurrentPrice(String param) {
        // 设备折旧自动计算当前价值，每月1号自动计算1次
        deviceDepreciateService.xxlJobCurrentPrice();
        return ReturnT.SUCCESS;
    }
}
