浏览代码

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents

魏熙美 5 年前
父节点
当前提交
e86ad325ae
共有 53 个文件被更改,包括 1793 次插入13 次删除
  1. 2
    1
      src/main/java/com/huiju/estateagents/controller/TaBuildingController.java
  2. 3
    2
      src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java
  3. 144
    0
      src/main/java/com/huiju/estateagents/controller/TaBuildingIntentionController.java
  4. 144
    0
      src/main/java/com/huiju/estateagents/controller/TaEventPropertiesController.java
  5. 2
    1
      src/main/java/com/huiju/estateagents/controller/TaNewsController.java
  6. 144
    0
      src/main/java/com/huiju/estateagents/controller/TaPersonIntentionRecordController.java
  7. 27
    1
      src/main/java/com/huiju/estateagents/controller/TaPersonVisitRecordController.java
  8. 169
    0
      src/main/java/com/huiju/estateagents/controller/TdBizEventController.java
  9. 168
    0
      src/main/java/com/huiju/estateagents/controller/TdBizEventTypeController.java
  10. 155
    0
      src/main/java/com/huiju/estateagents/controller/TdCityController.java
  11. 3
    0
      src/main/java/com/huiju/estateagents/entity/TaApartmentImg.java
  12. 2
    0
      src/main/java/com/huiju/estateagents/entity/TaBuilding.java
  13. 2
    0
      src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java
  14. 73
    0
      src/main/java/com/huiju/estateagents/entity/TaBuildingIntention.java
  15. 63
    0
      src/main/java/com/huiju/estateagents/entity/TaEventProperties.java
  16. 2
    0
      src/main/java/com/huiju/estateagents/entity/TaNews.java
  17. 88
    0
      src/main/java/com/huiju/estateagents/entity/TaPersonIntentionRecord.java
  18. 11
    0
      src/main/java/com/huiju/estateagents/entity/TaPersonVisitRecord.java
  19. 62
    0
      src/main/java/com/huiju/estateagents/entity/TdBizEvent.java
  20. 45
    0
      src/main/java/com/huiju/estateagents/entity/TdBizEventType.java
  21. 73
    0
      src/main/java/com/huiju/estateagents/entity/TdCity.java
  22. 1
    1
      src/main/java/com/huiju/estateagents/mapper/TaBuildingDynamicMapper.java
  23. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TaBuildingIntentionMapper.java
  24. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TaEventPropertiesMapper.java
  25. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TaPersonIntentionRecordMapper.java
  26. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TdBizEventMapper.java
  27. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TdBizEventTypeMapper.java
  28. 23
    0
      src/main/java/com/huiju/estateagents/mapper/TdCityMapper.java
  29. 1
    1
      src/main/java/com/huiju/estateagents/service/ITaBuildingDynamicService.java
  30. 17
    0
      src/main/java/com/huiju/estateagents/service/ITaBuildingIntentionService.java
  31. 1
    1
      src/main/java/com/huiju/estateagents/service/ITaBuildingService.java
  32. 17
    0
      src/main/java/com/huiju/estateagents/service/ITaEventPropertiesService.java
  33. 1
    1
      src/main/java/com/huiju/estateagents/service/ITaNewsService.java
  34. 17
    0
      src/main/java/com/huiju/estateagents/service/ITaPersonIntentionRecordService.java
  35. 17
    0
      src/main/java/com/huiju/estateagents/service/ITdBizEventService.java
  36. 17
    0
      src/main/java/com/huiju/estateagents/service/ITdBizEventTypeService.java
  37. 20
    0
      src/main/java/com/huiju/estateagents/service/ITdCityService.java
  38. 2
    2
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java
  39. 20
    0
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingIntentionServiceImpl.java
  40. 2
    1
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java
  41. 20
    0
      src/main/java/com/huiju/estateagents/service/impl/TaEventPropertiesServiceImpl.java
  42. 2
    1
      src/main/java/com/huiju/estateagents/service/impl/TaNewsServiceImpl.java
  43. 21
    0
      src/main/java/com/huiju/estateagents/service/impl/TaPersonIntentionRecordServiceImpl.java
  44. 20
    0
      src/main/java/com/huiju/estateagents/service/impl/TdBizEventServiceImpl.java
  45. 20
    0
      src/main/java/com/huiju/estateagents/service/impl/TdBizEventTypeServiceImpl.java
  46. 29
    0
      src/main/java/com/huiju/estateagents/service/impl/TdCityServiceImpl.java
  47. 3
    0
      src/main/resources/mapper/TaBuildingDynamicMapper.xml
  48. 5
    0
      src/main/resources/mapper/TaBuildingIntentionMapper.xml
  49. 5
    0
      src/main/resources/mapper/TaEventPropertiesMapper.xml
  50. 5
    0
      src/main/resources/mapper/TaPersonIntentionRecordMapper.xml
  51. 5
    0
      src/main/resources/mapper/TdBizEventMapper.xml
  52. 5
    0
      src/main/resources/mapper/TdBizEventTypeMapper.xml
  53. 20
    0
      src/main/resources/mapper/TdCityMapper.xml

+ 2
- 1
src/main/java/com/huiju/estateagents/controller/TaBuildingController.java 查看文件

@@ -156,6 +156,7 @@ public class TaBuildingController extends BaseController {
156 156
             @RequestParam(defaultValue = "1") Integer pageNum,
157 157
             @RequestParam(defaultValue = "10")Integer pageSize,
158 158
             @RequestParam(defaultValue = "false") Boolean mine,
159
+            @RequestParam(required = false) int cityId,
159 160
             String name,
160 161
             HttpServletRequest request
161 162
     ){
@@ -170,7 +171,7 @@ public class TaBuildingController extends BaseController {
170 171
             targets = iTaSaveService.getTargesOfPerson(persons.get(0).getPersonId(), CommConstant.FAVOR_PROJECT);
171 172
         }
172 173
 
173
-        return taBuildingService.getWxBuildingList(pageNum, pageSize, name, targets);
174
+        return taBuildingService.getWxBuildingList(pageNum, pageSize, name, targets,cityId);
174 175
     }
175 176
 
