package com.sysu.admin.site;


import com.sysu.admin.controller.crop.range.LandRangeIndexService;
import com.xiesx.fastboot.base.result.BaseResult;
import com.xiesx.fastboot.base.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/site/range_index")
@Controller
public class SiteLandRangeIndexController {

    @Autowired
    LandRangeIndexService mLandRangeIndexService;

    @RequestMapping("/getTableNames")
    @ResponseBody
    public BaseResult getTableNames(@RequestBody CommonVo commonVo){
        String[] tableNames = mLandRangeIndexService.getTableNames(commonVo.getX1(),
                commonVo.getY1(),
                commonVo.getX2(),
                commonVo.getY2());
        return R.succ(tableNames);
    }
}
