|
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
6
|
6
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
7
|
7
|
import com.huiju.estateagents.base.BaseController;
|
8
|
8
|
import com.huiju.estateagents.base.ResponseBean;
|
9
|
|
-
|
|
9
|
+import io.swagger.annotations.ApiOperation;
|
10
|
10
|
import com.huiju.estateagents.common.JWTUtils;
|
11
|
11
|
import com.huiju.estateagents.common.StringUtils;
|
12
|
12
|
import com.huiju.estateagents.entity.TaChannel;
|
|
@@ -14,6 +14,9 @@ import com.huiju.estateagents.entity.TaPerson;
|
14
|
14
|
import com.huiju.estateagents.mapper.TaChannelMapper;
|
15
|
15
|
import com.huiju.estateagents.service.ITaPersonService;
|
16
|
16
|
import com.huiju.estateagents.service.TaChannelService;
|
|
17
|
+import io.swagger.annotations.Api;
|
|
18
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
19
|
+import io.swagger.annotations.ApiImplicitParams;
|
17
|
20
|
import org.apache.http.HttpRequest;
|
18
|
21
|
import org.slf4j.Logger;
|
19
|
22
|
import org.slf4j.LoggerFactory;
|
|
@@ -41,6 +44,7 @@ import java.util.List;
|
41
|
44
|
*/
|
42
|
45
|
@RestController
|
43
|
46
|
@RequestMapping("/api")
|
|
47
|
+@Api(value = "渠道管理", tags = "渠道管理")
|
44
|
48
|
public class TaChannelController extends BaseController {
|
45
|
49
|
|
46
|
50
|
private final Logger logger = LoggerFactory.getLogger(TaChannelController.class);
|
|
@@ -56,11 +60,17 @@ public class TaChannelController extends BaseController {
|
56
|
60
|
|
57
|
61
|
|
58
|
62
|
/**
|
59
|
|
- * 分页查询列表
|
|
63
|
+ * 渠道管理列表
|
60
|
64
|
* @param pageNum
|
61
|
65
|
* @param pageSize
|
62
|
66
|
* @return
|
63
|
67
|
*/
|
|
68
|
+ @ApiOperation(value = "渠道管理列表", notes = "渠道管理列表")
|
|
69
|
+ @ApiImplicitParams({
|
|
70
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
|
|
71
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
|
|
72
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "channelId", paramType = "query",value = "渠道Id"),
|
|
73
|
+ })
|
64
|
74
|
@RequestMapping(value="/admin/channel",method= RequestMethod.GET)
|
65
|
75
|
public ResponseBean channelList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
66
|
76
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
@@ -87,10 +97,14 @@ public class TaChannelController extends BaseController {
|
87
|
97
|
}
|
88
|
98
|
|
89
|
99
|
/**
|
90
|
|
- * 保存对象
|
|
100
|
+ * 渠道保存
|
91
|
101
|
* @param channel 实体对象
|
92
|
102
|
* @return
|
93
|
103
|
*/
|
|
104
|
+ @ApiOperation(value = "渠道保存", notes = "渠道保存")
|
|
105
|
+ @ApiImplicitParams({
|
|
106
|
+ @ApiImplicitParam(dataTypeClass = TaChannel.class, name = "channel", paramType = "body",value = "当前对象"),
|
|
107
|
+ })
|
94
|
108
|
@RequestMapping(value="/admin/channel",method= RequestMethod.POST)
|
95
|
109
|
public ResponseBean channelAdd(@RequestBody TaChannel channel ,HttpServletRequest request){
|
96
|
110
|
Integer orgId = getOrgId(request);
|
|
@@ -117,6 +131,10 @@ public class TaChannelController extends BaseController {
|
117
|
131
|
* 根据id删除对象
|
118
|
132
|
* @param id 实体ID
|
119
|
133
|
*/
|
|
134
|
+ @ApiOperation(value = "根据渠道ID删除", notes = "根据渠道ID删除")
|
|
135
|
+ @ApiImplicitParams({
|
|
136
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "query",value = "渠道id"),
|
|
137
|
+ })
|
120
|
138
|
@ResponseBody
|
121
|
139
|
@RequestMapping(value="/channel/{id}", method= RequestMethod.DELETE)
|
122
|
140
|
public ResponseBean channelDelete(@PathVariable Integer id){
|
|
@@ -141,6 +159,10 @@ public class TaChannelController extends BaseController {
|
141
|
159
|
* @param channel 实体对象
|
142
|
160
|
* @return
|
143
|
161
|
*/
|
|
162
|
+ @ApiOperation(value = "根据渠道ID修改", notes = "根据渠道ID修改")
|
|
163
|
+ @ApiImplicitParams({
|
|
164
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "query",value = "渠道id"),
|
|
165
|
+ })
|
144
|
166
|
@RequestMapping(value="/admin/channel/{id}",method= RequestMethod.PUT)
|
145
|
167
|
public ResponseBean channelUpdate(@PathVariable Integer id,
|
146
|
168
|
@RequestBody TaChannel channel){
|
|
@@ -164,6 +186,10 @@ public class TaChannelController extends BaseController {
|
164
|
186
|
* 根据id查询对象
|
165
|
187
|
* @param id 实体ID
|
166
|
188
|
*/
|
|
189
|
+ @ApiOperation(value = "根据渠道ID查询", notes = "根据渠道ID查询")
|
|
190
|
+ @ApiImplicitParams({
|
|
191
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "query",value = "渠道id"),
|
|
192
|
+ })
|
167
|
193
|
@RequestMapping(value="/admin/channel/{id}",method= RequestMethod.GET)
|
168
|
194
|
public ResponseBean channelGet(@PathVariable Integer id){
|
169
|
195
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -180,6 +206,14 @@ public class TaChannelController extends BaseController {
|
180
|
206
|
/**
|
181
|
207
|
* 渠道管理下的经纪人
|
182
|
208
|
*/
|
|
209
|
+ @ApiOperation(value = "渠道管理下的经纪人", notes = "渠道管理下的经纪人")
|
|
210
|
+ @ApiImplicitParams({
|
|
211
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "name", paramType = "query",value = "姓名"),
|
|
212
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "phone", paramType = "query",value = "电话"),
|
|
213
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "channelId", paramType = "query",value = "渠道id"),
|
|
214
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "多少页"),
|
|
215
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "每页多少条"),
|
|
216
|
+ })
|
183
|
217
|
@RequestMapping(value="/admin/channel/broker",method= RequestMethod.GET)
|
184
|
218
|
public ResponseBean channelBrokerList(@RequestParam(value="name",required = false) String name,
|
185
|
219
|
@RequestParam(value="phone",required = false) String phone,
|
|
@@ -195,6 +229,14 @@ public class TaChannelController extends BaseController {
|
195
|
229
|
/**
|
196
|
230
|
* 渠道邀请经纪人
|
197
|
231
|
*/
|
|
232
|
+ @ApiOperation(value = "渠道邀请经纪人", notes = "渠道邀请经纪人")
|
|
233
|
+ @ApiImplicitParams({
|
|
234
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "id", paramType = "query",value = "姓名"),
|
|
235
|
+ @ApiImplicitParam(dataTypeClass = String.class, name = "phone", paramType = "query",value = "电话"),
|
|
236
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "channelId", paramType = "query",value = "渠道id"),
|
|
237
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "多少页"),
|
|
238
|
+ @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "每页多少条"),
|
|
239
|
+ })
|
198
|
240
|
@RequestMapping(value="/admin/channel/InviteClientsList",method= RequestMethod.GET)
|
199
|
241
|
public ResponseBean InviteClientsList(@RequestParam(value="id",required = false) String id,
|
200
|
242
|
@RequestParam(value="phone",required = false) String phone,
|