176 177
     /**

+ 3
- 2
src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java 查看文件

@@ -62,10 +62,11 @@ public class TaBuildingDynamicController extends BaseController {
62 62
     @RequestMapping(value = "/admin/iBuildingDynamicList", method = RequestMethod.GET)
63 63
     public ResponseBean iBuildingDynamicList(@RequestParam("pageNum")Integer pageNum,
64 64
                                              @RequestParam("pageSize")Integer pageSize,
65
-                                             @RequestParam(required = false)String name ,
65
+                                             @RequestParam(required = false)String name,
66
+                                             @RequestParam(required = false)int cityId,
66 67
                                              @RequestParam(required = false)String buildingId,
67 68
                                              HttpSession session){
68
-        ResponseBean  responseBean = iBuildingDynamicService.iBuildingDynamicList(pageNum,pageSize,name,buildingId);
69
+        ResponseBean  responseBean = iBuildingDynamicService.iBuildingDynamicList(pageNum,pageSize,name,buildingId,cityId);
69 70
         return responseBean;
70 71
     }
71 72
 

+ 144
- 0
src/main/java/com/huiju/estateagents/controller/TaBuildingIntentionController.java 查看文件

@@ -0,0 +1,144 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TaBuildingIntention;
8
+import com.huiju.estateagents.service.ITaBuildingIntentionService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+/**
22
+ * <p>
23
+    * 项目意向表  前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-08-07
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaBuildingIntentionController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaBuildingIntentionController.class);
34
+
35
+    @Autowired
36
+    public ITaBuildingIntentionService iTaBuildingIntentionService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taBuildingIntention",method= RequestMethod.GET)
46
+    public ResponseBean taBuildingIntentionList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+									 @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaBuildingIntention> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaBuildingIntention> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaBuildingIntention> result = iTaBuildingIntentionService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("taBuildingIntentionList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 保存对象
66
+     * @param taBuildingIntention 实体对象
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/taBuildingIntention",method= RequestMethod.POST)
70
+    public ResponseBean taBuildingIntentionAdd(@RequestBody TaBuildingIntention taBuildingIntention){
71
+        ResponseBean responseBean = new ResponseBean();
72
+        try {
73
+            if (iTaBuildingIntentionService.save(taBuildingIntention)){
74
+                responseBean.addSuccess(taBuildingIntention);
75
+            }else {
76
+                responseBean.addError("fail");
77
+            }
78
+        }catch (Exception e){
79
+            logger.error("taBuildingIntentionAdd -=- {}",e.toString());
80
+            responseBean.addError(e.getMessage());
81
+        }
82
+        return responseBean;
83
+    }
84
+
85
+    /**
86
+     * 根据id删除对象
87
+     * @param id  实体ID
88
+     */
89
+    @ResponseBody
90
+    @RequestMapping(value="/taBuildingIntention/{id}", method= RequestMethod.DELETE)
91
+    public ResponseBean taBuildingIntentionDelete(@PathVariable Integer id){
92
+        ResponseBean responseBean = new ResponseBean();
93
+        try {
94
+            if(iTaBuildingIntentionService.removeById(id)){
95
+                responseBean.addSuccess("success");
96
+            }else {
97
+                responseBean.addError("fail");
98
+            }
99
+        }catch (Exception e){
100
+            logger.error("taBuildingIntentionDelete -=- {}",e.toString());
101
+            responseBean.addError(e.getMessage());
102
+        }
103
+        return responseBean;
104
+    }
105
+
106
+    /**
107
+     * 修改对象
108
+     * @param id  实体ID
109
+     * @param taBuildingIntention 实体对象
110
+     * @return
111
+     */
112
+    @RequestMapping(value="/taBuildingIntention/{id}",method= RequestMethod.PUT)
113
+    public ResponseBean taBuildingIntentionUpdate(@PathVariable Integer id,
114
+                                        @RequestBody TaBuildingIntention taBuildingIntention){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            if (iTaBuildingIntentionService.updateById(taBuildingIntention)){
118
+                responseBean.addSuccess(taBuildingIntention);
119
+            }else {
120
+                responseBean.addError("fail");
121
+            }
122
+        }catch (Exception e){
123
+            logger.error("taBuildingIntentionUpdate -=- {}",e.toString());
124
+            responseBean.addError(e.getMessage());
125
+        }
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 根据id查询对象
131
+     * @param id  实体ID
132
+     */
133
+    @RequestMapping(value="/taBuildingIntention/{id}",method= RequestMethod.GET)
134
+    public ResponseBean taBuildingIntentionGet(@PathVariable Integer id){
135
+        ResponseBean responseBean = new ResponseBean();
136
+        try {
137
+            responseBean.addSuccess(iTaBuildingIntentionService.getById(id));
138
+        }catch (Exception e){
139
+            logger.error("taBuildingIntentionDelete -=- {}",e.toString());
140
+            responseBean.addError(e.getMessage());
141
+        }
142
+        return responseBean;
143
+    }
144
+}

+ 144
- 0
src/main/java/com/huiju/estateagents/controller/TaEventPropertiesController.java 查看文件

@@ -0,0 +1,144 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TaEventProperties;
8
+import com.huiju.estateagents.service.ITaEventPropertiesService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+/**
22
+ * <p>
23
+    * 事件属性字典  前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-08-06
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaEventPropertiesController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaEventPropertiesController.class);
34
+
35
+    @Autowired
36
+    public ITaEventPropertiesService iTaEventPropertiesService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taEventProperties",method= RequestMethod.GET)
46
+    public ResponseBean taEventPropertiesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+									 @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaEventProperties> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaEventProperties> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaEventProperties> result = iTaEventPropertiesService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("taEventPropertiesList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 保存对象
66
+     * @param taEventProperties 实体对象
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/taEventProperties",method= RequestMethod.POST)
70
+    public ResponseBean taEventPropertiesAdd(@RequestBody TaEventProperties taEventProperties){
71
+        ResponseBean responseBean = new ResponseBean();
72
+        try {
73
+            if (iTaEventPropertiesService.save(taEventProperties)){
74
+                responseBean.addSuccess(taEventProperties);
75
+            }else {
76
+                responseBean.addError("fail");
77
+            }
78
+        }catch (Exception e){
79
+            logger.error("taEventPropertiesAdd -=- {}",e.toString());
80
+            responseBean.addError(e.getMessage());
81
+        }
82
+        return responseBean;
83
+    }
84
+
85
+    /**
86
+     * 根据id删除对象
87
+     * @param id  实体ID
88
+     */
89
+    @ResponseBody
90
+    @RequestMapping(value="/taEventProperties/{id}", method= RequestMethod.DELETE)
91
+    public ResponseBean taEventPropertiesDelete(@PathVariable Integer id){
92
+        ResponseBean responseBean = new ResponseBean();
93
+        try {
94
+            if(iTaEventPropertiesService.removeById(id)){
95
+                responseBean.addSuccess("success");
96
+            }else {
97
+                responseBean.addError("fail");
98
+            }
99
+        }catch (Exception e){
100
+            logger.error("taEventPropertiesDelete -=- {}",e.toString());
101
+            responseBean.addError(e.getMessage());
102
+        }
103
+        return responseBean;
104
+    }
105
+
106
+    /**
107
+     * 修改对象
108
+     * @param id  实体ID
109
+     * @param taEventProperties 实体对象
110
+     * @return
111
+     */
112
+    @RequestMapping(value="/taEventProperties/{id}",method= RequestMethod.PUT)
113
+    public ResponseBean taEventPropertiesUpdate(@PathVariable Integer id,
114
+                                        @RequestBody TaEventProperties taEventProperties){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            if (iTaEventPropertiesService.updateById(taEventProperties)){
118
+                responseBean.addSuccess(taEventProperties);
119
+            }else {
120
+                responseBean.addError("fail");
121
+            }
122
+        }catch (Exception e){
123
+            logger.error("taEventPropertiesUpdate -=- {}",e.toString());
124
+            responseBean.addError(e.getMessage());
125
+        }
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 根据id查询对象
131
+     * @param id  实体ID
132
+     */
133
+    @RequestMapping(value="/taEventProperties/{id}",method= RequestMethod.GET)
134
+    public ResponseBean taEventPropertiesGet(@PathVariable Integer id){
135
+        ResponseBean responseBean = new ResponseBean();
136
+        try {
137
+            responseBean.addSuccess(iTaEventPropertiesService.getById(id));
138
+        }catch (Exception e){
139
+            logger.error("taEventPropertiesDelete -=- {}",e.toString());
140
+            responseBean.addError(e.getMessage());
141
+        }
142
+        return responseBean;
143
+    }
144
+}

+ 2
- 1
src/main/java/com/huiju/estateagents/controller/TaNewsController.java 查看文件

@@ -78,6 +78,7 @@ public class TaNewsController extends BaseController {
78 78
     public ResponseBean wxTaNewsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
79 79
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
80 80
                                      @RequestParam(required = false) String buildingId,
81
+                                     @RequestParam(required = false) int cityId,
81 82
                                      @RequestParam(defaultValue = "false") Boolean mine,
82 83
                                      HttpServletRequest request
83 84
     ){
@@ -92,7 +93,7 @@ public class TaNewsController extends BaseController {
92 93
             targets = iTaSaveService.getTargesOfPerson(persons.get(0).getPersonId(), CommConstant.FAVOR_NEWS);
93 94
         }
94 95
 
95
-        IPage<TaNews> results = iTaNewsService.getWxList(pageNum, pageSize, buildingId, targets);
96
+        IPage<TaNews> results = iTaNewsService.getWxList(pageNum, pageSize, buildingId, targets,cityId);
96 97
         return ResponseBean.success(results);
97 98
     }
