package com.zcxk.xxljob.controller;

import com.zcxk.xxljob.jobs.MeterReadJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author linqingwei
 * @date 2021-08-20 11:11
 */
@Slf4j
@RequestMapping("test")
@RestController
public class TestController {

    @Autowired
    private MeterReadJob meterReadJob;

    @PostMapping("readMeterTest")
    public String readMeterTest(){
        meterReadJob.meterReadJobHandler(null);
        return "ok";
    }

    @PostMapping("syncMeterReadJobHandler")
    public String syncMeterReadJobHandler(){
        meterReadJob.syncMeterReadJobHandler(null);
        return "ok";
    }
}
