|
@@ -1,5 +1,7 @@
|
|
|
package com.iamberry.rst.controllers.customer;
|
|
|
|
|
|
+import com.iamberry.rst.core.address.City;
|
|
|
+import com.iamberry.rst.core.address.Province;
|
|
|
import com.iamberry.rst.core.customer.*;
|
|
|
import com.iamberry.rst.faces.customer.CustomerBasicInfoSaveService;
|
|
|
import com.iamberry.wechat.tools.ResponseJson;
|
|
@@ -121,6 +123,49 @@ public class CustomerBasicInfoSaveController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 查询所有省份
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "/query_provinceList")
|
|
|
+ public ResponseJson queryProvinceList(HttpServletRequest request) {
|
|
|
+ Province province = new Province();
|
|
|
+ String provinceId = request.getParameter("provinceListInfo");
|
|
|
+ List<Province> provinceList = null;
|
|
|
+ provinceList = customerBasicInfoSaveService.queryProvinceList(provinceId);
|
|
|
+ if (provinceList == null || provinceList.size() < 1) {
|
|
|
+ return new ResponseJson(500, "查询失败", 500);
|
|
|
+ } else {
|
|
|
+ ResponseJson rj =new ResponseJson(200, "查询成功", 200);
|
|
|
+ rj.addResponseKeyValue("provinceList", provinceList);
|
|
|
+ return rj;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据省份代号查询所有城市
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "/query_cityList")
|
|
|
+ public ResponseJson queryCityList(HttpServletRequest request) {
|
|
|
+ Province province = new Province();
|
|
|
+ String provinceId = request.getParameter("cityList");
|
|
|
+ List<City> cityList = null;
|
|
|
+ cityList = customerBasicInfoSaveService.queryCityList(provinceId);
|
|
|
+ if (cityList == null || cityList.size() < 1) {
|
|
|
+ return new ResponseJson(500, "查询失败", 500);
|
|
|
+ } else {
|
|
|
+ ResponseJson rj =new ResponseJson(200, "查询成功", 200);
|
|
|
+ rj.addResponseKeyValue("cityList", cityList);
|
|
|
+ return rj;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 验证方法
|
|
|
*
|
|
|
* @param customerBasicInfo
|