98 99
 

+ 144
- 0
src/main/java/com/huiju/estateagents/controller/TaPersonIntentionRecordController.java 查看文件

@@ -0,0 +1,144 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TaPersonIntentionRecord;
8
+import com.huiju.estateagents.service.ITaPersonIntentionRecordService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+/**
22
+ * <p>
23
+    * 用户意向流水  前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-08-07
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaPersonIntentionRecordController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaPersonIntentionRecordController.class);
34
+
35
+    @Autowired
36
+    public ITaPersonIntentionRecordService iTaPersonIntentionRecordService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taPersonIntentionRecord",method= RequestMethod.GET)
46
+    public ResponseBean taPersonIntentionRecordList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                                    @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaPersonIntentionRecord> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaPersonIntentionRecord> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaPersonIntentionRecord> result = iTaPersonIntentionRecordService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("taPersonIntentionRecordList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 保存对象
66
+     * @param taPersonIntentionRecord 实体对象
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/taPersonIntentionRecord",method= RequestMethod.POST)
70
+    public ResponseBean taPersonIntentionRecordAdd(@RequestBody TaPersonIntentionRecord taPersonIntentionRecord){
71
+        ResponseBean responseBean = new ResponseBean();
72
+        try {
73
+            if (iTaPersonIntentionRecordService.save(taPersonIntentionRecord)){
74
+                responseBean.addSuccess(taPersonIntentionRecord);
75
+            }else {
76
+                responseBean.addError("fail");
77
+            }
78
+        }catch (Exception e){
79
+            logger.error("taPersonIntentionRecordAdd -=- {}",e.toString());
80
+            responseBean.addError(e.getMessage());
81
+        }
82
+        return responseBean;
83
+    }
84
+
85
+    /**
86
+     * 根据id删除对象
87
+     * @param id  实体ID
88
+     */
89
+    @ResponseBody
90
+    @RequestMapping(value="/taPersonIntentionRecord/{id}", method= RequestMethod.DELETE)
91
+    public ResponseBean taPersonIntentionRecordDelete(@PathVariable Integer id){
92
+        ResponseBean responseBean = new ResponseBean();
93
+        try {
94
+            if(iTaPersonIntentionRecordService.removeById(id)){
95
+                responseBean.addSuccess("success");
96
+            }else {
97
+                responseBean.addError("fail");
98
+            }
99
+        }catch (Exception e){
100
+            logger.error("taPersonIntentionRecordDelete -=- {}",e.toString());
101
+            responseBean.addError(e.getMessage());
102
+        }
103
+        return responseBean;
104
+    }
105
+
106
+    /**
107
+     * 修改对象
108
+     * @param id  实体ID
109
+     * @param taPersonIntentionRecord 实体对象
110
+     * @return
111
+     */
112
+    @RequestMapping(value="/taPersonIntentionRecord/{id}",method= RequestMethod.PUT)
113
+    public ResponseBean taPersonIntentionRecordUpdate(@PathVariable Integer id,
114
+                                        @RequestBody TaPersonIntentionRecord taPersonIntentionRecord){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            if (iTaPersonIntentionRecordService.updateById(taPersonIntentionRecord)){
118
+                responseBean.addSuccess(taPersonIntentionRecord);
119
+            }else {
120
+                responseBean.addError("fail");
121
+            }
122
+        }catch (Exception e){
123
+            logger.error("taPersonIntentionRecordUpdate -=- {}",e.toString());
124
+            responseBean.addError(e.getMessage());
125
+        }
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 根据id查询对象
131
+     * @param id  实体ID
132
+     */
133
+    @RequestMapping(value="/taPersonIntentionRecord/{id}",method= RequestMethod.GET)
134
+    public ResponseBean taPersonIntentionRecordGet(@PathVariable Integer id){
135
+        ResponseBean responseBean = new ResponseBean();
136
+        try {
137
+            responseBean.addSuccess(iTaPersonIntentionRecordService.getById(id));
138
+        }catch (Exception e){
139
+            logger.error("taPersonIntentionRecordDelete -=- {}",e.toString());
140
+            responseBean.addError(e.getMessage());
141
+        }
142
+        return responseBean;
143
+    }
144
+}

+ 27
- 1
src/main/java/com/huiju/estateagents/controller/TaPersonVisitRecordController.java 查看文件

@@ -1,13 +1,18 @@
1 1
 package com.huiju.estateagents.controller;
2 2
 
3
+import ch.qos.logback.core.status.StatusUtil;
3 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 7
 import com.huiju.estateagents.base.BaseController;
7 8
 import com.huiju.estateagents.base.ResponseBean;
9
+import com.huiju.estateagents.common.CommConstant;
8 10
 import com.huiju.estateagents.common.JWTUtils;
11
+import com.huiju.estateagents.common.StringUtils;
12
+import com.huiju.estateagents.entity.TaEventProperties;
9 13
 import com.huiju.estateagents.entity.TaPerson;
10 14
 import com.huiju.estateagents.entity.TaPersonVisitRecord;
15
+import com.huiju.estateagents.service.ITaEventPropertiesService;
11 16
 import com.huiju.estateagents.service.ITaPersonService;
12 17
 import com.huiju.estateagents.service.ITaPersonVisitRecordService;
13 18
 import org.slf4j.Logger;
