package com.srs.web.controller.comprehensive;

import com.srs.common.core.domain.AjaxResult;
import com.srs.comprehensive.service.ICphTestForService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import static com.srs.common.core.domain.AjaxResult.success;

/**
 *调用存储过程text_for
 */

//@Component//配置类
@RestController
@RequestMapping("/test/for")
public class CphTestForController {
    @Autowired
    private ICphTestForService cphTestForService;

    //@Scheduled(cron = "0 0 0 * * ?") // 每天0点执行
    @GetMapping(value ="/get/{id}")
    public AjaxResult getbers(@PathVariable("id")int id) {
        cphTestForService.testMethod(id);
        return success();
    }
}
