根据三方区域类型获取区域列表 0-根 1=大区 2=战区 3=小区(督导区 4=门店

This commit is contained in:
wangxiaopeng
2024-03-29 11:41:02 +08:00
parent 967afb5352
commit b4b5ad4ec4
7 changed files with 80 additions and 4 deletions

View File

@@ -0,0 +1,38 @@
package com.cool.store.controller.webb;
import com.cool.store.entity.RegionDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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;
/**
* @ClassName RegionController
* @Description 区域
*/
@RestController
@RequestMapping("/pc/region")
@Api(tags = "区域信息")
@Slf4j
public class RegionController {
@Autowired
private RegionService regionService;
@ApiOperation("根据三方区域类型获取区域列表 0-根 1=大区 2=战区 3=小区(督导区 4=门店")
@GetMapping("/listByThirdRegionType")
public ResponseResult<List<RegionDO>> listByThirdRegionType(@RequestParam(value = "parentId", required = false) Long parentId,
@RequestParam(value = "thirdRegionType", required = false) String thirdRegionType) {
return ResponseResult.success(regionService.listByThirdRegionType(parentId, thirdRegionType));
}
}