|
@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
5
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.huiju.estateagents.base.ResponseBean;
|
7
|
7
|
import com.huiju.estateagents.common.CommConstant;
|
|
8
|
+import com.huiju.estateagents.entity.TaOrgCity;
|
8
|
9
|
import com.huiju.estateagents.entity.TdCity;
|
|
10
|
+import com.huiju.estateagents.mapper.TaOrgCityMapper;
|
9
|
11
|
import com.huiju.estateagents.service.ITdCityService;
|
10
|
12
|
import org.slf4j.Logger;
|
11
|
13
|
import org.slf4j.LoggerFactory;
|
|
@@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
19
|
21
|
import org.springframework.web.bind.annotation.RestController;
|
20
|
22
|
import com.huiju.estateagents.base.BaseController;
|
21
|
23
|
|
|
24
|
+import javax.servlet.http.HttpServletRequest;
|
22
|
25
|
import java.util.List;
|
23
|
26
|
|
24
|
27
|
/**
|
|
@@ -38,12 +41,15 @@ public class TdCityController extends BaseController {
|
38
|
41
|
@Autowired
|
39
|
42
|
public ITdCityService iTdCityService;
|
40
|
43
|
|
|
44
|
+ @Autowired
|
|
45
|
+ private TaOrgCityMapper taOrgCityMapper;
|
|
46
|
+
|
41
|
47
|
|
42
|
48
|
/**
|
43
|
|
- * 查询列表
|
|
49
|
+ * 中心端城市
|
44
|
50
|
* @return
|
45
|
51
|
*/
|
46
|
|
- @RequestMapping(value="/admin/tdCity",method= RequestMethod.GET)
|
|
52
|
+ @RequestMapping(value="/center/tdCity",method= RequestMethod.GET)
|
47
|
53
|
public ResponseBean tdCityList(@RequestParam(value = "leveltype", required = false) String leveltype){
|
48
|
54
|
ResponseBean responseBean = new ResponseBean();
|
49
|
55
|
try {
|
|
@@ -56,15 +62,28 @@ public class TdCityController extends BaseController {
|
56
|
62
|
return responseBean;
|
57
|
63
|
}
|
58
|
64
|
|
|
65
|
+ /**
|
|
66
|
+ * 业务端城市
|
|
67
|
+ */
|
|
68
|
+ @RequestMapping(value="/admin/tdCityList/tdCity",method= RequestMethod.GET)
|
|
69
|
+ public ResponseBean adminTdCityList(HttpServletRequest request){
|
|
70
|
+ ResponseBean responseBean = new ResponseBean<>();
|
|
71
|
+ List<TaOrgCity> taOrgCityList = taOrgCityMapper.selectAdminTdCityList(getOrgId(request));
|
|
72
|
+ responseBean.addSuccess(taOrgCityList);
|
|
73
|
+ return responseBean;
|
|
74
|
+ }
|
|
75
|
+
|
|
76
|
+
|
59
|
77
|
/**
|
60
|
78
|
* 查询列表
|
61
|
79
|
* @return
|
62
|
80
|
*/
|
63
|
81
|
@RequestMapping(value="/wx/tdCity",method= RequestMethod.GET)
|
64
|
|
- public ResponseBean tdCityListWx(@RequestParam(value = "leveltype", required = false) String leveltype){
|
|
82
|
+ public ResponseBean tdCityListWx(@RequestParam(value = "leveltype", required = false) String leveltype,HttpServletRequest request){
|
65
|
83
|
ResponseBean responseBean = new ResponseBean();
|
66
|
84
|
try {
|
67
|
|
- List<TdCity> result = iTdCityService.selectCity(leveltype, "1");
|
|
85
|
+ /**leveltype,暂时保留*/
|
|
86
|
+ List<TdCity> result = iTdCityService.selectWxCity(leveltype,getOrgId(request));
|
68
|
87
|
responseBean.addSuccess(result);
|
69
|
88
|
}catch (Exception e){
|
70
|
89
|
logger.error("tdCityList -=- {}",e.toString());
|