从MDM接口获取所属大区和业务区域
This commit is contained in:
@@ -2,7 +2,10 @@ package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.mdm.AreaSonDTO;
|
||||
import com.cool.store.entity.MDMAreaDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.mdm.BelongRegion;
|
||||
import com.cool.store.response.mdm.BusinessRegion;
|
||||
import com.cool.store.service.MDMAreaService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -14,6 +17,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.cool.store.response.ResponseResult.success;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/mdm/area")
|
||||
@Api(tags = "MDM省市信息")
|
||||
@@ -25,14 +30,25 @@ public class MDMAreaController {
|
||||
@PostMapping("/province")
|
||||
@ApiOperation("获取MDM省级信息")
|
||||
public ResponseResult<List<MDMAreaDO>> getProvince() {
|
||||
return ResponseResult.success(mdmAreaService.getProvince());
|
||||
return success(mdmAreaService.getProvince());
|
||||
}
|
||||
|
||||
@PostMapping("/son")
|
||||
@ApiOperation("获取子级区域数据")
|
||||
private ResponseResult<List<MDMAreaDO>> getSonArea(@RequestBody AreaSonDTO areaSon) {
|
||||
return ResponseResult.success(mdmAreaService.getSonArea(areaSon.getCode()));
|
||||
public ResponseResult<List<MDMAreaDO>> getSonArea(@RequestBody AreaSonDTO areaSon) {
|
||||
return success(mdmAreaService.getSonArea(areaSon.getCode()));
|
||||
}
|
||||
|
||||
@PostMapping("/belonging/region")
|
||||
@ApiOperation("获取 mdm 所有归属大区")
|
||||
public ResponseResult<List<BelongRegion>> getBelongRegion() throws ApiException {
|
||||
return ResponseResult.success(mdmAreaService.getBelongRegion());
|
||||
}
|
||||
|
||||
@PostMapping("/business/region")
|
||||
@ApiOperation("获取 mdm 所有业务区域")
|
||||
public ResponseResult<List<BusinessRegion>> getBusinessRegion() throws ApiException {
|
||||
return ResponseResult.success(mdmAreaService.getBusinessRegion());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user