package org.jeecg.modules.ctop.controller;

import org.jeecg.modules.ctop.service.ICrawlerService;
import org.jeecg.modules.ctop.vo.KuaishouAppiumJobVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("appium/crawler")
public class CrawlerController {
    @Autowired
    private ICrawlerService crawlerService;

    @PostMapping("startJob")
    public Map<String, Object> runTask(@RequestBody KuaishouAppiumJobVO jobVO) {
        return crawlerService.startJob(jobVO);
    }
}
