hudingbo пре 5 година
родитељ
комит
cc37c1a240

+ 10 - 9
whepi-web/src/main/java/com/bofeng/controller/WxSysAreaController.java

@@ -6,8 +6,9 @@ import com.bofeng.entity.Uptown;
 import com.bofeng.entity.UptownUnit;
 import com.bofeng.service.SysAreaService;
 import com.yvan.Model;
+import com.yvan.mvc.Pd;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
@@ -22,15 +23,15 @@ public class WxSysAreaController {
     private SysAreaMapper sysAreaMapper;
 
     //选择省
-    @GetMapping("/admin/selectProvince")
+    @PostMapping("/admin/selectProvince")
     public Model<List<SysArea>> selectProvince() {
         return Model.newSuccess(sysAreaService.selectProvince());
     }
 
     //选择城市
-    @GetMapping("/admin/selectCityByProvince")
-    public Model<List<SysArea>> selectCityByProvince(HttpServletRequest request) {
-        Long areaId = Long.parseLong(request.getParameter("areaId"));
+    @PostMapping("/admin/selectCityByProvince")
+    public Model<List<SysArea>> selectCityByProvince(@Pd(name = "areaId", desc = "省份的ID") Long areaId) {
+        //Long areaId = Long.parseLong(request.getParameter("areaId"));
         if (areaId == null || areaId == 0L) {
             return Model.newFail("请选择所在省");
         }
@@ -38,7 +39,7 @@ public class WxSysAreaController {
     }
 
     //选择区
-    @GetMapping("/admin/selectAreaByCity")
+    @PostMapping("/admin/selectAreaByCity")
     public Model<List<SysArea>> selectAreaByCity(HttpServletRequest request) {
         Long areaId = Long.parseLong(request.getParameter("areaId"));
         if (areaId == null || areaId == 0L) {
@@ -48,7 +49,7 @@ public class WxSysAreaController {
     }
 
     //选择小区
-    @GetMapping("/admin/selectUptownByArea")
+    @PostMapping("/admin/selectUptownByArea")
     public Model<List<Uptown>> selectUptownByArea(HttpServletRequest request) {
         Long areaId = Long.parseLong(request.getParameter("areaId"));
         if (areaId == null || areaId == 0L) {
@@ -58,7 +59,7 @@ public class WxSysAreaController {
     }
 
     //选择栋
-    @GetMapping("/admin/selectRidgepoleByArea")
+    @PostMapping("/admin/selectRidgepoleByArea")
     public Model<List<String>> selectRidgepoleByArea(HttpServletRequest request) {
         Long uptownId = Long.parseLong(request.getParameter("uptownId"));
         if (uptownId == null || uptownId == 0L) {
@@ -68,7 +69,7 @@ public class WxSysAreaController {
     }
 
     //选择单元
-    @GetMapping("/admin/selectUnitByArea")
+    @PostMapping("/admin/selectUnitByArea")
     public Model<List<UptownUnit>> selectUnitByArea(HttpServletRequest request) {
         Long uptownId = Long.parseLong(request.getParameter("uptownId"));
         Long ridgepole = Long.parseLong(request.getParameter("ridgepole"));

+ 2 - 3
whepi-web/src/main/java/com/bofeng/controller/WxUserOpenController.java

@@ -9,7 +9,6 @@ import com.yvan.Model;
 import com.yvan.platform.StringUtils;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -28,7 +27,7 @@ public class WxUserOpenController {
     private WxUserOpenService wxUserOpenService;
 
     @ApiOperation("用户注册页面点登录")
-    @GetMapping("/userOpen/login")
+    @PostMapping("/userOpen/login")
     public Model<Long> login() {
         UserOpen userOpen = homeService.getUserOpen();
         if (userOpen == null) {
@@ -51,7 +50,7 @@ public class WxUserOpenController {
     }
 
     @ApiOperation("完善基础数据之获取创建的角色")
-    @GetMapping("/userOpen/queryUserRoles")
+    @PostMapping("/userOpen/queryUserRoles")
     public Model<List<UserRole>> queryUserRoles() {
         UserOpen userOpen = homeService.getUserOpen();
         List<UserRole> list = new ArrayList<>();