package com.ycl.scheme.service;
|
|
|
import com.ycl.scheme.KeywordExample;
|
import com.ycl.scheme.Parameter;
|
import com.ycl.scheme.SchemeRunnerBuilder;
|
import com.ycl.scheme.entity.Keyword;
|
import com.ycl.scheme.entity.Scheme;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.datasource.DataSourceUtils;
|
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.stereotype.Service;
|
|
import java.sql.Connection;
|
import java.util.List;
|
import java.util.Map;
|
|
@Service
|
public class SchemeService {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Autowired
|
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
|
this.jdbcTemplate = jdbcTemplate;
|
}
|
|
public void buildScheme(Scheme scheme){
|
SchemeRunnerBuilder builder = new SchemeRunnerBuilder(this);
|
builder.build(scheme);
|
|
|
System.out.println(scheme.getOutCode());
|
}
|
|
public Object execQuery(String sql, Map<String,Object> pars){
|
return 5;
|
}
|
|
/**
|
* 执行action
|
* @param schemeId
|
*/
|
public void doAction(Integer schemeId){
|
|
|
System.out.println("执行doAction" + schemeId);
|
}
|
|
|
public List<Keyword> findKeywordTemplates(){
|
return KeywordExample.getKeywords();
|
}
|
|
}
|