package com.sysu.admin.controller.crop.range;


import com.alibaba.fastjson.annotation.JSONField;
import com.sysu.admin.controller.crop.CropLand;
import com.sysu.admin.utils.shape.GeoCastUtil;
import com.xiesx.fastboot.base.result.BaseResult;
import com.xiesx.fastboot.base.result.R;
import lombok.Data;
import org.locationtech.jts.geom.MultiPolygon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@RequestMapping("/range_index")
@Controller
public class LandRangeIndexController {

    @Autowired
    LandRangeIndexService mLandRangeIndexService;

    @RequestMapping("/getTableNames")
    @ResponseBody
    public BaseResult getTableNames(Double x1, Double y1,Double x2, Double y2){
        String[] tableNames = mLandRangeIndexService.getTableNames(x1,y1,x2,y2);
        return R.succ(tableNames);
    }
}
