|
@@ -5,6 +5,7 @@ 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.entity.TaBuildingIntention;
|
|
8
|
+import com.huiju.estateagents.entity.TdBizEvent;
|
8
|
9
|
import com.huiju.estateagents.service.ITaBuildingIntentionService;
|
9
|
10
|
import org.slf4j.Logger;
|
10
|
11
|
import org.slf4j.LoggerFactory;
|
|
@@ -18,6 +19,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
18
|
19
|
import org.springframework.web.bind.annotation.RestController;
|
19
|
20
|
import com.huiju.estateagents.base.BaseController;
|
20
|
21
|
|
|
22
|
+import java.util.List;
|
|
23
|
+
|
21
|
24
|
/**
|
22
|
25
|
* <p>
|
23
|
26
|
* 项目意向表 前端控制器
|
|
@@ -27,7 +30,7 @@ import com.huiju.estateagents.base.BaseController;
|
27
|
30
|
* @since 2019-08-07
|
28
|
31
|
*/
|
29
|
32
|
@RestController
|
30
|
|
-@RequestMapping("/")
|
|
33
|
+@RequestMapping("/api")
|
31
|
34
|
public class TaBuildingIntentionController extends BaseController {
|
32
|
35
|
|
33
|
36
|
private final Logger logger = LoggerFactory.getLogger(TaBuildingIntentionController.class);
|
|
@@ -42,7 +45,7 @@ public class TaBuildingIntentionController extends BaseController {
|
42
|
45
|
* @param pageSize
|
43
|
46
|
* @return
|
44
|
47
|
*/
|
45
|
|
- @RequestMapping(value="/taBuildingIntention",method= RequestMethod.GET)
|
|
48
|
+ @RequestMapping(value="/admin/taBuildingIntention",method= RequestMethod.GET)
|
46
|
49
|
public ResponseBean taBuildingIntentionList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
47
|
50
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
48
|
51
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -66,7 +69,7 @@ public class TaBuildingIntentionController extends BaseController {
|
66
|
69
|
* @param taBuildingIntention 实体对象
|
67
|
70
|
* @return
|
68
|
71
|
*/
|
69
|
|
- @RequestMapping(value="/taBuildingIntention",method= RequestMethod.POST)
|
|
72
|
+ @RequestMapping(value="/admin/taBuildingIntention",method= RequestMethod.POST)
|
70
|
73
|
public ResponseBean taBuildingIntentionAdd(@RequestBody TaBuildingIntention taBuildingIntention){
|
71
|
74
|
ResponseBean responseBean = new ResponseBean();
|
72
|
75
|
try {
|
|
@@ -82,12 +85,26 @@ public class TaBuildingIntentionController extends BaseController {
|
82
|
85
|
return responseBean;
|
83
|
86
|
}
|
84
|
87
|
|
|
88
|
+
|
|
89
|
+ /**
|
|
90
|
+ * 批量 保存 或者 修改 对象 意向值和列表
|
|
91
|
+ * @param tdBizEventList 实体对象集合
|
|
92
|
+ * @return
|
|
93
|
+ */
|
|
94
|
+ @RequestMapping(value="/admin/taBuildingIntentionAddOrUpdate/{buildingId}",method= RequestMethod.POST)
|
|
95
|
+ public ResponseBean taBuildingIntentionAddOrUpdate(@RequestBody List<TdBizEvent> tdBizEventList, @PathVariable String buildingId){
|
|
96
|
+ ResponseBean responseBean = new ResponseBean();
|
|
97
|
+ responseBean = iTaBuildingIntentionService.taBuildingIntentionAddOrUpdate(tdBizEventList, buildingId);
|
|
98
|
+ return responseBean;
|
|
99
|
+ }
|
|
100
|
+
|
|
101
|
+
|
85
|
102
|
/**
|
86
|
103
|
* 根据id删除对象
|
87
|
104
|
* @param id 实体ID
|
88
|
105
|
*/
|
89
|
106
|
@ResponseBody
|
90
|
|
- @RequestMapping(value="/taBuildingIntention/{id}", method= RequestMethod.DELETE)
|
|
107
|
+ @RequestMapping(value="/admin/taBuildingIntention/{id}", method= RequestMethod.DELETE)
|
91
|
108
|
public ResponseBean taBuildingIntentionDelete(@PathVariable Integer id){
|
92
|
109
|
ResponseBean responseBean = new ResponseBean();
|
93
|
110
|
try {
|
|
@@ -109,7 +126,7 @@ public class TaBuildingIntentionController extends BaseController {
|
109
|
126
|
* @param taBuildingIntention 实体对象
|
110
|
127
|
* @return
|
111
|
128
|
*/
|
112
|
|
- @RequestMapping(value="/taBuildingIntention/{id}",method= RequestMethod.PUT)
|
|
129
|
+ @RequestMapping(value="/admin/taBuildingIntention/{id}",method= RequestMethod.PUT)
|
113
|
130
|
public ResponseBean taBuildingIntentionUpdate(@PathVariable Integer id,
|
114
|
131
|
@RequestBody TaBuildingIntention taBuildingIntention){
|
115
|
132
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -130,7 +147,7 @@ public class TaBuildingIntentionController extends BaseController {
|
130
|
147
|
* 根据id查询对象
|
131
|
148
|
* @param id 实体ID
|
132
|
149
|
*/
|
133
|
|
- @RequestMapping(value="/taBuildingIntention/{id}",method= RequestMethod.GET)
|
|
150
|
+ @RequestMapping(value="/admin/taBuildingIntention/{id}",method= RequestMethod.GET)
|
134
|
151
|
public ResponseBean taBuildingIntentionGet(@PathVariable Integer id){
|
135
|
152
|
ResponseBean responseBean = new ResponseBean();
|
136
|
153
|
try {
|