@@ -39,6 +44,8 @@ public class TaPersonVisitRecordController extends BaseController {
39 44
     public ITaPersonVisitRecordService iTaPersonVisitRecordService;
40 45
     @Autowired
41 46
     public ITaPersonService taPersonService;
47
+    @Autowired
48
+    public ITaEventPropertiesService taEventPropertiesService;
42 49
 
43 50
 
44 51
     /**
@@ -70,13 +77,32 @@ public class TaPersonVisitRecordController extends BaseController {
70 77
      * @return
71 78
      */
72 79
     @RequestMapping(value="/wx/taPersonVisitRecord",method= RequestMethod.POST)
73
-    public ResponseBean taPersonVisitRecordAdd(@RequestBody TaPersonVisitRecord taPersonVisitRecord, HttpServletRequest request){
80
+    public ResponseBean taPersonVisitRecordAdd(@RequestBody TaPersonVisitRecord taPersonVisitRecord, HttpServletRequest request,  @RequestParam(value = "buildingId", required = false) String buildingId){
74 81
         String openid = JWTUtils.getSubject(request);
75 82
         List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
76 83
         if (null == taPersons || taPersons.size() != 1) {
77 84
             return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
78 85
         }
79 86
         TaPerson person = taPersons.get(0);
87
+        if (!StringUtils.isEmpty(buildingId)){
88
+            taPersonVisitRecord.setBuildingId(buildingId);
89
+        }
90
+        QueryWrapper<TaEventProperties>event = new QueryWrapper<>();
91
+        event.eq("buildingId",buildingId);
92
+        event.eq("property_code",taPersonVisitRecord.getActivity());
93
+        List<TaEventProperties> eventProperties = taEventPropertiesService.list(event);
94
+        if(eventProperties.size()<=0){
95
+            TaEventProperties taEventProperty = new TaEventProperties();
96
+            taEventProperty.setBuildingId(buildingId);
97
+            taEventProperty.setCreateDate(LocalDateTime.now());
98
+            taEventProperty.setPropertyCode(taPersonVisitRecord.getActivity());
99
+            taEventProperty.setPropertyName(taPersonVisitRecord.getPropertyName());
100
+            taEventProperty.setStatus(CommConstant.STATUS_NORMAL);
101
+            if (!taEventPropertiesService.save(taEventProperty)){
102
+                return ResponseBean.error("新增失败",ResponseBean.ERROR_UNAVAILABLE);
103
+            }
104
+
105
+        }
80 106
         taPersonVisitRecord.setPersonId(person.getPersonId());
81 107
         taPersonVisitRecord.setVisitTime(LocalDateTime.now());
82 108
         try {

+ 169
- 0
src/main/java/com/huiju/estateagents/controller/TdBizEventController.java 查看文件

@@ -0,0 +1,169 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TdBizEvent;
8
+import com.huiju.estateagents.service.ITdBizEventService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+/**
22
+ * <p>
23
+    * 事件字典  前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-08-06
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TdBizEventController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TdBizEventController.class);
34
+
35
+    @Autowired
36
+    public ITdBizEventService iTdBizEventService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/tdBizEvent",method= RequestMethod.GET)
46
+    public ResponseBean tdBizEventList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                       @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TdBizEvent> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TdBizEvent> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("event_id");
54
+
55
+            IPage<TdBizEvent> result = iTdBizEventService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("tdBizEventList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 分页查询列表
66
+     * @param pageNum
67
+     * @param pageSize
68
+     * @return
69
+     */
70
+    @RequestMapping(value="/wx/tdBizEvent",method= RequestMethod.GET)
71
+    public ResponseBean tdBizEventListWx(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
72
+                                       @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
73
+        ResponseBean responseBean = new ResponseBean();
74
+        try {
75
+            //使用分页插件
76
+            IPage<TdBizEvent> pg = new Page<>(pageNum, pageSize);
77
+            QueryWrapper<TdBizEvent> queryWrapper = new QueryWrapper<>();
78
+            queryWrapper.orderByDesc("event_id");
79
+
80
+            IPage<TdBizEvent> result = iTdBizEventService.page(pg, queryWrapper);
81
+            responseBean.addSuccess(result);
82
+        }catch (Exception e){
83
+            logger.error("tdBizEventList -=- {}",e.toString());
84
+            responseBean.addError(e.getMessage());
85
+        }
86
+        return responseBean;
87
+    }
88
+
89
+    /**
90
+     * 保存对象
91
+     * @param tdBizEvent 实体对象
92
+     * @return
93
+     */
94
+    @RequestMapping(value="/tdBizEvent",method= RequestMethod.POST)
95
+    public ResponseBean tdBizEventAdd(@RequestBody TdBizEvent tdBizEvent){
96
+        ResponseBean responseBean = new ResponseBean();
97
+        try {
98
+            if (iTdBizEventService.save(tdBizEvent)){
99
+                responseBean.addSuccess(tdBizEvent);
100
+            }else {
101
+                responseBean.addError("fail");
102
+            }
103
+        }catch (Exception e){
104
+            logger.error("tdBizEventAdd -=- {}",e.toString());
105
+            responseBean.addError(e.getMessage());
106
+        }
107
+        return responseBean;
108
+    }
109
+
110
+    /**
111
+     * 根据id删除对象
112
+     * @param id  实体ID
113
+     */
114
+    @ResponseBody
115
+    @RequestMapping(value="/tdBizEvent/{id}", method= RequestMethod.DELETE)
116
+    public ResponseBean tdBizEventDelete(@PathVariable Integer id){
117
+        ResponseBean responseBean = new ResponseBean();
118
+        try {
119
+            if(iTdBizEventService.removeById(id)){
120
+                responseBean.addSuccess("success");
121
+            }else {
122
+                responseBean.addError("fail");
123
+            }
124
+        }catch (Exception e){
125
+            logger.error("tdBizEventDelete -=- {}",e.toString());
126
+            responseBean.addError(e.getMessage());
127
+        }
128
+        return responseBean;
129
+    }
130
+
131
+    /**
132
+     * 修改对象
133
+     * @param id  实体ID
134
+     * @param tdBizEvent 实体对象
135
+     * @return
136
+     */
137
+    @RequestMapping(value="/tdBizEvent/{id}",method= RequestMethod.PUT)
138
+    public ResponseBean tdBizEventUpdate(@PathVariable Integer id,
139
+                                        @RequestBody TdBizEvent tdBizEvent){
140
+        ResponseBean responseBean = new ResponseBean();
141
+        try {
142
+            if (iTdBizEventService.updateById(tdBizEvent)){
143
+                responseBean.addSuccess(tdBizEvent);
144
+            }else {
145
+                responseBean.addError("fail");
146
+            }
147
+        }catch (Exception e){
148
+            logger.error("tdBizEventUpdate -=- {}",e.toString());
149
+            responseBean.addError(e.getMessage());
150
+        }
151
+        return responseBean;
152
+    }
153
+
154
+    /**
155
+     * 根据id查询对象
156
+     * @param id  实体ID
157
+     */
158
+    @RequestMapping(value="/tdBizEvent/{id}",method= RequestMethod.GET)
159
+    public ResponseBean tdBizEventGet(@PathVariable Integer id){
160
+        ResponseBean responseBean = new ResponseBean();
161
+        try {
162
+            responseBean.addSuccess(iTdBizEventService.getById(id));
163
+        }catch (Exception e){
164
+            logger.error("tdBizEventDelete -=- {}",e.toString());
165
+            responseBean.addError(e.getMessage());
166
+        }
167
+        return responseBean;
168
+    }
169
+}

+ 168
- 0
src/main/java/com/huiju/estateagents/controller/TdBizEventTypeController.java 查看文件

@@ -0,0 +1,168 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TdBizEventType;
8
+import com.huiju.estateagents.service.ITdBizEventTypeService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+/**
22
+ * <p>
23
+    * 事件类型字典  前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-08-06
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TdBizEventTypeController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TdBizEventTypeController.class);
34
+
35
+    @Autowired
36
+    public ITdBizEventTypeService iTdBizEventTypeService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/tdBizEventType",method= RequestMethod.GET)
46
+    public ResponseBean tdBizEventTypeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TdBizEventType> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TdBizEventType> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("type_id");
54
+
55
+            IPage<TdBizEventType> result = iTdBizEventTypeService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("tdBizEventTypeList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+    /**
64
+     * 分页查询列表
65
+     * @param pageNum
66
+     * @param pageSize
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/wx/tdBizEventType",method= RequestMethod.GET)
70
+    public ResponseBean tdBizEventTypeListWx(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
71
+                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
72
+        ResponseBean responseBean = new ResponseBean();
73
+        try {
74
+            //使用分页插件
75
+            IPage<TdBizEventType> pg = new Page<>(pageNum, pageSize);
76
+            QueryWrapper<TdBizEventType> queryWrapper = new QueryWrapper<>();
77
+            queryWrapper.orderByDesc("type_id");
78
+
79
+            IPage<TdBizEventType> result = iTdBizEventTypeService.page(pg, queryWrapper);
80
+            responseBean.addSuccess(result);
81
+        }catch (Exception e){
82
+            logger.error("tdBizEventTypeList -=- {}",e.toString());
83
+            responseBean.addError(e.getMessage());
84
+        }
85
+        return responseBean;
86
+    }
87
+
88
+    /**
89
+     * 保存对象
90
+     * @param tdBizEventType 实体对象
91
+     * @return
92
+     */
93
+    @RequestMapping(value="/tdBizEventType",method= RequestMethod.POST)
94
+    public ResponseBean tdBizEventTypeAdd(@RequestBody TdBizEventType tdBizEventType){
95
+        ResponseBean responseBean = new ResponseBean();
96
+        try {
97
+            if (iTdBizEventTypeService.save(tdBizEventType)){
98
+                responseBean.addSuccess(tdBizEventType);
99
+            }else {
100
+                responseBean.addError("fail");
101
+            }
102
+        }catch (Exception e){
103
+            logger.error("tdBizEventTypeAdd -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 根据id删除对象
111
+     * @param id  实体ID
112
+     */
113
+    @ResponseBody
114
+    @RequestMapping(value="/tdBizEventType/{id}", method= RequestMethod.DELETE)
115
+    public ResponseBean tdBizEventTypeDelete(@PathVariable Integer id){
116
+        ResponseBean responseBean = new ResponseBean();
117
+        try {
118
+            if(iTdBizEventTypeService.removeById(id)){
119
+                responseBean.addSuccess("success");
120
+            }else {
121
+                responseBean.addError("fail");
122
+            }
123
+        }catch (Exception e){
124
+            logger.error("tdBizEventTypeDelete -=- {}",e.toString());
125
+            responseBean.addError(e.getMessage());
126
+        }
127
+        return responseBean;
128
+    }
129
+
130
+    /**
131
+     * 修改对象
132
+     * @param id  实体ID
133
+     * @param tdBizEventType 实体对象
134
+     * @return
135
+     */
136
+    @RequestMapping(value="/tdBizEventType/{id}",method= RequestMethod.PUT)
137
+    public ResponseBean tdBizEventTypeUpdate(@PathVariable Integer id,
138
+                                        @RequestBody TdBizEventType tdBizEventType){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            if (iTdBizEventTypeService.updateById(tdBizEventType)){
142
+                responseBean.addSuccess(tdBizEventType);
143
+            }else {
144
+                responseBean.addError("fail");
145
+            }
146
+        }catch (Exception e){
147
+            logger.error("tdBizEventTypeUpdate -=- {}",e.toString());
148
+            responseBean.addError(e.getMessage());
149
+        }
150
+        return responseBean;
151
+    }
152
+
153
+    /**
154
+     * 根据id查询对象
155
+     * @param id  实体ID
156
+     */
157
+    @RequestMapping(value="/tdBizEventType/{id}",method= RequestMethod.GET)
158
+    public ResponseBean tdBizEventTypeGet(@PathVariable Integer id){
159
+        ResponseBean responseBean = new ResponseBean();
160
+        try {
161
+            responseBean.addSuccess(iTdBizEventTypeService.getById(id));
162
+        }catch (Exception e){
163
+            logger.error("tdBizEventTypeDelete -=- {}",e.toString());
164
+            responseBean.addError(e.getMessage());
165
+        }
166
+        return responseBean;
167
+    }
168
+}

+ 155
- 0
src/main/java/com/huiju/estateagents/controller/TdCityController.java 查看文件

@@ -0,0 +1,155 @@
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.entity.TdCity;
8
+import com.huiju.estateagents.service.ITdCityService;
9
+import org.slf4j.Logger;
10
+import org.slf4j.LoggerFactory;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.PathVariable;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.ResponseBody;
18
+import org.springframework.web.bind.annotation.RestController;
19
+import com.huiju.estateagents.base.BaseController;
20
+
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+    *  前端控制器
26
+    * </p>
27
+ *
28
+ * @author jobob
29
+ * @since 2019-08-07
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+public class TdCityController extends BaseController {
34
+
35
+    private final Logger logger = LoggerFactory.getLogger(TdCityController.class);
36
+
37
+    @Autowired
38
+    public ITdCityService iTdCityService;
39
+
40
+
41
+    /**
42
+     * 查询列表
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/admin/tdCity",method= RequestMethod.GET)
46
+    public ResponseBean tdCityList(@RequestParam(value = "leveltype", required = false) String leveltype){
47
+        ResponseBean responseBean = new ResponseBean();
48
+        try {
49
+            List<TdCity> result = iTdCityService.selectCity(leveltype);
50
+            responseBean.addSuccess(result);
51
+        }catch (Exception e){
52
+            logger.error("tdCityList -=- {}",e.toString());
53
+            responseBean.addError(e.getMessage());
54
+        }
55
+        return responseBean;
56
+    }
57
+
58
+    /**
59
+     * 查询列表
60
+     * @return
61
+     */
62
+    @RequestMapping(value="/wx/tdCity",method= RequestMethod.GET)
63
+    public ResponseBean tdCityListWx(@RequestParam(value = "leveltype", required = false) String leveltype){
64
+        ResponseBean responseBean = new ResponseBean();
65
+        try {
66
+            List<TdCity> result = iTdCityService.selectCity(leveltype);
67
+            responseBean.addSuccess(result);
68
+        }catch (Exception e){
69
+            logger.error("tdCityList -=- {}",e.toString());
70
+            responseBean.addError(e.getMessage());
71
+        }
72
+        return responseBean;
73
+    }
74
+
75
+    /**
76
+     * 保存对象
77
+     * @param tdCity 实体对象
78
+     * @return
79
+     */
80
+    @RequestMapping(value="/tdCity",method= RequestMethod.POST)
81
+    public ResponseBean tdCityAdd(@RequestBody TdCity tdCity){
82
+        ResponseBean responseBean = new ResponseBean();
83
+        try {
84
+            if (iTdCityService.save(tdCity)){
85
+                responseBean.addSuccess(tdCity);
86
+            }else {
87
+                responseBean.addError("fail");
88
+            }
89
+        }catch (Exception e){
90
+            logger.error("tdCityAdd -=- {}",e.toString());
91
+            responseBean.addError(e.getMessage());
92
+        }
93
+        return responseBean;
94
+    }
95
+
96
+    /**
97
+     * 根据id删除对象
98
+     * @param id  实体ID
99
+     */
100
+    @ResponseBody
101
+    @RequestMapping(value="/tdCity/{id}", method= RequestMethod.DELETE)
102
+    public ResponseBean tdCityDelete(@PathVariable Integer id){
103
+        ResponseBean responseBean = new ResponseBean();
104
+        try {
105
+            if(iTdCityService.removeById(id)){
106
+                responseBean.addSuccess("success");
107
+            }else {
108
+                responseBean.addError("fail");
109
+            }
110
+        }catch (Exception e){
111
+            logger.error("tdCityDelete -=- {}",e.toString());
112
+            responseBean.addError(e.getMessage());
113
+        }
114
+        return responseBean;
115
+    }
116
+
117
+    /**
118
+     * 修改对象
119
+     * @param id  实体ID
120
+     * @param tdCity 实体对象
121
+     * @return
122
+     */
123
+    @RequestMapping(value="/tdCity/{id}",method= RequestMethod.PUT)
124
+    public ResponseBean tdCityUpdate(@PathVariable Integer id,
125
+                                        @RequestBody TdCity tdCity){
126
+        ResponseBean responseBean = new ResponseBean();
127
+        try {
128
+            if (iTdCityService.updateById(tdCity)){
129
+                responseBean.addSuccess(tdCity);
130
+            }else {
131
+                responseBean.addError("fail");
132
+            }
133
+        }catch (Exception e){
134
+            logger.error("tdCityUpdate -=- {}",e.toString());
135
+            responseBean.addError(e.getMessage());
136
+        }
137
+        return responseBean;
138
+    }
139
+
140
+    /**
141
+     * 根据id查询对象
142
+     * @param id  实体ID
143
+     */
144
+    @RequestMapping(value="/tdCity/{id}",method= RequestMethod.GET)
145
+    public ResponseBean tdCityGet(@PathVariable Integer id){
146
+        ResponseBean responseBean = new ResponseBean();
147
+        try {
148
+            responseBean.addSuccess(iTdCityService.getById(id));
149
+        }catch (Exception e){
150
+            logger.error("tdCityDelete -=- {}",e.toString());
151
+            responseBean.addError(e.getMessage());
152
+        }
153
+        return responseBean;
154
+    }
155
+}

+ 3
- 0
src/main/java/com/huiju/estateagents/entity/TaApartmentImg.java 查看文件

@@ -2,6 +2,8 @@ package com.huiju.estateagents.entity;
2 2
 
3 3
 import java.io.Serializable;
4 4
 
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableId;
5 7
 import lombok.Data;
6 8
 import lombok.EqualsAndHashCode;
7 9
 import lombok.experimental.Accessors;
@@ -24,6 +26,7 @@ public class TaApartmentImg implements Serializable {
24 26
     /**
25 27
      * 户型id
26 28
      */
29
+    @TableId(value = "apartment_id", type = IdType.UUID)
27 30
     private String apartmentId;
28 31
 
29 32
     /**

+ 2
- 0
src/main/java/com/huiju/estateagents/entity/TaBuilding.java 查看文件

@@ -217,4 +217,6 @@ public class TaBuilding implements Serializable {
217 217
 
218 218
     @TableField(exist = false)
219 219
     private List<Map<String, Object>> consultants;
220
+
221
+    private int cityId;
220 222
 }

+ 2
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java 查看文件

@@ -159,4 +159,6 @@ public class TaBuildingDynamic implements Serializable {
159 159
      * 活动人数
160 160
      */
161 161
     private  String personNum;
162
+
163
+    private int cityId;
162 164
 }

+ 73
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingIntention.java 查看文件

@@ -0,0 +1,73 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+/**
12
+ * <p>
13
+ * 项目意向表 
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-08-07
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TaBuildingIntention implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 设置ID
28
+     */
29
+    @TableId(value = "intention_id", type = IdType.AUTO)
30
+    private Integer intentionId;
31
+
32
+    /**
33
+     * 事件ID
34
+     */
35
+    private Integer eventId;
36
+
37
+    /**
38
+     * 事件code
39
+     */
40
+    private String eventCode;
41
+
42
+    /**
43
+     * 事件名称
44
+     */
45
+    private String eventName;
46
+
47
+    /**
48
+     * 意向值
49
+     */
50
+    private Integer intention;
51
+
52
+    /**
53
+     * 状态
54
+     */
55
+    private Integer status;
56
+
57
+    /**
58
+     * 创建时间
59
+     */
60
+    private LocalDateTime createDate;
61
+
62
+    /**
63
+     * 公司id
64
+     */
65
+    private Integer orgId;
66
+
67
+    /**
68
+     * 楼盘id
69
+     */
70
+    private String buildingId;
71
+
72
+
73
+}

+ 63
- 0
src/main/java/com/huiju/estateagents/entity/TaEventProperties.java 查看文件

@@ -0,0 +1,63 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+/**
12
+ * <p>
13
+ * 事件属性字典 
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-08-06
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TaEventProperties implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 属性ID
28
+     */
29
+    @TableId(value = "property_id", type = IdType.AUTO)
30
+    private Integer propertyId;
31
+
32
+    /**
33
+     * 属性code
34
+     */
35
+    private String propertyCode;
36
+
37
+    /**
38
+     * 属性名称
39
+     */
40
+    private String propertyName;
41
+
42
+    /**
43
+     * 状态
44
+     */
45
+    private Integer status;
46
+
47
+    /**
48
+     * 创建时间
49
+     */
50
+    private LocalDateTime createDate;
51
+
52
+    /**
53
+     * 公司id
54
+     */
55
+    private Integer orgId;
56
+
57
+    /**
58
+     * 楼盘id
59
+     */
60
+    private String buildingId;
61
+
62
+
63
+}

+ 2
- 0
src/main/java/com/huiju/estateagents/entity/TaNews.java 查看文件

@@ -101,4 +101,6 @@ public class TaNews implements Serializable {
101 101
      */
102 102
     @TableField(exist = false)
103 103
     private TaNewsType newsType;
104
+
105
+    private int cityId;
104 106
 }

+ 88
- 0
src/main/java/com/huiju/estateagents/entity/TaPersonIntentionRecord.java 查看文件

@@ -0,0 +1,88 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+/**
12
+ * <p>
13
+ * 用户意向流水 
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-08-07
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TaPersonIntentionRecord implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 序号
28
+     */
29
+    @TableId(value = "serial_no", type = IdType.AUTO)
30
+    private Integer serialNo;
31
+
32
+    /**
33
+     * 用户ID
34
+     */
35
+    private String personId;
36
+
37
+    /**
38
+     * 用户名称
39
+     */
40
+    private String personName;
41
+
42
+    /**
43
+     * 楼盘id
44
+     */
45
+    private String buildingId;
46
+
47
+    /**
48
+     * 楼盘名称
49
+     */
50
+    private String buildingName;
51
+
52
+    /**
53
+     * 事件ID
54
+     */
55
+    private Integer eventId;
56
+
57
+    /**
58
+     * 事件code
59
+     */
60
+    private String eventCode;
61
+
62
+    /**
63
+     * 事件名称
64
+     */
65
+    private String eventName;
66
+
67
+    /**
68
+     * 意向值
69
+     */
70
+    private Integer intention;
71
+
72
+    /**
73
+     * 状态
74
+     */
75
+    private Integer status;
76
+
77
+    /**
78
+     * 创建时间
79
+     */
80
+    private LocalDateTime createDate;
81
+
82
+    /**
83
+     * 公司id
84
+     */
85
+    private Integer orgId;
86
+
87
+
88
+}

+ 11
- 0
src/main/java/com/huiju/estateagents/entity/TaPersonVisitRecord.java 查看文件

@@ -1,6 +1,7 @@
1 1
 package com.huiju.estateagents.entity;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import java.time.LocalDateTime;
6 7
 import java.io.Serializable;
@@ -69,6 +70,16 @@ public class TaPersonVisitRecord implements Serializable {
69 70
      */
70 71
     private String activity;
71 72
 
73
+    private String eventType;
74
+
75
+    private String buildingId;
76
+
77
+    private String orgId;
78
+
79
+    @TableField(exist = false)
80
+    private String propertyName;
81
+
82
+    private String targetId;
72 83
 
73 84
 
74 85
 

+ 62
- 0
src/main/java/com/huiju/estateagents/entity/TdBizEvent.java 查看文件

@@ -0,0 +1,62 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import java.time.LocalDateTime;
6
+import java.io.Serializable;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+/**
12
+ * <p>
13
+ * 事件字典 
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-08-06
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TdBizEvent implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 事件ID
28
+     */
29
+    @TableId(value = "event_id", type = IdType.AUTO)
30
+    private Integer eventId;
31
+
32
+    /**
33
+     * 事件编码
34
+     */
35
+    private String eventCode;
36
+
37
+    /**
38
+     * 事件名称
39
+     */
40
+    private String eventName;
41
+
42
+    /**
43
+     * 备注
44
+     */
45
+    private String remark;
46
+
47
+    /**
48
+     * 状态
49
+     */
50
+    private Integer status;
51
+
52
+    /**
53
+     * 创建时间
54
+     */
55
+    private LocalDateTime createDate;
56
+
57
+    private String typeId;
58
+
59
+    private String typeName;
60
+
61
+
62
+}

+ 45
- 0
src/main/java/com/huiju/estateagents/entity/TdBizEventType.java 查看文件

@@ -0,0 +1,45 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import java.time.LocalDateTime;
4
+import java.io.Serializable;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+/**
10
+ * <p>
11
+ * 事件类型字典 
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-06
16
+ */
17
+@Data
18
+@EqualsAndHashCode(callSuper = false)
19
+@Accessors(chain = true)
20
+public class TdBizEventType implements Serializable {
21
+
22
+    private static final long serialVersionUID = 1L;
23
+
24
+    /**
25
+     * 类型ID
26
+     */
27
+    private String typeId;
28
+
29
+    /**
30
+     * 类型名称
31
+     */
32
+    private String typeName;
33
+
34
+    /**
35
+     * 状态
36
+     */
37
+    private Integer status;
38
+
39
+    /**
40
+     * 创建时间
41
+     */
42
+    private LocalDateTime createDate;
43
+
44
+
45
+}

+ 73
- 0
src/main/java/com/huiju/estateagents/entity/TdCity.java 查看文件

@@ -0,0 +1,73 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import java.io.Serializable;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+/**
9
+ * <p>
10
+ * 
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-07
15
+ */
16
+@Data
17
+@EqualsAndHashCode(callSuper = false)
18
+@Accessors(chain = true)
19
+public class TdCity implements Serializable {
20
+
21
+    private static final long serialVersionUID = 1L;
22
+
23
+    /**
24
+     * 省市区名称
25
+     */
26
+    private String name;
27
+
28
+    /**
29
+     * 上级ID
30
+     */
31
+    private Integer parentid;
32
+
33
+    /**
34
+     * 简称
35
+     */
36
+    private String shortname;
37
+
38
+    /**
39
+     * 级别:0,中国;1,省分;2,市;3,区、县
40
+     */
41
+    private Integer leveltype;
42
+
43
+    /**
44
+     * 城市代码
45
+     */
46
+    private String citycode;
47
+
48
+    /**
49
+     * 邮编
50
+     */
51
+    private String zipcode;
52
+
53
+    /**
54
+     * 经度
55
+     */
56
+    private String lng;
57
+
58
+    /**
59
+     * 纬度
60
+     */
61
+    private String lat;
62
+
63
+    /**
64
+     * 拼音
65
+     */
66
+    private String pinyin;
67
+
68
+    private String status;
69
+
70
+    private String initial;
71
+
72
+
73
+}

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaBuildingDynamicMapper.java 查看文件

@@ -24,7 +24,7 @@ public interface TaBuildingDynamicMapper extends BaseMapper<TaBuildingDynamic> {
24 24
      * @param page
25 25
      * @return
26 26
      */
27
-    IPage<TaBuildingDynamic> buildingDynamicList(Page page, @Param("name") String name, @Param("buildingId") String buildingId);
27
+    IPage<TaBuildingDynamic> buildingDynamicList(Page page, @Param("name") String name, @Param("buildingId") String buildingId,@Param("cityId") int cityId);
28 28
 
29 29
     /**
30 30
      * 详情

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TaBuildingIntentionMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TaBuildingIntention;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 项目意向表  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-07
15
+ */
16
+@Mapper
17
+public interface TaBuildingIntentionMapper extends BaseMapper<TaBuildingIntention> {
18
+
19
+}

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TaEventPropertiesMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TaEventProperties;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 事件属性字典  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-06
15
+ */
16
+@Mapper
17
+public interface TaEventPropertiesMapper extends BaseMapper<TaEventProperties> {
18
+
19
+}

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TaPersonIntentionRecordMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TaPersonIntentionRecord;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 用户意向流水  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-07
15
+ */
16
+@Mapper
17
+public interface TaPersonIntentionRecordMapper extends BaseMapper<TaPersonIntentionRecord> {
18
+
19
+}

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TdBizEventMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TdBizEvent;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 事件字典  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-06
15
+ */
16
+@Mapper
17
+public interface TdBizEventMapper extends BaseMapper<TdBizEvent> {
18
+
19
+}

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TdBizEventTypeMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TdBizEventType;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 事件类型字典  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-08-06
15
+ */
16
+@Mapper
17
+public interface TdBizEventTypeMapper extends BaseMapper<TdBizEventType> {
18
+
19
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/mapper/TdCityMapper.java 查看文件

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.huiju.estateagents.entity.TdCity;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ *  Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-08-07
18
+ */
19
+@Mapper
20
+public interface TdCityMapper extends BaseMapper<TdCity> {
21
+    List<TdCity> selectCity(@Param("leveltype")String leveltype);
22
+
23
+}

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaBuildingDynamicService.java 查看文件

@@ -22,7 +22,7 @@ public interface ITaBuildingDynamicService extends IService<TaBuildingDynamic> {
22 22
      * 项目动态管理列表
23 23
      * @return
24 24
      */
25
-    ResponseBean iBuildingDynamicList(Integer pageNum, Integer pageSize, String name, String buildingId);
25
+    ResponseBean iBuildingDynamicList(Integer pageNum, Integer pageSize, String name, String buildingId,int cityId);
26 26
 
27 27
     /**
28 28
      * 项目详情

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITaBuildingIntentionService.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TaBuildingIntention;
6
+
7
+/**
8
+ * <p>
9
+ * 项目意向表  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-08-07
14
+ */
15
+public interface ITaBuildingIntentionService extends IService<TaBuildingIntention> {
16
+
17
+}

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaBuildingService.java 查看文件

@@ -107,7 +107,7 @@ public interface ITaBuildingService extends IService<TaBuilding> {
107 107
      * @param pageSize
108 108
      * @param name
109 109
      */
110
-    ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets);
110
+    ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets,int cityId);
111 111
 
112 112
     /**
113 113
      * 微信小程序 楼盘列表

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITaEventPropertiesService.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TaEventProperties;
6
+
7
+/**
8
+ * <p>
9
+ * 事件属性字典  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-08-06
14
+ */
15
+public interface ITaEventPropertiesService extends IService<TaEventProperties> {
16
+
17
+}

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaNewsService.java 查看文件

@@ -70,5 +70,5 @@ public interface ITaNewsService extends IService<TaNews> {
70 70
      */
71 71
     ResponseBean wxTaPvNum(Integer id);
72 72
 
73
-    IPage<TaNews> getWxList(Integer pageNum, Integer pageSize, String buildingId, List<String> targets);
73
+    IPage<TaNews> getWxList(Integer pageNum, Integer pageSize, String buildingId, List<String> targets,int cityId);
74 74
 }

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITaPersonIntentionRecordService.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TaPersonIntentionRecord;
6
+
7
+/**
8
+ * <p>
9
+ * 用户意向流水  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-08-07
14
+ */
15
+public interface ITaPersonIntentionRecordService extends IService<TaPersonIntentionRecord> {
16
+
17
+}

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITdBizEventService.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TdBizEvent;
6
+
7
+/**
8
+ * <p>
9
+ * 事件字典  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-08-06
14
+ */
15
+public interface ITdBizEventService extends IService<TdBizEvent> {
16
+
17
+}

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITdBizEventTypeService.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TdBizEventType;
6
+
7
+/**
8
+ * <p>
9
+ * 事件类型字典  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-08-06
14
+ */
15
+public interface ITdBizEventTypeService extends IService<TdBizEventType> {
16
+
17
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/service/ITdCityService.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.huiju.estateagents.entity.TdCity;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ *  服务类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-07
16
+ */
17
+public interface ITdCityService extends IService<TdCity> {
18
+    List<TdCity> selectCity(String leveltype);
19
+
20
+}

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java 查看文件

@@ -64,12 +64,12 @@ public class TaBuildingDynamicServiceImpl extends ServiceImpl<TaBuildingDynamicM
64 64
         binder.registerCustomEditor(Date.class, editor);
65 65
     }
66 66
     @Override
67
-    public ResponseBean iBuildingDynamicList(Integer pageNum, Integer pageSize, String name, String buildingId) {
67
+    public ResponseBean iBuildingDynamicList(Integer pageNum, Integer pageSize, String name, String buildingId,int cityId) {
68 68
         Page<TaBuildingDynamic> page = new Page<>();
69 69
         page.setSize(pageSize == null ? 10 : pageSize);
70 70
         page.setCurrent(pageNum == null ? 1 : pageNum);
71 71
 
72
-        IPage<TaBuildingDynamic> buildingDynamic = buildingDynamicMapper.buildingDynamicList(page, name, buildingId);
72
+        IPage<TaBuildingDynamic> buildingDynamic = buildingDynamicMapper.buildingDynamicList(page, name, buildingId,cityId);
73 73
         List<TaBuildingDynamic> buildingDynamicList = buildingDynamic.getRecords();
74 74
         for (TaBuildingDynamic taBuildingDynamic:buildingDynamicList){
75 75
             QueryWrapper<TaActivityDynamicEnlist> taActivityDynamicEnlist= new QueryWrapper<>();

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingIntentionServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.entity.TaBuildingIntention;
5
+import com.huiju.estateagents.mapper.TaBuildingIntentionMapper;
6
+import com.huiju.estateagents.service.ITaBuildingIntentionService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 项目意向表  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-07
16
+ */
17
+@Service
18
+public class TaBuildingIntentionServiceImpl extends ServiceImpl<TaBuildingIntentionMapper, TaBuildingIntention> implements ITaBuildingIntentionService {
19
+
20
+}

+ 2
- 1
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java 查看文件

@@ -311,12 +311,13 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
311 311
     }
312 312
 
313 313
     @Override
314
-    public ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets) {
314
+    public ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets,int cityId) {
315 315
         IPage<TaBuilding> page = new Page<>(pageNum, pageSize);
316 316
 
317 317
         QueryWrapper<TaBuilding> buildingQueryWrapper = new QueryWrapper<>();
318 318
         buildingQueryWrapper.nested(null != name && !"".equals(name.trim()), i -> i.like("name", name).or().like("building_name", name));
319 319
         buildingQueryWrapper.eq("status", 1);
320
+        buildingQueryWrapper.eq(cityId != 0,"city_id",cityId);
320 321
         buildingQueryWrapper.in(null != targets && targets.size() > 0, "building_id", targets);
321 322
 //        buildingQueryWrapper.like(null != name && !"".equals(name.trim()), "name", name);
322 323
         buildingQueryWrapper.orderByAsc("order_no");

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TaEventPropertiesServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.entity.TaEventProperties;
5
+import com.huiju.estateagents.mapper.TaEventPropertiesMapper;
6
+import com.huiju.estateagents.service.ITaEventPropertiesService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 事件属性字典  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-06
16
+ */
17
+@Service
18
+public class TaEventPropertiesServiceImpl extends ServiceImpl<TaEventPropertiesMapper, TaEventProperties> implements ITaEventPropertiesService {
19
+
20
+}

+ 2
- 1
src/main/java/com/huiju/estateagents/service/impl/TaNewsServiceImpl.java 查看文件

@@ -182,12 +182,13 @@ public class TaNewsServiceImpl extends ServiceImpl<TaNewsMapper, TaNews> impleme
182 182
     }
183 183
 
184 184
     @Override
185
-    public IPage<TaNews> getWxList(Integer pageNum, Integer pageSize, String buildingId, List<String> targets) {
185
+    public IPage<TaNews> getWxList(Integer pageNum, Integer pageSize, String buildingId, List<String> targets,int cityId) {
186 186
         IPage<TaNews> page = new Page<>(pageNum, pageSize);
187 187
 
188 188
         QueryWrapper<TaNews> taNewsQueryWrapper = new QueryWrapper<>();
189 189
         taNewsQueryWrapper.eq(!StringUtils.isEmpty(buildingId), "building_id", buildingId);
190 190
         taNewsQueryWrapper.in(null != targets && targets.size() > 0, "news_id", targets);
191
+        taNewsQueryWrapper.eq(cityId != 0,"city_id",cityId);
191 192
         taNewsQueryWrapper.eq("status", 1);
192 193
         taNewsQueryWrapper.orderByDesc("create_date");
193 194
         IPage<TaNews> taNewsIPage = this.page(page, taNewsQueryWrapper);

+ 21
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonIntentionRecordServiceImpl.java 查看文件

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5
+import com.huiju.estateagents.entity.TaPersonIntentionRecord;
6
+import com.huiju.estateagents.mapper.TaPersonIntentionRecordMapper;
7
+import com.huiju.estateagents.service.ITaPersonIntentionRecordService;
8
+import org.springframework.stereotype.Service;
9
+
10
+/**
11
+ * <p>
12
+ * 用户意向流水  服务实现类
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-08-07
17
+ */
18
+@Service
19
+public class TaPersonIntentionRecordServiceImpl extends ServiceImpl<TaPersonIntentionRecordMapper, TaPersonIntentionRecord> implements ITaPersonIntentionRecordService {
20
+
21
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TdBizEventServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.entity.TdBizEvent;
5
+import com.huiju.estateagents.mapper.TdBizEventMapper;
6
+import com.huiju.estateagents.service.ITdBizEventService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 事件字典  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-06
16
+ */
17
+@Service
18
+public class TdBizEventServiceImpl extends ServiceImpl<TdBizEventMapper, TdBizEvent> implements ITdBizEventService {
19
+
20
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TdBizEventTypeServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.entity.TdBizEventType;
5
+import com.huiju.estateagents.mapper.TdBizEventTypeMapper;
6
+import com.huiju.estateagents.service.ITdBizEventTypeService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 事件类型字典  服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-08-06
16
+ */
17
+@Service
18
+public class TdBizEventTypeServiceImpl extends ServiceImpl<TdBizEventTypeMapper, TdBizEventType> implements ITdBizEventTypeService {
19
+
20
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/service/impl/TdCityServiceImpl.java 查看文件

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.entity.TdCity;
5
+import com.huiju.estateagents.mapper.TdCityMapper;
6
+import com.huiju.estateagents.service.ITdCityService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ *  服务实现类
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-08-07
19
+ */
20
+@Service
21
+public class TdCityServiceImpl extends ServiceImpl<TdCityMapper, TdCity> implements ITdCityService {
22
+    @Autowired
23
+    TdCityMapper tdCityMapper;
24
+
25
+    public List<TdCity> selectCity(String leveltype){
26
+        return tdCityMapper.selectCity(leveltype);
27
+    }
28
+
29
+}

+ 3
- 0
src/main/resources/mapper/TaBuildingDynamicMapper.xml 查看文件

@@ -24,6 +24,9 @@
24 24
         <if test="buildingId != null and buildingId !=''">
25 25
             and building_id = #{buildingId}
26 26
         </if>
27
+        <if test="cityId != 0">
28
+            and city_id = #{cityId}
29
+        </if>
27 30
         ORDER BY create_date DESC
28 31
   </select>
29 32
 

+ 5
- 0
src/main/resources/mapper/TaBuildingIntentionMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TaBuildingIntentionMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaEventPropertiesMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TaEventPropertiesMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TaPersonIntentionRecordMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TdBizEventMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.TdBizEventMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TdBizEventTypeMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TdBizEventTypeMapper">
4
+
5
+</mapper>

+ 20
- 0
src/main/resources/mapper/TdCityMapper.xml 查看文件

@@ -0,0 +1,20 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.mapper.TdCityMapper">
4
+    <select id="selectCity" resultType="com.huiju.estateagents.entity.TdCity">
5
+        SELECT
6
+	*,
7
+	LEFT(pinyin,1) AS initial
8
+FROM
9
+	td_city
10
+	<where>
11
+        <if test="leveltype != '' and leveltype != null">
12
+            leveltype = #{leveltype}
13
+        </if>
14
+    </where>
15
+ORDER BY
16
+	pinyin
17
+    </select>
18
+    
19
+
20
+</mapper>