Parcourir la source

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

胡轶钦 il y a 5 ans
Parent
révision
d79f25b25d
20 fichiers modifiés avec 715 ajouts et 26 suppressions
  1. 5
    1
      src/main/java/com/huiju/estateagents/center/taUser/entity/TaUser.java
  2. 42
    0
      src/main/java/com/huiju/estateagents/controller/ExtendContentController.java
  3. 60
    1
      src/main/java/com/huiju/estateagents/controller/TaBuildingController.java
  4. 90
    20
      src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java
  5. 45
    3
      src/main/java/com/huiju/estateagents/controller/TaChannelController.java
  6. 45
    0
      src/main/java/com/huiju/estateagents/controller/TaGoodsController.java
  7. 38
    0
      src/main/java/com/huiju/estateagents/controller/TaPolicyController.java
  8. 149
    0
      src/main/java/com/huiju/estateagents/controller/TaSharePersonFromController.java
  9. 38
    0
      src/main/java/com/huiju/estateagents/controller/TdBuildingTypeController.java
  10. 32
    1
      src/main/java/com/huiju/estateagents/controller/TdPointsRulesController.java
  11. 10
    0
      src/main/java/com/huiju/estateagents/controller/TdReportController.java
  12. 5
    0
      src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java
  13. 74
    0
      src/main/java/com/huiju/estateagents/entity/TaSharePersonFrom.java
  14. 7
    0
      src/main/java/com/huiju/estateagents/mapper/TaBuildingMapper.java
  15. 18
    0
      src/main/java/com/huiju/estateagents/mapper/TaSharePersonFromMapper.java
  16. 16
    0
      src/main/java/com/huiju/estateagents/service/ITaSharePersonFromService.java
  17. 1
    0
      src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java
  18. 20
    0
      src/main/java/com/huiju/estateagents/service/impl/TaSharePersonFromServiceImpl.java
  19. 15
    0
      src/main/resources/mapper/TaBuildingMapper.xml
  20. 5
    0
      src/main/resources/mapper/TaSharePersonFromMapper.xml

+ 5
- 1
src/main/java/com/huiju/estateagents/center/taUser/entity/TaUser.java Voir le fichier

@@ -115,7 +115,11 @@ public class TaUser implements Serializable {
115 115
     private String address;
116 116
     private String photo;
117 117
     private String description;
118
-
118
+    
119
+    /**
120
+     * 是否置业顾问
121
+     */
122
+    private Boolean isConsultant;
119 123
 
120 124
     /**
121 125
      * 公司水印

+ 42
- 0
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java Voir le fichier

@@ -10,6 +10,10 @@ import com.huiju.estateagents.entity.TaBuildingDynamic;
10 10
 import com.huiju.estateagents.service.IExtendContentService;
11 11
 import com.huiju.estateagents.service.ITaBuildingDynamicService;
12 12
 import com.huiju.estateagents.service.ITaBuildingService;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
13 17
 import org.apache.commons.lang3.StringUtils;
14 18
 import org.slf4j.Logger;
15 19
 import org.slf4j.LoggerFactory;
@@ -35,6 +39,7 @@ import java.time.LocalDateTime;
35 39
  */
36 40
 @RestController
37 41
 @RequestMapping("/api")
42
+@Api(value = "轮播图", tags = "轮播图")
38 43
 public class ExtendContentController extends BaseController {
39 44
 
40 45
     private final Logger logger = LoggerFactory.getLogger(ExtendContentController.class);
@@ -54,6 +59,16 @@ public class ExtendContentController extends BaseController {
54 59
      * @param pageSize
55 60
      * @return
56 61
      */
62
+    @ApiOperation(value = "后台轮播图列表", notes = "后台轮播图列表")
63
+    @ApiImplicitParams({
64
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
65
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
66
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
67
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentType", paramType = "query",value = "内容类型"),
68
+            @ApiImplicitParam(dataTypeClass = String.class, name = "showPosition", paramType = "query",value = "发布位置"),
69
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "status", paramType = "query",value = "状态"),
70
+            @ApiImplicitParam(dataTypeClass = String.class, name = "showType", paramType = "query",value = "发布类型")
71
+    })
57 72
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.GET)
58 73
     public ResponseBean extendContentList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
59 74
                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -80,6 +95,16 @@ public class ExtendContentController extends BaseController {
80 95
     /**
81 96
      * 微信 开屏 / 轮播图
82 97
      */
98
+    @ApiOperation(value = "微信轮播图列表", notes = "微信轮播图列表")
99
+    @ApiImplicitParams({
100
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
101
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
102
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
103
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentType", paramType = "query",value = "内容类型"),
104
+            @ApiImplicitParam(dataTypeClass = String.class, name = "targetId", paramType = "query",value = ""),
105
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentId", paramType = "query",value = "内容ID"),
106
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
107
+    })
83 108
     @RequestMapping(value="/wx/extendContent/{showType}",method= RequestMethod.GET)
84 109
     public ResponseBean extendContentListShowType(@PathVariable(value = "showType") String showType,
85 110
                                                   @RequestParam(value = "showPosition", required = false) String showPosition,
@@ -99,6 +124,10 @@ public class ExtendContentController extends BaseController {
99 124
      * @param extendContent 实体对象
100 125
      * @return
101 126
      */
127
+    @ApiOperation(value = "后台轮播图保存", notes = "后台轮播图保存")
128
+    @ApiImplicitParams({
129
+            @ApiImplicitParam(dataType = "ExtendContent", name = "extendContent", paramType = "body",value = "轮播图内容")
130
+    })
102 131
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
103 132
     public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent, HttpServletRequest request){
104 133
         Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
@@ -114,6 +143,10 @@ public class ExtendContentController extends BaseController {
114 143
      * 根据id删除对象
115 144
      * @param id  实体ID
116 145
      */
146
+    @ApiOperation(value = "后台轮播图删除", notes = "后台轮播图删除")
147
+    @ApiImplicitParams({
148
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
149
+    })
117 150
     @ResponseBody
118 151
     @RequestMapping(value="/admin/extendContent/{id}", method= RequestMethod.DELETE)
119 152
     public ResponseBean extendContentDelete(@PathVariable Integer id){
@@ -138,6 +171,11 @@ public class ExtendContentController extends BaseController {
138 171
      * @param extendContent 实体对象
139 172
      * @return
140 173
      */
174
+    @ApiOperation(value = "后台轮播图保存", notes = "后台轮播图保存")
175
+    @ApiImplicitParams({
176
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id"),
177
+            @ApiImplicitParam(dataType = "ExtendContent", name = "extendContent", paramType = "body",value = "轮播图内容")
178
+    })
141 179
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.PUT)
142 180
     public ResponseBean extendContentUpdate(@PathVariable Integer id,
143 181
                                         @RequestBody ExtendContent extendContent,HttpServletRequest request){
@@ -164,6 +202,10 @@ public class ExtendContentController extends BaseController {
164 202
      * 根据id查询对象
165 203
      * @param id  实体ID
166 204
      */
205
+    @ApiOperation(value = "后台轮播图查询", notes = "后台轮播图查询")
206
+    @ApiImplicitParams({
207
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
208
+    })
167 209
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.GET)
168 210
     public ResponseBean extendContentGet(@PathVariable Integer id){
169 211
         ResponseBean responseBean = new ResponseBean();

+ 60
- 1
src/main/java/com/huiju/estateagents/controller/TaBuildingController.java Voir le fichier

@@ -11,6 +11,10 @@ import com.huiju.estateagents.service.ITaBuildingService;
11 11
 import com.huiju.estateagents.service.ITaPersonService;
12 12
 import com.huiju.estateagents.service.ITaSaveService;
13 13
 import com.huiju.estateagents.service.ITdCityService;
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiImplicitParam;
16
+import io.swagger.annotations.ApiImplicitParams;
17
+import io.swagger.annotations.ApiOperation;
14 18
 import org.apache.ibatis.annotations.Param;
15 19
 import org.springframework.beans.factory.annotation.Autowired;
16 20
 import org.springframework.format.annotation.DateTimeFormat;
@@ -35,6 +39,7 @@ import java.util.Map;
35 39
  */
36 40
 @RestController
37 41
 @RequestMapping("/api")
42
+@Api(value = "楼盘")
38 43
 public class TaBuildingController extends BaseController {
39 44
 
40 45
     @Autowired
@@ -53,6 +58,10 @@ public class TaBuildingController extends BaseController {
53 58
      * @return
54 59
      */
55 60
     @GetMapping("/admin/buildingSelectId/{id}")
61
+    @ApiOperation(value = "项目详情", notes = "项目详情")
62
+    @ApiImplicitParams({
63
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "项目id")
64
+    })
56 65
     public ResponseBean buildingSelectId(@PathVariable(value = "id") String id){
57 66
         return taBuildingService.buildingSelectId(id);
58 67
     }
@@ -65,6 +74,18 @@ public class TaBuildingController extends BaseController {
65 74
      * @param code
66 75
      * @return
67 76
      */
77
+    @ApiOperation(value = "项目列表 查询所有有效的", notes = "项目列表 查询所有有效的")
78
+    @ApiImplicitParams({
79
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageNum", value = "第几页"),
80
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageSize", value = "一页多少行"),
81
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "name", value = "项目名称"),
82
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "code", value = "项目编号"),
83
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "startDate", value = "开盘时间"),
84
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "buildingStatus", value = "项目状态"),
85
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "marketStatus", value = "销售状态"),
86
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "cityId", value = "城市Id"),
87
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "isMain", value = "是否主推项目"),
88
+    })
68 89
     @GetMapping("/admin/buildinglist")
69 90
     public ResponseBean buildingList(@RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
70 91
                                      @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize,
@@ -87,6 +108,18 @@ public class TaBuildingController extends BaseController {
87 108
      * @param code
88 109
      * @return
89 110
      */
111
+    @ApiOperation(value = "项目列表", notes = "项目列表")
112
+    @ApiImplicitParams({
113
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageNum", value = "第几页"),
114
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageSize", value = "一页多少行"),
115
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "name", value = "项目名称"),
116
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "code", value = "项目编号"),
117
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "startDate", value = "开盘时间"),
118
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "buildingStatus", value = "项目状态"),
119
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "marketStatus", value = "销售状态"),
120
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "cityId", value = "城市Id"),
121
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "isMain", value = "是否主推项目"),
122
+    })
90 123
     @GetMapping("/admin/buildinglist/select")
