package com.ruoyi.cms.controller.app;

import com.ruoyi.cms.domain.ESJobDocument;
import com.ruoyi.cms.domain.Job;
import com.ruoyi.cms.domain.query.ESJobSearch;
import com.ruoyi.cms.domain.vo.CompetitivenessResponse;
import com.ruoyi.cms.domain.vo.RadarChart;
import com.ruoyi.cms.service.ICompanyService;
import com.ruoyi.cms.service.IESJobSearchService;
import com.ruoyi.cms.service.IJobCollectionService;
import com.ruoyi.cms.service.IJobService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.dromara.easyes.core.biz.EsPageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Random;

/**
 * 岗位Controller
 * 
 * @author lishundong
 * @date 2024-09-03
 */
@RestController
@RequestMapping("/app/script")
@Api(tags = "移动端:脚本")
public class AppScriptController extends BaseController
{
    @Autowired
    private IJobService jobService;
    @Autowired
    private ICompanyService companyService;
    //更新经纬度
    @GetMapping("/updateLon")
    public void updateLon()
    {
        jobService.updateLon();
    }
    //导入数据
    @GetMapping("/import")
    public AjaxResult importData()
    {
        jobService.importData();
        return success();
    }
    //导入原始数据
    @GetMapping("/importRow")
    public AjaxResult importRow(@RequestParam String path)
    {
        jobService.importRow(path);
        return success();
    }
    // 导入500强
    @GetMapping("/importLabel500")
    public void importLabel()
    {
        companyService.importLabel();
    }
    // 随机导入3个公司到银行标签
    @GetMapping("/importLabelBank")
    public void importLabelBank()
    {
        companyService.importLabelBank();
    }
}
