package com.ruoyi.ibs.customerselect.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ibs.customerselect.service.MyCustomerGridSelectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;

/**
 * @Author 吴凯程
 * @Date 2025/5/8
 **/
@Api(tags = "我的客户-网格筛选")
@RestController
@RequestMapping("/my/customer/grid/select")
public class MyCustomerGridSelectController extends BaseController {
    @Resource
    private MyCustomerGridSelectService myCustomerGridSelectService;

    @ApiOperation("我的客户行政网格下拉框")
    @Log(title = "我的客户行政网格下拉框")
    @GetMapping("/region")
    public AjaxResult getRegionGridList(@RequestParam String gridLevel, @RequestParam String opsDept) {
        return AjaxResult.success(myCustomerGridSelectService.getRegionGridList(gridLevel, opsDept));
    }

    @ApiOperation("我的客户虚拟网格下拉框")
    @Log(title = "我的客户虚拟网格下拉框")
    @GetMapping("/virtual")
    public AjaxResult getVirtualGridList(@RequestParam String opsDept) {
        return AjaxResult.success(myCustomerGridSelectService.getVirtualGridList(opsDept));
    }

    @ApiOperation("我的客户特色网格下拉框")
    @Log(title = "我的客户虚拟网格下拉框")
    @GetMapping("/draw")
    public AjaxResult getDrawGridList(@RequestParam String opsDept) {
        return AjaxResult.success(myCustomerGridSelectService.getDrawGridList(opsDept));
    }


}
