package com.rongwei.savecheck.controller;


import com.rongwei.rwcommon.base.R;
import com.rongwei.rwcommon.utils.StringUtils;
import com.rongwei.sfcommon.sys.service.AspRiskSourceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("aspRiskSource")
@Slf4j
public class AspRiskSourceController {
    @Autowired
    private AspRiskSourceService aspRiskSourceService;

    /**
     * 导入初始化数据
     *
     * @return
     */
    @GetMapping("/test")
    public R test(@RequestParam Boolean haveJob,String filePath,String category) {
        try {
            aspRiskSourceService.test(haveJob,filePath,category);
            return R.ok();
        } catch (Exception e) {
            e.printStackTrace();
            log.error(StringUtils.spliceErrorMsg(e), e.fillInStackTrace());
            return R.error();
        }
    }

}
