|
|
@ -1,11 +1,15 @@
|
|
|
|
package com.luoo.user.controller;
|
|
|
|
package com.luoo.user.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import api.Result;
|
|
|
|
import api.Result;
|
|
|
|
|
|
|
|
import com.luoo.user.pojo.Region;
|
|
|
|
import com.luoo.user.service.RegionService;
|
|
|
|
import com.luoo.user.service.RegionService;
|
|
|
|
import com.luoo.user.vo.RegionVo;
|
|
|
|
import com.luoo.user.vo.RegionVo;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
@ -43,4 +47,10 @@ public class RegionController {
|
|
|
|
return Result.success(regionService.getRegionTreeList(level));
|
|
|
|
return Result.success(regionService.getRegionTreeList(level));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取子集地区TREE")
|
|
|
|
|
|
|
|
@GetMapping("/tree/child/{parentId}")
|
|
|
|
|
|
|
|
public Result<List<Region>> getRegionTreeListByParentId(@ApiParam(value = "查询的父id,如果是最上层,parentId=0", required = true) @PathVariable Integer parentId) {
|
|
|
|
|
|
|
|
return Result.success(regionService.getRegionTreeListByParentId(parentId));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|