package com.ztmap.project.zhny;

import com.ztmap.framework.web.controller.BaseController;
import com.ztmap.framework.web.domain.AjaxResult;
import com.ztmap.project.zhny.strategy.domain.TStrategy;
import com.ztmap.project.zhny.strategy.service.ITStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RequestMapping("/api/ApiController")
@RestController
public class ApiController extends BaseController {

    @Autowired
    private ITStrategyService strategyService;

    /**
     * 获取策略列表
     * @param params
     * @return
     */
    @GetMapping("/getStrategyList")
    public AjaxResult getStrategyList(@RequestParam Map<String,Object> params){
        List<TStrategy> strategyList = strategyService.getStrategyList(params);
        return AjaxResult.success().put("data",strategyList);
    }
}
