package com.kiisoo.ic.job.count;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/job")
@Slf4j
public class SyncCountJobController {
    @Autowired
    private CustomerCountJob customerDataJob;

    @GetMapping("/sync/count")
    public void getCustomerInfo(@RequestParam("isAll")Boolean isAll){
        try {
            customerDataJob.handle(isAll,null);
        }catch (Exception e){
            log.error("",e);
        }
    }
}
