package com.ruoyi.admin.controller;
|
|
|
import com.ruoyi.admin.entity.Region;
|
import com.ruoyi.admin.service.RegionService;
|
import com.ruoyi.common.core.domain.R;
|
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.RestController;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 省市区三级联动 前端控制器
|
* </p>
|
*
|
* @author hjl
|
* @since 2024-06-12
|
*/
|
@RestController
|
@RequestMapping("/region")
|
@Api(value = "后台-首页", tags = {"后台-首页"})
|
public class RegionController {
|
|
@Resource
|
private RegionService regionService;
|
|
/**
|
* 收货地址省市二级联动
|
*/
|
@GetMapping("/addressTree")
|
@ApiOperation(value = "选择城市:省市二级联动", tags = {"后台-首页"})
|
public R<List<Region>> addressTree() {
|
return R.ok(regionService.addressTree());
|
}
|
|
}
|