91 124
     public ResponseBean buildingListSelect(@RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
92 125
                                      @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize,
@@ -106,6 +139,10 @@ public class TaBuildingController extends BaseController {
106 139
      * @param parameter
107 140
      * @return
108 141
      */
142
+    @ApiOperation(value = "更新项目", notes = "更新项目")
143
+    @ApiImplicitParams({
144
+
145
+    })
109 146
     @PutMapping("/admin/building/update")
110 147
     public ResponseBean buildingUpdate(@RequestBody String parameter, HttpServletRequest request){
111 148
         return taBuildingService.buildingUpdate(parameter, getOrgId(request));
@@ -116,6 +153,10 @@ public class TaBuildingController extends BaseController {
116 153
      * @param parameter
117 154
      * @return
118 155
      */
156
+    @ApiOperation(value = "项目添加", notes = "项目添加")
157
+    @ApiImplicitParams({
158
+
159
+    })
119 160
     @RequestMapping(value = "/admin/building/add", method = RequestMethod.POST)
120 161
     public ResponseBean buildingAdd(@RequestBody String parameter, HttpServletRequest request){
121 162
         return taBuildingService.buildingAdd(parameter, getOrgId(request));
@@ -126,6 +167,10 @@ public class TaBuildingController extends BaseController {
126 167
      * @param parameter
127 168
      * @return
128 169
      */
170
+    @ApiOperation(value = "项目发布", notes = "项目发布")
171
+    @ApiImplicitParams({
172
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "status:状态,id:项目id"),
173
+    })
129 174
     @RequestMapping(value = "/admin/building/update/status", method = RequestMethod.PUT)
130 175
     public ResponseBean buildingUpdateStatus(@RequestBody String parameter, HttpServletRequest request){
131 176
         return taBuildingService.buildingUpdateStatus(parameter, getOrgId(request));
@@ -137,6 +182,10 @@ public class TaBuildingController extends BaseController {
137 182
      * @param request
138 183
      * @return
139 184
      */
185
+    @ApiOperation(value = "项目发布", notes = "项目发布")
186
+    @ApiImplicitParams({
187
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "项目id"),
188
+    })
140 189
     @RequestMapping(value = "/admin/building/delete/{id}", method = RequestMethod.DELETE)
141 190
     public ResponseBean buildingdelete(@PathVariable("id") String id, HttpServletRequest request){
142 191
         return taBuildingService.buildingdelete(id, getOrgId(request));
@@ -148,6 +197,7 @@ public class TaBuildingController extends BaseController {
148 197
      * @param session
149 198
      * @return
150 199
      */
200
+    @ApiOperation(value = "添加户型", notes = "添加户型")
151 201
     @RequestMapping(value = "/admin/buildingApartment/add", method = RequestMethod.POST)
152 202
     public ResponseBean buildingApartment(@RequestBody String parameter, HttpSession session){
153 203
         return taBuildingService.buildingApartmentAdd(parameter);
@@ -158,16 +208,21 @@ public class TaBuildingController extends BaseController {
158 208
      * @param parameter
159 209
      * @return
160 210
      */
211
+    @ApiOperation(value = "户型编辑", notes = "户型编辑")
161 212
     @RequestMapping(value = "/admin/buildingApartment/update", method = RequestMethod.PUT)
162 213
     public ResponseBean buildingApartmentUpdate(@RequestBody String parameter){
163 214
         return taBuildingService.buildingApartmentUpdate(parameter);
164 215
     }
165 216
 
166 217
     /**
167
-     * 楼盘详情
218
+     * 户型详情
168 219
      * @param id
169 220
      * @return
170 221
      */
222
+    @ApiOperation(value = "户型详情", notes = "户型详情")
223
+    @ApiImplicitParams({
224
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "户型id"),
225
+    })
171 226
     @RequestMapping(value = "/admin/buildingApartment/{id}", method = RequestMethod.GET)
172 227
     public ResponseBean buildingApartmentSelectId(@PathVariable(value = "id") String id){
173 228
         return taBuildingService.buildingApartmentSelectId(id);
@@ -178,6 +233,10 @@ public class TaBuildingController extends BaseController {
178 233
      * @param id
179 234
      * @return
180 235
      */
236
+    @ApiOperation(value = "依据项目ID 查户型", notes = "依据项目ID 查户型")
237
+    @ApiImplicitParams({
238
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "项目ID"),
239
+    })
181 240
     @RequestMapping(value = "/admin/buildingApartment/buildingId/{id}", method = RequestMethod.GET)
182 241
     public ResponseBean buildingApartmentBuildingId(@PathVariable(value = "id") String id){
183 242
         return taBuildingService.buildingApartmentBuildingId(id);

+ 90
- 20
src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java Voir le fichier

@@ -17,6 +17,10 @@ import com.huiju.estateagents.service.ITaBuildingDynamicService;
17 17
 import com.huiju.estateagents.service.ITaBuildingService;
18 18
 import com.huiju.estateagents.service.ITaPersonService;
19 19
 import com.huiju.estateagents.service.ITaSaveService;
20
+import io.swagger.annotations.Api;
21
+import io.swagger.annotations.ApiImplicitParam;
22
+import io.swagger.annotations.ApiImplicitParams;
23
+import io.swagger.annotations.ApiOperation;
20 24
 import org.springframework.beans.factory.annotation.Autowired;
21 25
 import org.springframework.beans.propertyeditors.CustomDateEditor;
22 26
 import org.springframework.format.annotation.DateTimeFormat;
@@ -45,6 +49,7 @@ import java.util.Map;
45 49
  */
46 50
 @RestController
47 51
 @RequestMapping("/api")
52
+@Api(value = "项目活动", tags = "项目活动")
48 53
 public class TaBuildingDynamicController extends BaseController {
49 54
 
50 55
     @Autowired
@@ -68,7 +73,18 @@ public class TaBuildingDynamicController extends BaseController {
68 73
         CustomDateEditor editor = new CustomDateEditor(df, true);//true表示允许为空,false反之
69 74
         binder.registerCustomEditor(Date.class, editor);
70 75
     }
71
-
76
+    
77
+    @ApiOperation(value = "后台管理端查询项目活动列表", notes = "后台管理端查询项目活动列表")
78
+    @ApiImplicitParams({
79
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
80
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
81
+            @ApiImplicitParam(dataTypeClass = String.class, name = "name", paramType = "query",value = "项目名称"),
82
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市id"),
83
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
84
+            @ApiImplicitParam(dataTypeClass = String.class, name = "title", paramType = "query",value = "标题"),
85
+            @ApiImplicitParam(dataTypeClass = String.class, name = "isEnlist", paramType = "query",value = "是否报名"),
86
+            @ApiImplicitParam(dataTypeClass = String.class, name = "time", paramType = "query",value = "日期")
87
+    })
72 88
     @RequestMapping(value = "/admin/iBuildingDynamicList", method = RequestMethod.GET)
73 89
     public ResponseBean iBuildingDynamicList(@RequestParam("pageNum")Integer pageNum,
74 90
                                              @RequestParam("pageSize")Integer pageSize,
@@ -95,6 +111,14 @@ public class TaBuildingDynamicController extends BaseController {
95 111
      * @param request
96 112
      * @return
97 113
      */
114
+    @ApiOperation(value = "微信端查询项目活动列表", notes = "微信端查询项目活动列表")
115
+    @ApiImplicitParams({
116
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
117
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
118
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市id"),
119
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
120
+            @ApiImplicitParam(dataTypeClass = Boolean.class, name = "mine", paramType = "query")
121
+    })
98 122
     @RequestMapping(value = "/wx/buildingDynamiceList", method = RequestMethod.GET)
99 123
     public ResponseBean wxBuildingDynamiceList(@RequestParam(value = "buildingId", required = false)String buildingId,
100 124
                                                @RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@@ -118,14 +142,13 @@ public class TaBuildingDynamicController extends BaseController {
118 142
 
119 143
         return responseBean;
120 144
     }
121
-
122
-    /**
123
-     * 活动列表
124
-     * @param pageNum
125
-     * @param pageSize
126
-     * @param request
127
-     * @return
128
-     */
145
+    
146
+    @ApiOperation(value = "微信端查询收藏项目活动列表", notes = "微信端查询收藏项目活动列表")
147
+    @ApiImplicitParams({
148
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
149
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
150
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id")
151
+    })
129 152
     @RequestMapping(value = "/wx/save/buildingDynamiceList", method = RequestMethod.GET)
130 153
     public ResponseBean wxSaveBuildingDynamiceList(@RequestParam(value = "buildingId", required = false)String buildingId,
131 154
                                                @RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@@ -168,6 +191,10 @@ public class TaBuildingDynamicController extends BaseController {
168 191
      * @param dynamicId
169 192
      * @return
170 193
      */
194
+    @ApiOperation(value = "微信端查询活动详情", notes = "微信端查询活动详情")
195
+    @ApiImplicitParams({
196
+            @ApiImplicitParam(dataTypeClass = String.class, name = "dynamicId", paramType = "path",value = "活动ID")
197
+    })
171 198
     @RequestMapping(value = "/wx/buildingDynamiceInfo/{dynamicId}", method = RequestMethod.GET)
172 199
     public ResponseBean iBuildingDynamicInfo(@PathVariable(value = "dynamicId") String dynamicId,
173 200
                                              HttpServletRequest request){
@@ -183,6 +210,10 @@ public class TaBuildingDynamicController extends BaseController {
183 210
      * @param request
184 211
      * @return
185 212
      */
213
+    @ApiOperation(value = "微信端查询活动详情", notes = "微信端查询活动详情")
214
+    @ApiImplicitParams({
215
+            @ApiImplicitParam(dataType = "TaActivityDynamicEnlist", name = "taActivityDynamicEnlist", paramType = "body",value = "活动详细信息")
216
+    })
186 217
     @RequestMapping(value = "/wx/activityDynamicEnlistAdd", method = RequestMethod.POST)
187 218
     public ResponseBean taActivityDynamicEnlist(@RequestBody TaActivityDynamicEnlist taActivityDynamicEnlist,
188 219
                                                 HttpServletRequest request){
@@ -198,8 +229,12 @@ public class TaBuildingDynamicController extends BaseController {
198 229
         ResponseBean  responseBean = iBuildingDynamicService.taActivityDynamicEnlistAdd(taActivityDynamicEnlist);
199 230
         return responseBean;
200 231
     }
201
-
202
-
232
+    
233
+    
234
+    @ApiOperation(value = "后端活动添加", notes = "后端微信活动添加")
235
+    @ApiImplicitParams({
236
+            @ApiImplicitParam(dataType = "TaBuildingDynamic", name = "parameter", paramType = "body",value = "活动详细信息")
237
+    })
203 238
     @RequestMapping(value = "/admin/buildingDynamic/add" ,method =RequestMethod.POST)
204 239
     public  ResponseBean buildingDynamicAdd(@RequestBody String parameter,HttpServletRequest request){
205 240
         ResponseBean responseBean = new ResponseBean();
@@ -215,7 +250,11 @@ public class TaBuildingDynamicController extends BaseController {
215 250
         responseBean.addSuccess(dynamic);
216 251
         return responseBean;
217 252
     }
218
-
253
+    
254
+    @ApiOperation(value = "后端活动更新", notes = "后端微信活动更新")
255
+    @ApiImplicitParams({
256
+            @ApiImplicitParam(dataType = "TaBuildingDynamic", name = "parameter", paramType = "body",value = "活动详细信息")
257
+    })
219 258
     @RequestMapping(value = "/admin/buildingDynamic/update" ,method =RequestMethod.PUT)
220 259
     public  ResponseBean buildingDynamicUpdate(@RequestBody String parameter,HttpServletRequest request){
221 260
         ResponseBean responseBean = new ResponseBean();
@@ -228,7 +267,12 @@ public class TaBuildingDynamicController extends BaseController {
228 267
         iBuildingDynamicService.update(dynamic, buildingDynamicQueryWrapper);
229 268
         return responseBean;
230 269
     }
231
-
270
+    
271
+    @ApiOperation(value = "后端置顶", notes = "后端置顶")
272
+    @ApiImplicitParams({
273
+            @ApiImplicitParam(dataType = "String", name = "dynamicId", paramType = "query",value = "活动ID"),
274
+            @ApiImplicitParam(dataType = "Integer", name = "weight", paramType = "query",value = "权重")
275
+    })
232 276
     @RequestMapping(value = "/admin/buildingDynamic/weight" ,method =RequestMethod.PUT)
233 277
     public  ResponseBean buildingDynamicWeight(@RequestParam String dynamicId,@RequestParam Integer weight,HttpServletRequest request){
234 278
         ResponseBean responseBean = new ResponseBean();
@@ -244,14 +288,22 @@ public class TaBuildingDynamicController extends BaseController {
244 288
         }
245 289
         return responseBean;
246 290
     }
247
-
291
+    
292
+    
293
+    @ApiOperation(value = "后端删除", notes = "后端删除")
294
+    @ApiImplicitParams({
295
+            @ApiImplicitParam(dataType = "String", name = "id", paramType = "query",value = "活动ID")
296
+    })
248 297
     @RequestMapping(value = "/admin/buildingDynamic/delete", method = RequestMethod.DELETE)
249 298
     public ResponseBean buildingDynamicdelect(@RequestParam(value = "id",required = false)String id) {
250 299
         ResponseBean responseBean = iBuildingDynamicService.buildingDynamicDelete(id);
251 300
         return responseBean;
252 301
     }
253
-
254
-
302
+    
303
+    @ApiOperation(value = "后端发布活动", notes = "后端发布活动")
304
+    @ApiImplicitParams({
305
+            @ApiImplicitParam(dataType = "String", name = "dynamicId", paramType = "path",value = "活动ID")
306
+    })
255 307
     @RequestMapping(value = "/admin/buildingDynamic/send/{dynamicId}", method = RequestMethod.PUT)
256 308
     public ResponseBean send(@PathVariable String dynamicId, HttpServletRequest request) {
257 309
         ResponseBean responseBean = new ResponseBean();
@@ -264,7 +316,11 @@ public class TaBuildingDynamicController extends BaseController {
264 316
         iBuildingDynamicService.update(dynamic, dynamicQueryWrapper);
265 317
         return responseBean;
266 318
     }
267
-
319
+    
320
+    @ApiOperation(value = "后端取消活动", notes = "后端取消活动")
321
+    @ApiImplicitParams({
322
+            @ApiImplicitParam(dataType = "String", name = "dynamicId", paramType = "path",value = "活动ID")
323
+    })
268 324
     @RequestMapping(value = "/admin/buildingDynamic/cancel/{dynamicId}", method = RequestMethod.PUT)
269 325
     public ResponseBean cancel(@PathVariable String dynamicId, HttpServletRequest request) {
270 326
         ResponseBean responseBean = new ResponseBean();
@@ -276,7 +332,11 @@ public class TaBuildingDynamicController extends BaseController {
276 332
         iBuildingDynamicService.update(dynamic, dynamicQueryWrapper);
277 333
         return responseBean;
278 334
     }
279
-
335
+    
336
+    @ApiOperation(value = "后端活动详情", notes = "后端活动详情")
337
+    @ApiImplicitParams({
338
+            @ApiImplicitParam(dataType = "String", name = "dynamicId", paramType = "query",value = "活动ID")
339
+    })
280 340
     @RequestMapping(value = "/admin/buildingDynamic/Details", method = RequestMethod.GET)
281 341
     public ResponseBean buildingDynamicDetails(@RequestParam("dynamicId")String dynamicId) {
282 342
         ResponseBean responseBean = new ResponseBean();
@@ -292,7 +352,13 @@ public class TaBuildingDynamicController extends BaseController {
292 352
         responseBean.addSuccess(dynamic);
293 353
         return responseBean;
294 354
     }
295
-
355
+    
356
+    @ApiOperation(value = "后端报名列表", notes = "后端报名列表")
357
+    @ApiImplicitParams({
358
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
359
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
360
+            @ApiImplicitParam(dataType = "String", name = "dynamicId", paramType = "query",value = "活动ID")
361
+    })
296 362
     @RequestMapping(value = "/admin/SignList", method = RequestMethod.GET)
297 363
     public ResponseBean getSignList(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
298 364
                                     @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
@@ -310,7 +376,11 @@ public class TaBuildingDynamicController extends BaseController {
310 376
         map.put("pageSize", page.getSize());
311 377
         return ResponseBean.success(map);
312 378
     }
313
-
379
+    
380
+    @ApiOperation(value = "后端结束活动", notes = "后端结束活动")
381
+    @ApiImplicitParams({
382
+            @ApiImplicitParam(dataType = "String", name = "parameter", paramType = "body",value = "活动ID dynamicId 和 top")
383
+    })
314 384
     @RequestMapping(value = "/admin/buildingDynamic/finish" ,method =RequestMethod.PUT)
315 385
     public  ResponseBean buildingDynamicFinish(@RequestBody String parameter) {
316 386
         ResponseBean responseBean = new ResponseBean();

+ 45
- 3
src/main/java/com/huiju/estateagents/controller/TaChannelController.java Voir le fichier

@@ -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,

+ 45
- 0
src/main/java/com/huiju/estateagents/controller/TaGoodsController.java Voir le fichier

@@ -13,6 +13,10 @@ import com.huiju.estateagents.entity.TaPerson;
13 13
 import com.huiju.estateagents.service.ITaBuildingService;
14 14
 import com.huiju.estateagents.service.ITaGoodsService;
15 15
 import com.huiju.estateagents.service.ITaPersonService;
16
+import io.swagger.annotations.Api;
17
+import io.swagger.annotations.ApiImplicitParam;
18
+import io.swagger.annotations.ApiImplicitParams;
19
+import io.swagger.annotations.ApiOperation;
16 20
 import org.slf4j.Logger;
17 21
 import org.slf4j.LoggerFactory;
18 22
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,6 +44,7 @@ import java.util.Map;
40 44
  */
41 45
 @RestController
42 46
 @RequestMapping("/api")
47
+@Api(value = "商品", tags = "商品")
43 48
 public class TaGoodsController extends BaseController {
44 49
 
45 50
     private final Logger logger = LoggerFactory.getLogger(TaGoodsController.class);
@@ -59,6 +64,16 @@ public class TaGoodsController extends BaseController {
59 64
      * @param pageSize
60 65
      * @return
61 66
      */
67
+    @ApiOperation(value = "后台商品列表", notes = "后台商品列表")
68
+    @ApiImplicitParams({
69
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
70
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
71
+            @ApiImplicitParam(dataTypeClass = String.class, name = "goodsName", paramType = "query",value = "商品名称"),
72
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
73
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "priceLesser", paramType = "query",value = "价格小"),
74
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "priceGreater", paramType = "query",value = "价格大"),
75
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "status", paramType = "query",value = "状态")
76
+    })
62 77
     @RequestMapping(value="/admin/taGoods",method= RequestMethod.GET)
63 78
     public ResponseBean taGoodsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
64 79
                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -95,6 +110,10 @@ public class TaGoodsController extends BaseController {
95 110
      * @param taGoods 实体对象
96 111
      * @return
97 112
      */
113
+    @ApiOperation(value = "后台商品保存", notes = "后台商品保存")
114
+    @ApiImplicitParams({
115
+            @ApiImplicitParam(dataType = "TaGoods", name = "taGoods", paramType = "body",value = "商品详细数据")
116
+    })
98 117
     @RequestMapping(value="/admin/taGoods/add",method= RequestMethod.POST)
99 118
     public ResponseBean taGoodsAdd(@RequestBody TaGoods taGoods,HttpServletRequest request){
100 119
         ResponseBean responseBean = new ResponseBean();
@@ -143,6 +162,10 @@ public class TaGoodsController extends BaseController {
143 162
      * @param taGoods 实体对象
144 163
      * @return
145 164
      */
165
+    @ApiOperation(value = "后台商品修改", notes = "后台商品修改")
166
+    @ApiImplicitParams({
167
+            @ApiImplicitParam(dataType = "TaGoods", name = "taGoods", paramType = "body",value = "商品详细数据")
168
+    })
146 169
     @RequestMapping(value="/admin/taGoods",method= RequestMethod.PUT)
147 170
     public ResponseBean taGoodsUpdate(@RequestBody TaGoods taGoods,HttpServletRequest request){
148 171
         ResponseBean responseBean = new ResponseBean();
@@ -169,6 +192,10 @@ public class TaGoodsController extends BaseController {
169 192
      * @param taGoods 实体对象
170 193
      * @return
171 194
      */
195
+    @ApiOperation(value = "后台商品状态变更", notes = "后台商品状态变更")
196
+    @ApiImplicitParams({
197
+            @ApiImplicitParam(dataType = "TaGoods", name = "taGoods", paramType = "body",value = "商品详细数据")
198
+    })
172 199
     @RequestMapping(value="/admin/taGoods/change",method= RequestMethod.PUT)
173 200
     public ResponseBean taGoodsChange(@RequestBody TaGoods taGoods,HttpServletRequest request){
174 201
         ResponseBean responseBean = new ResponseBean();
@@ -196,6 +223,10 @@ public class TaGoodsController extends BaseController {
196 223
      * 根据id查询对象
197 224
      * @param id  实体ID
198 225
      */
226
+    @ApiOperation(value = "后台商品详情", notes = "后台商品详情")
227
+    @ApiImplicitParams({
228
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "商品id")
229
+    })
199 230
     @RequestMapping(value="/admin/taGoods/{id}",method= RequestMethod.GET)
200 231
     public ResponseBean taGoodsGet(@PathVariable Integer id){
201 232
         ResponseBean responseBean = new ResponseBean();
@@ -215,6 +246,12 @@ public class TaGoodsController extends BaseController {
215 246
      * @param pageSize
216 247
      * @return
217 248
      */
249
+    @ApiOperation(value = "微信商品列表", notes = "微信商品列表")
250
+    @ApiImplicitParams({
251
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
252
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
253
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id")
254
+    })
218 255
     @RequestMapping(value="/wx/goods",method= RequestMethod.GET)
219 256
     public ResponseBean wxGoodsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
220 257
                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -260,6 +297,10 @@ public class TaGoodsController extends BaseController {
260 297
      * 根据id查询对象
261 298
      * @param id  实体ID
262 299
      */
300
+    @ApiOperation(value = "微信商品详情", notes = "微信商品详情")
301
+    @ApiImplicitParams({
302
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "商品id")
303
+    })
263 304
     @RequestMapping(value="/wx/goods/{id}",method= RequestMethod.GET)
264 305
     public ResponseBean wxGoodsGet(@PathVariable Integer id){
265 306
         ResponseBean responseBean = new ResponseBean();
@@ -279,6 +320,10 @@ public class TaGoodsController extends BaseController {
279 320
      * @param request
280 321
      * @return
281 322
      */
323
+    @ApiOperation(value = "微信兑换商品接口", notes = "微信兑换商品接口")
324
+    @ApiImplicitParams({
325
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "商品id")
326
+    })
282 327
     @RequestMapping(value="/wx/goods/exchange/{id}",method= RequestMethod.POST)
283 328
     public ResponseBean wxExchangeGoods(@PathVariable Integer id, HttpServletRequest request){
284 329
         ResponseBean responseBean = new ResponseBean();

+ 38
- 0
src/main/java/com/huiju/estateagents/controller/TaPolicyController.java Voir le fichier

@@ -10,6 +10,10 @@ import com.huiju.estateagents.common.JWTUtils;
10 10
 import com.huiju.estateagents.entity.TdCity;
11 11
 import com.huiju.estateagents.service.ITdCityService;
12 12
 import com.huiju.estateagents.service.ITaPolicyService;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
13 17
 import org.slf4j.Logger;
14 18
 import org.slf4j.LoggerFactory;
15 19
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,6 +39,7 @@ import java.time.LocalDateTime;
35 39
  */
36 40
 @RestController
37 41
 @RequestMapping("/api")
42
+@Api(value = "政策维护", tags = "政策维护")
38 43
 public class TaPolicyController extends BaseController {
39 44
 
40 45
     private final Logger logger = LoggerFactory.getLogger(TaPolicyController.class);
@@ -52,6 +57,12 @@ public class TaPolicyController extends BaseController {
52 57
      * @param pageSize
53 58
      * @return
54 59
      */
60
+    @ApiOperation(value = "后台政策维护列表", notes = "后台政策维护列表")
61
+    @ApiImplicitParams({
62
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
63
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
64
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
65
+    })
55 66
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.GET)
56 67
     public ResponseBean taPolicyList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57 68
 									 @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -82,6 +93,12 @@ public class TaPolicyController extends BaseController {
82 93
      * @param pageSize
83 94
      * @return
84 95
      */
96
+    @ApiOperation(value = "微信政策维护列表", notes = "微信政策维护列表")
97
+    @ApiImplicitParams({
98
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
99
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
100
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
101
+    })
85 102
     @RequestMapping(value="/wx/taPolicy",method= RequestMethod.GET)
86 103
     public ResponseBean taPolicyListCity(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
87 104
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -110,6 +127,10 @@ public class TaPolicyController extends BaseController {
110 127
      * @param taPolicy 实体对象
111 128
      * @return
112 129
      */
130
+    @ApiOperation(value = "后台政策维护保存", notes = "后台政策维护保存")
131
+    @ApiImplicitParams({
132
+            @ApiImplicitParam(dataType = "TaPolicy", name = "taPolicy", paramType = "body",value = "政策数据")
133
+    })
113 134
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.POST)
114 135
     public ResponseBean taPolicyAdd(@RequestBody TaPolicy taPolicy, HttpServletRequest request){
115 136
         ResponseBean responseBean = new ResponseBean();
@@ -144,6 +165,10 @@ public class TaPolicyController extends BaseController {
144 165
      * 根据id删除对象
145 166
      * @param id  实体ID
146 167
      */
168
+    @ApiOperation(value = "后台政策维护删除", notes = "后台政策维护删除")
169
+    @ApiImplicitParams({
170
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
171
+    })
147 172
     @ResponseBody
148 173
     @RequestMapping(value="/admin/taPolicy/{id}", method= RequestMethod.DELETE)
149 174
     public ResponseBean taPolicyDelete(@PathVariable Integer id){
@@ -169,6 +194,11 @@ public class TaPolicyController extends BaseController {
169 194
      * @param taPolicy 实体对象
170 195
      * @return
171 196
      */
197
+    @ApiOperation(value = "后台政策维护修改", notes = "后台政策维护修改")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID"),
200
+            @ApiImplicitParam(dataType = "TaPolicy", name = "taPolicy", paramType = "body",value = "政策数据")
201
+    })
172 202
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.PUT)
173 203
     public ResponseBean taPolicyUpdate(@PathVariable Integer id,
174 204
                                         @RequestBody TaPolicy taPolicy,
@@ -203,6 +233,10 @@ public class TaPolicyController extends BaseController {
203 233
      * 根据id查询对象
204 234
      * @param id  实体ID
205 235
      */
236
+    @ApiOperation(value = "后台政策维护查询", notes = "后台政策维护查询")
237
+    @ApiImplicitParams({
238
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
239
+    })
206 240
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.GET)
207 241
     public ResponseBean taPolicyGet(@PathVariable Integer id){
208 242
         ResponseBean responseBean = new ResponseBean();
@@ -219,6 +253,10 @@ public class TaPolicyController extends BaseController {
219 253
      * 根据id查询对象
220 254
      * @param id  实体ID
221 255
      */
256
+    @ApiOperation(value = "微信政策维护查询", notes = "微信政策维护查询")
257
+    @ApiImplicitParams({
258
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
259
+    })
222 260
     @RequestMapping(value="/wx/taPolicy/{id}",method= RequestMethod.GET)
223 261
     public ResponseBean taPolicyGetWx(@PathVariable Integer id){
224 262
         ResponseBean responseBean = new ResponseBean();

+ 149
- 0
src/main/java/com/huiju/estateagents/controller/TaSharePersonFromController.java Voir le fichier

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

+ 38
- 0
src/main/java/com/huiju/estateagents/controller/TdBuildingTypeController.java Voir le fichier

@@ -4,12 +4,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 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
+import com.huiju.estateagents.entity.TaBuilding;
7 8
 import com.huiju.estateagents.entity.TdBuildingType;
9
+import com.huiju.estateagents.exception.EstaException;
10
+import com.huiju.estateagents.mapper.TaBuildingMapper;
11
+import com.huiju.estateagents.service.ITaBuildingService;
8 12
 import com.huiju.estateagents.service.ITdBuildingTypeService;
9 13
 import io.swagger.annotations.Api;
10 14
 import io.swagger.annotations.ApiImplicitParam;
11 15
 import io.swagger.annotations.ApiImplicitParams;
12 16
 import io.swagger.annotations.ApiOperation;
17
+import org.apache.commons.collections4.CollectionUtils;
13 18
 import org.slf4j.Logger;
14 19
 import org.slf4j.LoggerFactory;
15 20
 import org.springframework.beans.factory.annotation.Autowired;
@@ -23,6 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
23 28
 import com.huiju.estateagents.base.BaseController;
24 29
 
25 30
 import javax.servlet.http.HttpServletRequest;
31
+import java.util.List;
32
+import java.util.stream.Collectors;
26 33
 
27 34
 /**
28 35
  * <p>
@@ -42,6 +49,8 @@ public class TdBuildingTypeController extends BaseController {
42 49
     @Autowired
43 50
     public ITdBuildingTypeService iTdBuildingTypeService;
44 51
 
52
+    @Autowired
53
+    public TaBuildingMapper taBuildingMapper;
45 54
 
46 55
     /**
47 56
      * 分页查询列表
@@ -82,6 +91,11 @@ public class TdBuildingTypeController extends BaseController {
82 91
      * @param pageSize
83 92
      * @return
84 93
      */
94
+    @ApiOperation(value = "微信查询项目类型", notes = "微信查询项目类型")
95
+    @ApiImplicitParams({
96
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
97
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行")
98
+    })
85 99
     @RequestMapping(value="/wx/tdBuildingType",method= RequestMethod.GET)
86 100
     public ResponseBean tdWxBuildingTypeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
87 101
                                            @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -111,6 +125,7 @@ public class TdBuildingTypeController extends BaseController {
111 125
      * @param tdBuildingType 实体对象
112 126
      * @return
113 127
      */
128
+    @ApiOperation(value = "项目类型保存", notes = "项目类型保存")
114 129
     @RequestMapping(value="/admin/tdBuildingType",method= RequestMethod.POST)
115 130
     public ResponseBean tdBuildingTypeAdd(@RequestBody TdBuildingType tdBuildingType, HttpServletRequest request){
116 131
         ResponseBean responseBean = new ResponseBean();
@@ -132,6 +147,10 @@ public class TdBuildingTypeController extends BaseController {
132 147
      * 根据id删除对象
133 148
      * @param id  实体ID
134 149
      */
150
+    @ApiOperation(value = "项目类型 根据项目类型id删除", notes = "项目类型删除 根据项目类型id删除")
151
+    @ApiImplicitParams({
152
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "path",value = "项目类型id"),
153
+    })
135 154
     @ResponseBody
136 155
     @RequestMapping(value="/admin/tdBuildingType/{id}", method= RequestMethod.DELETE)
137 156
     public ResponseBean tdBuildingTypeDelete(@PathVariable Integer id){
@@ -155,12 +174,27 @@ public class TdBuildingTypeController extends BaseController {
155 174
      * @param tdBuildingType 实体对象
156 175
      * @return
157 176
      */
177
+    @ApiOperation(value = "项目类型 根据项目类型id修改", notes = "项目类型删除 根据项目类型id修改")
178
+    @ApiImplicitParams({
179
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "path",value = "项目类型id"),
180
+            @ApiImplicitParam(dataTypeClass = TdBuildingType.class, name = "tdBuildingType", paramType = "body",value = "项目类型"),
181
+    })
158 182
     @RequestMapping(value="/admin/tdBuildingType/{id}",method= RequestMethod.PUT)
159 183
     public ResponseBean tdBuildingTypeUpdate(@PathVariable Integer id,
160 184
                                         @RequestBody TdBuildingType tdBuildingType,
161 185
                                              HttpServletRequest request){
162 186
         ResponseBean responseBean = new ResponseBean();
163 187
         try {
188
+
189
+            // 如果是删除,状态为 -1
190
+            if ( null != tdBuildingType.getStatus() && -1 == tdBuildingType.getStatus().intValue()) {
191
+                List<TaBuilding> taBuildings = taBuildingMapper.selectBuildingByBuildingTypeId(tdBuildingType.getBuildingTypeId());
192
+                if (CollectionUtils.isNotEmpty(taBuildings)) {
193
+                    String buildingNames = taBuildings.stream().map(e -> e.getBuildingName()).collect(Collectors.joining(","));
194
+                    throw new EstaException("项目 " + buildingNames + " 正在使用此类型,请先到项目列表中修改项目的项目类型为其他类型,再删除此类型");
195
+                }
196
+            }
197
+
164 198
             tdBuildingType.setOrgId(getOrgId(request));
165 199
             if (iTdBuildingTypeService.updateById(tdBuildingType)){
166 200
                 responseBean.addSuccess(tdBuildingType);
@@ -178,6 +212,10 @@ public class TdBuildingTypeController extends BaseController {
178 212
      * 根据id查询对象
179 213
      * @param id  实体ID
180 214
      */
215
+    @ApiOperation(value = "项目类型 根据项目类型id查询对象", notes = "项目类型删除 根据项目类型id查询对象")
216
+    @ApiImplicitParams({
217
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "id", paramType = "path",value = "项目类型id"),
218
+    })
181 219
     @RequestMapping(value="/admin/tdBuildingType/{id}",method= RequestMethod.GET)
182 220
     public ResponseBean tdBuildingTypeGet(@PathVariable Integer id){
183 221
         ResponseBean responseBean = new ResponseBean();

+ 32
- 1
src/main/java/com/huiju/estateagents/controller/TdPointsRulesController.java Voir le fichier

@@ -8,6 +8,10 @@ import com.huiju.estateagents.base.ResponseBean;
8 8
 import com.huiju.estateagents.common.CommConstant;
9 9
 import com.huiju.estateagents.entity.TdPointsRules;
10 10
 import com.huiju.estateagents.service.ITdPointsRulesService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
11 15
 import org.apache.commons.lang3.StringUtils;
12 16
 import org.slf4j.Logger;
13 17
 import org.slf4j.LoggerFactory;
@@ -32,6 +36,7 @@ import javax.servlet.http.HttpServletRequest;
32 36
  */
33 37
 @RestController
34 38
 @RequestMapping("/api")
39
+@Api(value = "积分", tags = "积分")
35 40
 public class TdPointsRulesController extends BaseController {
36 41
 
37 42
     private final Logger logger = LoggerFactory.getLogger(TdPointsRulesController.class);
@@ -46,6 +51,13 @@ public class TdPointsRulesController extends BaseController {
46 51
      * @param pageSize
47 52
      * @return
48 53
      */
54
+    @ApiOperation(value = "后台积分列表", notes = "后台积分列表")
55
+    @ApiImplicitParams({
56
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
57
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
58
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
59
+            @ApiImplicitParam(dataTypeClass = String.class, name = "type", paramType = "query",value = "类型")
60
+    })
49 61
     @RequestMapping(value="/admin/tdPointsRules",method= RequestMethod.GET)
50 62
     public ResponseBean tdPointsRulesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
51 63
                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -58,7 +70,7 @@ public class TdPointsRulesController extends BaseController {
58 70
 		    IPage<TdPointsRules> pg = new Page<>(pageNum, pageSize);
59 71
             QueryWrapper<TdPointsRules> queryWrapper = new QueryWrapper<>();
60 72
             Integer orgId = getOrgId(request);
61
-            queryWrapper.eq("org_id",orgId);
73
+            //queryWrapper.eq("org_id",orgId);
62 74
             queryWrapper.orderByDesc("create_date");
63 75
             queryWrapper.eq(StringUtils.isNotBlank(buildingId),"building_id", buildingId);
64 76
             if (CommConstant.POINTS_RULE_PLATFORM.equals(type)) {
@@ -83,6 +95,13 @@ public class TdPointsRulesController extends BaseController {
83 95
      * @param pageSize
84 96
      * @return
85 97
      */
98
+    @ApiOperation(value = "微信积分列表", notes = "微信积分列表")
99
+    @ApiImplicitParams({
100
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
101
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
102
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
103
+            @ApiImplicitParam(dataTypeClass = String.class, name = "type", paramType = "query",value = "类型")
104
+    })
86 105
     @RequestMapping(value="/wx/tdPointsRules",method= RequestMethod.GET)
87 106
     public ResponseBean tdWxPointsRulesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
88 107
                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -165,6 +184,10 @@ public class TdPointsRulesController extends BaseController {
165 184
      * @param tdPointsRules 实体对象
166 185
      * @return
167 186
      */
187
+    @ApiOperation(value = "后台积分规则修改", notes = "后台积分规则修改")
188
+    @ApiImplicitParams({
189
+            @ApiImplicitParam(dataType = "TdPointsRules", name = "tdPointsRules", paramType = "body",value = "积分详细数据")
190
+    })
168 191
     @RequestMapping(value="/admin/tdPointsRules",method= RequestMethod.PUT)
169 192
     public ResponseBean tdPointsRulesUpdate(@RequestBody TdPointsRules tdPointsRules){
170 193
         ResponseBean responseBean = new ResponseBean();
@@ -187,6 +210,10 @@ public class TdPointsRulesController extends BaseController {
187 210
      * @param tdPointsRules 实体对象
188 211
      * @return
189 212
      */
213
+    @ApiOperation(value = "后台积分规则停用启用", notes = "后台积分规则停用启用")
214
+    @ApiImplicitParams({
215
+            @ApiImplicitParam(dataType = "TdPointsRules", name = "tdPointsRules", paramType = "body",value = "积分详细数据")
216
+    })
190 217
     @RequestMapping(value="/admin/tdPointsRules/change",method= RequestMethod.PUT)
191 218
     public ResponseBean tdPointsRulesChange(@RequestBody TdPointsRules tdPointsRules){
192 219
         ResponseBean responseBean = new ResponseBean();
@@ -213,6 +240,10 @@ public class TdPointsRulesController extends BaseController {
213 240
      * 根据id查询对象
214 241
      * @param id  实体ID
215 242
      */
243
+    @ApiOperation(value = "后台积分规则详情", notes = "后台积分规则详情")
244
+    @ApiImplicitParams({
245
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "积分id")
246
+    })
216 247
     @RequestMapping(value="/admin/tdPointsRules/{id}",method= RequestMethod.GET)
217 248
     public ResponseBean tdPointsRulesGet(@PathVariable Integer id){
218 249
         ResponseBean responseBean = new ResponseBean();

+ 10
- 0
src/main/java/com/huiju/estateagents/controller/TdReportController.java Voir le fichier

@@ -6,6 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.huiju.estateagents.base.ResponseBean;
7 7
 import com.huiju.estateagents.entity.TdReport;
8 8
 import com.huiju.estateagents.service.ITdReportService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
9 13
 import org.slf4j.Logger;
10 14
 import org.slf4j.LoggerFactory;
11 15
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +32,7 @@ import com.huiju.estateagents.base.BaseController;
28 32
  */
29 33
 @RestController
30 34
 @RequestMapping("/api")
35
+@Api(value = "客户留言", tags = "客户留言")
31 36
 public class TdReportController extends BaseController {
32 37
 
33 38
     private final Logger logger = LoggerFactory.getLogger(TdReportController.class);
@@ -42,6 +47,11 @@ public class TdReportController extends BaseController {
42 47
      * @param pageSize
43 48
      * @return
44 49
      */
50
+    @ApiOperation(value = "后台客户留言列表", notes = "后台客户留言列表")
51
+    @ApiImplicitParams({
52
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
53
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行")
54
+    })
45 55
     @RequestMapping(value="/admin/tdReports",method= RequestMethod.GET)
46 56
     public ResponseBean tdReportList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47 57
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java Voir le fichier

@@ -177,6 +177,11 @@ public class TaBuildingDynamic implements Serializable {
177 177
     private Integer enlistNum;
178 178
 
179 179
     private Integer weight;
180
+    
181
+    /**
182
+     * 最大报名人数
183
+     */
184
+    private Integer maxEnlistByPerson;
180 185
 
181 186
     /**
182 187
      * 公司Id

+ 74
- 0
src/main/java/com/huiju/estateagents/entity/TaSharePersonFrom.java Voir le fichier

@@ -0,0 +1,74 @@
1
+package com.huiju.estateagents.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ *  
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-10-08
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+public class TaSharePersonFrom implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 分享来源id
29
+     */
30
+    @TableId(value = "share_from_id", type = IdType.AUTO)
31
+    private Integer shareFromId;
32
+
33
+    /**
34
+     * 分享人
35
+     */
36
+    private String sharePerson;
37
+
38
+    /**
39
+     * 分享人类型
40
+     */
41
+    private String sharePersonType;
42
+
43
+    /**
44
+     * 被分享人
45
+     */
46
+    private String personId;
47
+
48
+    /**
49
+     * 分享类型
50
+     */
51
+    private String targetType;
52
+
53
+    /**
54
+     * 目标id
55
+     */
56
+    private String targetId;
57
+
58
+    /**
59
+     * 创建时间
60
+     */
61
+    private LocalDateTime createDate;
62
+
63
+    /**
64
+     * 公司id
65
+     */
66
+    private Integer orgId;
67
+
68
+    /**
69
+     * 楼盘id
70
+     */
71
+    private String buildingId;
72
+
73
+
74
+}

+ 7
- 0
src/main/java/com/huiju/estateagents/mapper/TaBuildingMapper.java Voir le fichier

@@ -78,4 +78,11 @@ public interface TaBuildingMapper extends BaseMapper<TaBuilding> {
78 78
                                          @Param("areaList") List<String[]> areaList,
79 79
                                          @Param("orgId")Integer orgId);
80 80
 
81
+    /**
82
+     * 根据项目类型Id 查询
83
+     * @param buildingTypeId
84
+     * @return
85
+     */
86
+    List<TaBuilding> selectBuildingByBuildingTypeId(Integer buildingTypeId);
87
+
81 88
 }

+ 18
- 0
src/main/java/com/huiju/estateagents/mapper/TaSharePersonFromMapper.java Voir le fichier

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

+ 16
- 0
src/main/java/com/huiju/estateagents/service/ITaSharePersonFromService.java Voir le fichier

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

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java Voir le fichier

@@ -638,6 +638,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
638 638
         for (TaPerson taPerson:taPersonList){
639 639
             QueryWrapper<TaRecommendCustomer> taRecommendCustomerQuery= new QueryWrapper<>();
640 640
             taRecommendCustomerQuery.eq("recommend_person",taPerson.getPersonId());
641
+            taRecommendCustomerQuery.eq("status",1);
641 642
             /*推荐客户总数*/
642 643
             int recommendCount= taRecommendCustomerMapper.selectCount(taRecommendCustomerQuery);
643 644
             taPerson.setRecommendCount(recommendCount);

+ 20
- 0
src/main/java/com/huiju/estateagents/service/impl/TaSharePersonFromServiceImpl.java Voir le fichier

@@ -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.TaSharePersonFrom;
5
+import com.huiju.estateagents.mapper.TaSharePersonFromMapper;
6
+import com.huiju.estateagents.service.ITaSharePersonFromService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ *   服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-10-08
16
+ */
17
+@Service
18
+public class TaSharePersonFromServiceImpl extends ServiceImpl<TaSharePersonFromMapper, TaSharePersonFrom> implements ITaSharePersonFromService {
19
+
20
+}

+ 15
- 0
src/main/resources/mapper/TaBuildingMapper.xml Voir le fichier

@@ -179,4 +179,19 @@
179 179
             ORDER BY tb.order_no DESC
180 180
     </select>
181 181
 
182
+    <select id="selectBuildingByBuildingTypeId" resultType="com.huiju.estateagents.entity.TaBuilding">
183
+
184
+        SELECT
185
+            tab.*
186
+        FROM
187
+            ta_building_project_type tbpt
188
+            LEFT JOIN td_building_type tbt ON tbpt.building_type_id = tbt.building_type_id
189
+            LEFT JOIN ta_building tab ON tbpt.building_id = tab.building_id
190
+        WHERE
191
+          tab.status <![CDATA[ > ]]> -1
192
+        and
193
+          tbpt.building_type_id = #{buildingTypeId}
194
+
195
+    </select>
196
+
182 197
 </mapper>

+ 5
- 0
src/main/resources/mapper/TaSharePersonFromMapper.xml Voir le fichier

@@ -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.TaSharePersonFromMapper">
4
+
5
+</mapper>