|
@@ -1,15 +1,20 @@
|
|
package com.nokia.controller.web;
|
|
package com.nokia.controller.web;
|
|
|
|
|
|
import com.nokia.common.R;
|
|
import com.nokia.common.R;
|
|
|
|
+import com.nokia.pojo.Area;
|
|
import com.nokia.service.AreaService;
|
|
import com.nokia.service.AreaService;
|
|
|
|
+import com.nokia.vo.GetAreasByCityIdDto;
|
|
import com.nokia.vo.TreeAreaVo;
|
|
import com.nokia.vo.TreeAreaVo;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpSession;
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Tag(name = "地区")
|
|
@Tag(name = "地区")
|
|
@RestController
|
|
@RestController
|
|
@@ -40,4 +45,13 @@ public class WebAreaController {
|
|
public R<TreeAreaVo> treeProvinceCity(HttpSession session) {
|
|
public R<TreeAreaVo> treeProvinceCity(HttpSession session) {
|
|
return areaService.treeProvinceCity(session);
|
|
return areaService.treeProvinceCity(session);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据地市id获取区县列表
|
|
|
|
+ */
|
|
|
|
+ @Operation(summary = "根据地市id获取区县列表")
|
|
|
|
+ @PostMapping("getAreasByCityId")
|
|
|
|
+ public R<List<Area>> getAreasByCityId(@Valid @RequestBody GetAreasByCityIdDto dto) {
|
|
|
|
+ return areaService.getAreasByCityId(dto);
|
|
|
|
+ }
|
|
}
|
|
}
|