张延森 5 gadus atpakaļ
vecāks
revīzija
931cdae25a
35 mainītis faili ar 685 papildinājumiem un 60 dzēšanām
  1. 16
    1
      src/main/java/com/huiju/estateagents/common/CommConstant.java
  2. 5
    5
      src/main/java/com/huiju/estateagents/controller/ExtendContentController.java
  3. 9
    2
      src/main/java/com/huiju/estateagents/controller/TaBuildingController.java
  4. 58
    2
      src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java
  5. 60
    6
      src/main/java/com/huiju/estateagents/controller/TaPointsExchangeController.java
  6. 37
    0
      src/main/java/com/huiju/estateagents/controller/TaPointsRecordsController.java
  7. 32
    16
      src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java
  8. 144
    0
      src/main/java/com/huiju/estateagents/controller/TdBuildingTypeController.java
  9. 16
    0
      src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java
  10. 3
    0
      src/main/java/com/huiju/estateagents/entity/TaPointsExchange.java
  11. 4
    0
      src/main/java/com/huiju/estateagents/entity/TaPointsRecords.java
  12. 8
    0
      src/main/java/com/huiju/estateagents/entity/TaRecommendCustomer.java
  13. 58
    0
      src/main/java/com/huiju/estateagents/entity/TdBuildingType.java
  14. 11
    0
      src/main/java/com/huiju/estateagents/mapper/TaActivityDynamicEnlistMapper.java
  15. 9
    0
      src/main/java/com/huiju/estateagents/mapper/TaBuildingMapper.java
  16. 2
    1
      src/main/java/com/huiju/estateagents/mapper/TaPointsExchangeMapper.java
  17. 3
    0
      src/main/java/com/huiju/estateagents/mapper/TaPointsRecordsMapper.java
  18. 5
    0
      src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java
  19. 19
    0
      src/main/java/com/huiju/estateagents/mapper/TdBuildingTypeMapper.java
  20. 8
    0
      src/main/java/com/huiju/estateagents/service/ITaBuildingDynamicService.java
  21. 6
    0
      src/main/java/com/huiju/estateagents/service/ITaBuildingService.java
  22. 2
    0
      src/main/java/com/huiju/estateagents/service/ITaPersonService.java
  23. 3
    1
      src/main/java/com/huiju/estateagents/service/ITaRecommendCustomerService.java
  24. 17
    0
      src/main/java/com/huiju/estateagents/service/ITdBuildingTypeService.java
  25. 14
    1
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java
  26. 6
    0
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java
  27. 5
    0
      src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java
  28. 10
    24
      src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java
  29. 21
    0
      src/main/java/com/huiju/estateagents/service/impl/TdBuildingTypeServiceImpl.java
  30. 3
    1
      src/main/resources/mapper/TaActivityDynamicEnlistMapper.xml
  31. 1
    0
      src/main/resources/mapper/TaBuildingDynamicMapper.xml
  32. 10
    0
      src/main/resources/mapper/TaBuildingMapper.xml
  33. 31
    0
      src/main/resources/mapper/TaPointsExchangeMapper.xml
  34. 44
    0
      src/main/resources/mapper/TaRecommendCustomerMapper.xml
  35. 5
    0
      src/main/resources/mapper/TdBuildingTypeMapper.xml

+ 16
- 1
src/main/java/com/huiju/estateagents/common/CommConstant.java Parādīt failu

@@ -154,7 +154,6 @@ public class CommConstant {
154 154
 
155 155
     //=================  首屏广告 / 轮播图 end =======================
156 156
 
157
-
158 157
     /**
159 158
      * 客户报备
160 159
      */
@@ -190,4 +189,20 @@ public class CommConstant {
190 189
      * 审核不同意
191 190
      */
192 191
     public static final Integer VERIFY_DISAGREE = 2;
192
+
193
+    //=================  客户入口类型 start =======================
194
+    /*
195
+    * 自主进入
196
+    * */
197
+    public static final String ENTRY_VOLUNTEER = "volunteer";
198
+    /*
199
+    添加
200
+    */
201
+    public static final String ENTRY_INPUT = "input";
202
+    /*
203
+    * 报备
204
+    * */
205
+    public static final String ENTRY_VERIFY = "verify";
206
+    //=================  客户入口类型 end =======================
207
+
193 208
 }

+ 5
- 5
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java Parādīt failu

@@ -42,7 +42,7 @@ public class ExtendContentController extends BaseController {
42 42
      * @param pageSize
43 43
      * @return
44 44
      */
45
-    @RequestMapping(value="/extendContent",method= RequestMethod.GET)
45
+    @RequestMapping(value="/admin/extendContent",method= RequestMethod.GET)
46 46
     public ResponseBean extendContentList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47 47
                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48 48
         ResponseBean responseBean = new ResponseBean();
@@ -72,7 +72,7 @@ public class ExtendContentController extends BaseController {
72 72
      * @param extendContent 实体对象
73 73
      * @return
74 74
      */
75
-    @RequestMapping(value="/extendContent",method= RequestMethod.POST)
75
+    @RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
76 76
     public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent){
77 77
         ResponseBean  responseBean= iExtendContentService.extendContentAdd(extendContent);
78 78
           responseBean.addSuccess(extendContent);
@@ -84,7 +84,7 @@ public class ExtendContentController extends BaseController {
84 84
      * @param id  实体ID
85 85
      */
86 86
     @ResponseBody
87
-    @RequestMapping(value="/extendContent/{id}", method= RequestMethod.DELETE)
87
+    @RequestMapping(value="/admin/extendContent/{id}", method= RequestMethod.DELETE)
88 88
     public ResponseBean extendContentDelete(@PathVariable Integer id){
89 89
         ResponseBean responseBean = new ResponseBean();
90 90
         try {
@@ -107,7 +107,7 @@ public class ExtendContentController extends BaseController {
107 107
      * @param extendContent 实体对象
108 108
      * @return
109 109
      */
110
-    @RequestMapping(value="/extendContent/{id}",method= RequestMethod.PUT)
110
+    @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.PUT)
111 111
     public ResponseBean extendContentUpdate(@PathVariable Integer id,
112 112
                                         @RequestBody ExtendContent extendContent){
113 113
         ResponseBean responseBean = new ResponseBean();
@@ -129,7 +129,7 @@ public class ExtendContentController extends BaseController {
129 129
      * 根据id查询对象
130 130
      * @param id  实体ID
131 131
      */
132
-    @RequestMapping(value="/extendContent/{id}",method= RequestMethod.GET)
132
+    @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.GET)
133 133
     public ResponseBean extendContentGet(@PathVariable Integer id){
134 134
         ResponseBean responseBean = new ResponseBean();
135 135
         try {

+ 9
- 2
src/main/java/com/huiju/estateagents/controller/TaBuildingController.java Parādīt failu

@@ -2,6 +2,7 @@ package com.huiju.estateagents.controller;
2 2
 
3 3
 
4 4
 import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.entity.TaBuilding;
5 6
 import com.huiju.estateagents.service.ITaBuildingService;
6 7
 import org.springframework.beans.factory.annotation.Autowired;
7 8
 import org.springframework.web.bind.annotation.*;
@@ -174,6 +175,12 @@ public class TaBuildingController extends BaseController {
174 175
     public ResponseBean wxBuildingSelectId(@PathVariable(value = "id") String id){
175 176
         return taBuildingService.buildingAllSelectId(id);
176 177
     }
177
-
178
-
178
+    /**
179
+     * 查询当前所有项目
180
+     */
181
+    @RequestMapping(value = "/admin/buildingAll", method = RequestMethod.GET)
182
+    public  ResponseBean buildingAll(){
183
+        ResponseBean taBuilding= taBuildingService.buildingAll();
184
+        return taBuilding;
185
+    }
179 186
 }

+ 58
- 2
src/main/java/com/huiju/estateagents/controller/TaBuildingDynamicController.java Parādīt failu

@@ -3,12 +3,15 @@ package com.huiju.estateagents.controller;
3 3
 
4 4
 import com.alibaba.fastjson.JSONObject;
5 5
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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;
8 9
 import com.huiju.estateagents.common.JWTUtils;
9 10
 import com.huiju.estateagents.entity.TaActivityDynamicEnlist;
11
+import com.huiju.estateagents.entity.TaBuilding;
10 12
 import com.huiju.estateagents.entity.TaBuildingDynamic;
11 13
 import com.huiju.estateagents.mapper.TaActivityDynamicEnlistMapper;
14
+import com.huiju.estateagents.mapper.TaBuildingMapper;
12 15
 import com.huiju.estateagents.service.ITaBuildingDynamicService;
13 16
 import org.springframework.beans.factory.annotation.Autowired;
14 17
 import org.springframework.beans.propertyeditors.CustomDateEditor;
@@ -22,6 +25,7 @@ import java.text.DateFormat;
22 25
 import java.text.SimpleDateFormat;
23 26
 import java.time.LocalDateTime;
24 27
 import java.util.Date;
28
+import java.util.HashMap;
25 29
 
26 30
 /**
27 31
  * <p>
@@ -38,6 +42,9 @@ public class TaBuildingDynamicController extends BaseController {
38 42
     @Autowired
39 43
     private ITaBuildingDynamicService iBuildingDynamicService;
40 44
 
45
+    @Autowired
46
+    private TaBuildingMapper taBuildingMapper;
47
+
41 48
     @InitBinder
42 49
     protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
43 50
         DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
@@ -112,7 +119,7 @@ public class TaBuildingDynamicController extends BaseController {
112 119
     public  ResponseBean buildingDynamicAdd(@RequestBody String parameter){
113 120
         ResponseBean responseBean = new ResponseBean();
114 121
         TaBuildingDynamic dynamic = JSONObject.parseObject(parameter, TaBuildingDynamic.class);
115
-        dynamic.setStatus(0);
122
+        dynamic.setStatus(1);
116 123
 //        dynamic.setDynamicId(idGen.nextId()+"");
117 124
         dynamic.setCreateDate(LocalDateTime.now());
118 125
         iBuildingDynamicService.save(dynamic);
@@ -157,4 +164,53 @@ public class TaBuildingDynamicController extends BaseController {
157 164
         iBuildingDynamicService.update(dynamic, dynamicQueryWrapper);
158 165
         return responseBean;
159 166
     }
160
-}
167
+
168
+    @RequestMapping(value = "/admin/buildingDynamic/Details", method = RequestMethod.GET)
169
+    public ResponseBean buildingDynamicDetails(@RequestParam("dynamicId")String dynamicId) {
170
+        ResponseBean responseBean = new ResponseBean();
171
+        QueryWrapper<TaBuildingDynamic> dynamicQueryWrapper = new QueryWrapper<>();
172
+        dynamicQueryWrapper.eq("dynamic_id", dynamicId);
173
+        TaBuildingDynamic dynamic = iBuildingDynamicService.getOne(dynamicQueryWrapper);
174
+        TaBuilding building= taBuildingMapper.selectBuilding(dynamic.getBuildingId());
175
+        dynamic.setBuildingName(building.getBuildingName());
176
+        responseBean.addSuccess(dynamic);
177
+        return responseBean;
178
+    }
179
+
180
+    @RequestMapping(value = "/admin/SignList", method = RequestMethod.GET)
181
+    public ResponseBean getSignList(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
182
+                                    @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
183
+                                    @RequestParam(value = "dynamicId",required = false)String dynamicId) {
184
+        Page<TaActivityDynamicEnlist> page = new Page<>();
185
+        page.setSize(pageSize);
186
+        page.setCurrent(pageNum);
187
+        ResponseBean signList = iBuildingDynamicService.signList(page,dynamicId);
188
+
189
+        HashMap<String, Object> map = new HashMap<>();
190
+        map.put("list", signList);
191
+        map.put("total", page.getTotal());
192
+        map.put("pageNum", page.getCurrent());
193
+        map.put("pageSize", page.getSize());
194
+        return ResponseBean.success(map);
195
+    }
196
+
197
+    @RequestMapping(value = "/admin/buildingDynamic/finish" ,method =RequestMethod.PUT)
198
+    public  ResponseBean buildingDynamicFinish(@RequestBody String parameter) {
199
+        ResponseBean responseBean = new ResponseBean();
200
+        JSONObject object = JSONObject.parseObject(parameter);
201
+        String dynamicId = object.getString("dynamicId");
202
+        String top = object.getString("top");
203
+        QueryWrapper<TaBuildingDynamic> taBuildingDynamic = new QueryWrapper<>();
204
+        taBuildingDynamic.eq("dynamic_id", dynamicId);
205
+        TaBuildingDynamic dynamic = iBuildingDynamicService.getOne(taBuildingDynamic);
206
+        if ("1".equals(top)) {
207
+            dynamic.setCreateDate(LocalDateTime.now());
208
+        } else {
209
+            dynamic.setIsEnlist("2");
210
+        }
211
+        iBuildingDynamicService.update(dynamic, taBuildingDynamic);
212
+        responseBean.addSuccess("成功");
213
+        return responseBean;
214
+    }
215
+    }
216
+

+ 60
- 6
src/main/java/com/huiju/estateagents/controller/TaPointsExchangeController.java Parādīt failu

@@ -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.BaseController;
7 7
 import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.common.CommConstant;
8 9
 import com.huiju.estateagents.entity.TaPointsExchange;
9 10
 import com.huiju.estateagents.service.ITaPointsExchangeService;
10 11
 import org.slf4j.Logger;
@@ -44,11 +45,31 @@ public class TaPointsExchangeController extends BaseController {
44 45
      */
45 46
     @RequestMapping(value="/admin/taPointsExchange",method= RequestMethod.GET)
46 47
     public ResponseBean taPointsExchangeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
-                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
49
+                                             @RequestParam(value ="personName",required = false) String personName,
50
+                                             @RequestParam(value ="phone",required = false) String phone,
51
+                                             @RequestParam(value ="personType",required = false) String personType,
52
+                                             @RequestParam(value ="targetName",required = false) String targetName,
53
+                                             @RequestParam(value ="startCreateDate",required = false) String startCreateDate,
54
+                                             @RequestParam(value ="endCreateDate",required = false) String endCreateDate,
55
+                                             @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
56
+                                             @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
57
+                                             @RequestParam(value ="status",required = false) Integer status,
58
+                                             @RequestParam(value ="tel",required = false) String tel){
48 59
         ResponseBean responseBean = new ResponseBean();
49 60
         try {
50 61
             //使用分页插件
51 62
             TaPointsExchange taPointsExchange = new TaPointsExchange();
63
+            taPointsExchange.setPersonName(personName);
64
+            taPointsExchange.setPhone(phone);
65
+            taPointsExchange.setPersonType(personType);
66
+            taPointsExchange.setTargetName(targetName);
67
+            taPointsExchange.setStartCreateDate(startCreateDate);
68
+            taPointsExchange.setEndCreateDate(endCreateDate);
69
+            taPointsExchange.setStartVerifyDate(startVerifyDate);
70
+            taPointsExchange.setEndVerifyDate(endVerifyDate);
71
+            taPointsExchange.setStatus(status);
72
+            taPointsExchange.setTel(tel);
52 73
             
53 74
             responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
54 75
 
@@ -59,6 +80,31 @@ public class TaPointsExchangeController extends BaseController {
59 80
         }
60 81
         return responseBean;
61 82
     }
83
+    
84
+    /**
85
+     * 修改对象
86
+     * @param taPointsExchange 实体对象
87
+     * @return
88
+     */
89
+    @RequestMapping(value="/admin/taPointsExchange/change",method= RequestMethod.PUT)
90
+    public ResponseBean taPointsExchangeStatusChange(@RequestBody TaPointsExchange taPointsExchange){
91
+        ResponseBean responseBean = new ResponseBean();
92
+        try {
93
+            if (null != taPointsExchange.getStatus() && !taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
94
+                taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
95
+            }
96
+            if (iTaPointsExchangeService.updateById(taPointsExchange)){
97
+                responseBean.addSuccess(taPointsExchange);
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("taPointsExchangeUpdate -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
62 108
 
63 109
     /**
64 110
      * 保存对象
@@ -106,15 +152,23 @@ public class TaPointsExchangeController extends BaseController {
106 152
 
107 153
     /**
108 154
      * 修改对象
109
-     * @param id  实体ID
110
-     * @param taPointsExchange 实体对象
155
+     * @param recId  实体ID
111 156
      * @return
112 157
      */
113
-    @RequestMapping(value="/taPointsExchange/{id}",method= RequestMethod.PUT)
114
-    public ResponseBean taPointsExchangeUpdate(@PathVariable Integer id,
115
-                                        @RequestBody TaPointsExchange taPointsExchange){
158
+    @RequestMapping(value="/admin/taPointsExchange/{recId}",method= RequestMethod.PUT)
159
+    public ResponseBean taPointsExchangeUpdate(@PathVariable Integer recId){
116 160
         ResponseBean responseBean = new ResponseBean();
117 161
         try {
162
+            TaPointsExchange taPointsExchange = iTaPointsExchangeService.getById(recId);
163
+            if (null == taPointsExchange){
164
+                responseBean.addError("找不到需要核销的商品");
165
+                return responseBean;
166
+            }
167
+            if (taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
168
+                responseBean.addError("此商品已经被领取");
169
+                return responseBean;
170
+            }
171
+            taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
118 172
             if (iTaPointsExchangeService.updateById(taPointsExchange)){
119 173
                 responseBean.addSuccess(taPointsExchange);
120 174
             }else {

+ 37
- 0
src/main/java/com/huiju/estateagents/controller/TaPointsRecordsController.java Parādīt failu

@@ -11,6 +11,7 @@ import com.huiju.estateagents.entity.TaPerson;
11 11
 import com.huiju.estateagents.entity.TaPointsRecords;
12 12
 import com.huiju.estateagents.service.ITaPersonService;
13 13
 import com.huiju.estateagents.service.ITaPointsRecordsService;
14
+import org.apache.ibatis.annotations.Mapper;
14 15
 import org.slf4j.Logger;
15 16
 import org.slf4j.LoggerFactory;
16 17
 import org.springframework.beans.factory.annotation.Autowired;
@@ -23,7 +24,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
23 24
 import org.springframework.web.bind.annotation.RestController;
24 25
 
25 26
 import javax.servlet.http.HttpServletRequest;
27
+import java.util.HashMap;
26 28
 import java.util.List;
29
+import java.util.Map;
27 30
 
28 31
 /**
29 32
  * <p>
@@ -126,6 +129,7 @@ public class TaPointsRecordsController extends BaseController {
126 129
     public ResponseBean taPointsRecordsUpdate(@PathVariable Integer id,
127 130
                                         @RequestBody TaPointsRecords taPointsRecords){
128 131
         ResponseBean responseBean = new ResponseBean();
132
+        taPointsRecords.setPointsRecordId(id);
129 133
         try {
130 134
             if (iTaPointsRecordsService.updateById(taPointsRecords)){
131 135
                 responseBean.addSuccess(taPointsRecords);
@@ -185,4 +189,37 @@ public class TaPointsRecordsController extends BaseController {
185 189
         }
186 190
         return responseBean;
187 191
     }
192
+
193
+    /**
194
+     * 分页查询列表
195
+     * @param pageNum
196
+     * @param pageSize
197
+     * @return
198
+     */
199
+    @RequestMapping(value="/admin/taPointsRecords/{id}",method= RequestMethod.GET)
200
+    public ResponseBean CustomerPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
201
+                                            @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
202
+                                            @PathVariable(value = "id") String id){
203
+        ResponseBean responseBean = new ResponseBean();
204
+        try {
205
+            IPage<TaPointsRecords> pg = new Page<>(pageNum, pageSize);
206
+            QueryWrapper<TaPointsRecords> queryWrapper = new QueryWrapper<>();
207
+            queryWrapper.eq("person_id",taPersonService.getPersonIdByCustomerId(id));
208
+            queryWrapper.orderByDesc("create_date");
209
+            IPage<TaPointsRecords> result = iTaPointsRecordsService.page(pg, queryWrapper);
210
+            Integer totalPoints = 0;
211
+            for (int i = 0;i<result.getRecords().size();i++){
212
+                totalPoints += result.getRecords().get(i).getPointsAmount();
213
+            }
214
+            Map<String,Object> data = new HashMap<>();
215
+            data.put("totalPoints",totalPoints);
216
+            data.put("result",result);
217
+            responseBean.addSuccess(data);
218
+        }catch (Exception e){
219
+            e.printStackTrace();
220
+            logger.error("taPointsRecordsList -=- {}",e.toString());
221
+            responseBean.addError(e.getMessage());
222
+        }
223
+        return responseBean;
224
+    }
188 225
 }

+ 32
- 16
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Parādīt failu

@@ -105,24 +105,26 @@ public class TaRecommendCustomerController extends BaseController {
105 105
         }
106 106
     }
107 107
 
108
-    @PostMapping("/customer/recommend")
109
-    public ResponseBean getCustomerList (@RequestParam(value ="name",defaultValue = "false") String name,
110
-                                         @RequestParam(value ="tel",defaultValue = "false") String tel,
111
-                                         @RequestParam(value ="buildingId",defaultValue = "false") String buildingId,
112
-                                         @RequestParam(value ="consultName",defaultValue = "false") String consultName,
113
-                                         @RequestParam(value ="consultTel",defaultValue = "false") String consultTel,
108
+    @GetMapping("/admin/customer/recommend")
109
+    public ResponseBean getCustomerList (@RequestParam(value ="name",required = false) String name,
110
+                                         @RequestParam(value ="tel",required = false) String tel,
111
+                                         @RequestParam(value ="buildingId",required = false) String buildingId,
112
+                                         @RequestParam(value ="consultName",required = false) String consultName,
113
+                                         @RequestParam(value ="consultTel",required = false) String consultTel,
114 114
                                          @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
115
-                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
115
+                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
116
+                                         @RequestParam(value ="entryType",required = false) String entryType,
117
+                                         @RequestParam(value ="verifyStatus",required = false) String verifyStatus){
116 118
         try{
117
-            return ResponseBean.success(taRecommendCustomerService.getCustomerList(pageNumber,pageSize,buildingId,name,tel,consultName,consultTel));
119
+            return ResponseBean.success(taRecommendCustomerService.getCustomerList(pageNumber,pageSize,buildingId,name,tel,consultName,consultTel,entryType,verifyStatus));
118 120
         }catch (Exception e){
119 121
             e.printStackTrace();
120 122
             return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
121 123
         }
122 124
     }
123 125
 
124
-    @PostMapping("/customer/recommend/{customerId}")
125
-    public ResponseBean getCustomersIRecommended (@RequestParam int pageNumber, @RequestParam int pageSize,String customerId){
126
+    @GetMapping("/admin/customer/recommend/{customerId}")
127
+    public ResponseBean getCustomersIRecommended (@RequestParam int pageNumber, @RequestParam int pageSize, @PathVariable String customerId){
126 128
         String buildingId="";
127 129
         try{
128 130
             return ResponseBean.success(taRecommendCustomerService.getCustomersIRecommended(pageNumber,pageSize,customerId,buildingId));
@@ -159,7 +161,7 @@ public class TaRecommendCustomerController extends BaseController {
159 161
      * @param taRecommendCustomer 实体对象
160 162
      * @return
161 163
      */
162
-    @RequestMapping(value="/customer/recommend/edit/{id}",method= RequestMethod.PUT)
164
+    @RequestMapping(value="/admin/customer/recommend/edit/{id}",method= RequestMethod.PUT)
163 165
     public ResponseBean taRecommendCustomerUpdate(@PathVariable String id,
164 166
             @RequestBody TaRecommendCustomer taRecommendCustomer){
165 167
         ResponseBean responseBean = new ResponseBean();
@@ -177,8 +179,8 @@ public class TaRecommendCustomerController extends BaseController {
177 179
         return responseBean;
178 180
     }
179 181
 
180
-    @RequestMapping(value = "/wx/customer/recommend/get/{id}")
181
-    public ResponseBean getSingleCustomer(String customerId) {
182
+    @RequestMapping(value = "/wx/customer/recommend/get/{id}", method = RequestMethod.GET)
183
+    public ResponseBean getSingleCustomer(@PathVariable(value = "id") String customerId) {
182 184
         ResponseBean responseBean = new ResponseBean();
183 185
         try {
184 186
             responseBean.addSuccess(taRecommendCustomerService.getById(customerId));
@@ -189,8 +191,22 @@ public class TaRecommendCustomerController extends BaseController {
189 191
         return responseBean;
190 192
     }
191 193
 
192
-    @RequestMapping(value = "/customer/recommend/get/{id}")
193
-    public ResponseBean getCutomerDetail(String id) {
194
+
195
+    @RequestMapping(value = "/admin/customer/recommend/getById/{id}", method = RequestMethod.GET)
196
+    public ResponseBean getRecommendCustomerById(@PathVariable(value = "id") String customerId) {
197
+        ResponseBean responseBean = new ResponseBean();
198
+        try {
199
+            responseBean.addSuccess(taRecommendCustomerService.getCustomerById(customerId));
200
+        }catch (Exception e){
201
+            e.printStackTrace();
202
+            responseBean.addError(e.getMessage());
203
+        }
204
+        return responseBean;
205
+    }
206
+
207
+
208
+    @GetMapping(value = "/admin/customer/recommend/get/{id}")
209
+    public ResponseBean getCutomerDetail(@PathVariable String id) {
194 210
         ResponseBean responseBean = new ResponseBean();
195 211
         try {
196 212
             responseBean.addSuccess(taRecommendCustomerService.getCustomerDetail(id));
@@ -201,7 +217,7 @@ public class TaRecommendCustomerController extends BaseController {
201 217
         return responseBean;
202 218
     }
203 219
 
204
-    @PostMapping("/customer/recommend/drift")
220
+    @GetMapping("/admin/customer/recommend/drift")
205 221
     public ResponseBean getDriftCustomerList (@RequestParam(value ="buildingId",defaultValue = "false") String buildingId,
206 222
                                          @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
207 223
                                          @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){

+ 144
- 0
src/main/java/com/huiju/estateagents/controller/TdBuildingTypeController.java Parādīt failu

@@ -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.TdBuildingType;
8
+import com.huiju.estateagents.service.ITdBuildingTypeService;
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-07-29
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TdBuildingTypeController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TdBuildingTypeController.class);
34
+
35
+    @Autowired
36
+    public ITdBuildingTypeService iTdBuildingTypeService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/tdBuildingType",method= RequestMethod.GET)
46
+    public ResponseBean tdBuildingTypeList(@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<TdBuildingType> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TdBuildingType> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TdBuildingType> result = iTdBuildingTypeService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            logger.error("tdBuildingTypeList -=- {}",e.toString());
59
+            responseBean.addError(e.getMessage());
60
+        }
61
+        return responseBean;
62
+    }
63
+
64
+    /**
65
+     * 保存对象
66
+     * @param tdBuildingType 实体对象
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/tdBuildingType",method= RequestMethod.POST)
70
+    public ResponseBean tdBuildingTypeAdd(@RequestBody TdBuildingType tdBuildingType){
71
+        ResponseBean responseBean = new ResponseBean();
72
+        try {
73
+            if (iTdBuildingTypeService.save(tdBuildingType)){
74
+                responseBean.addSuccess(tdBuildingType);
75
+            }else {
76
+                responseBean.addError("fail");
77
+            }
78
+        }catch (Exception e){
79
+            logger.error("tdBuildingTypeAdd -=- {}",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="/tdBuildingType/{id}", method= RequestMethod.DELETE)
91
+    public ResponseBean tdBuildingTypeDelete(@PathVariable Integer id){
92
+        ResponseBean responseBean = new ResponseBean();
93
+        try {
94
+            if(iTdBuildingTypeService.removeById(id)){
95
+                responseBean.addSuccess("success");
96
+            }else {
97
+                responseBean.addError("fail");
98
+            }
99
+        }catch (Exception e){
100
+            logger.error("tdBuildingTypeDelete -=- {}",e.toString());
101
+            responseBean.addError(e.getMessage());
102
+        }
103
+        return responseBean;
104
+    }
105
+
106
+    /**
107
+     * 修改对象
108
+     * @param id  实体ID
109
+     * @param tdBuildingType 实体对象
110
+     * @return
111
+     */
112
+    @RequestMapping(value="/tdBuildingType/{id}",method= RequestMethod.PUT)
113
+    public ResponseBean tdBuildingTypeUpdate(@PathVariable Integer id,
114
+                                        @RequestBody TdBuildingType tdBuildingType){
115
+        ResponseBean responseBean = new ResponseBean();
116
+        try {
117
+            if (iTdBuildingTypeService.updateById(tdBuildingType)){
118
+                responseBean.addSuccess(tdBuildingType);
119
+            }else {
120
+                responseBean.addError("fail");
121
+            }
122
+        }catch (Exception e){
123
+            logger.error("tdBuildingTypeUpdate -=- {}",e.toString());
124
+            responseBean.addError(e.getMessage());
125
+        }
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 根据id查询对象
131
+     * @param id  实体ID
132
+     */
133
+    @RequestMapping(value="/tdBuildingType/{id}",method= RequestMethod.GET)
134
+    public ResponseBean tdBuildingTypeGet(@PathVariable Integer id){
135
+        ResponseBean responseBean = new ResponseBean();
136
+        try {
137
+            responseBean.addSuccess(iTdBuildingTypeService.getById(id));
138
+        }catch (Exception e){
139
+            logger.error("tdBuildingTypeDelete -=- {}",e.toString());
140
+            responseBean.addError(e.getMessage());
141
+        }
142
+        return responseBean;
143
+    }
144
+}

+ 16
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java Parādīt failu

@@ -143,4 +143,20 @@ public class TaBuildingDynamic implements Serializable {
143 143
      * 点赞
144 144
      */
145 145
     private  int favorNum;
146
+
147
+    /**
148
+     * 项目名称
149
+     */
150
+    @TableField(exist = false)
151
+    private  String buildingName;
152
+
153
+    /**
154
+     *活动地点
155
+     */
156
+    private  String address;
157
+
158
+    /**
159
+     * 活动人数
160
+     */
161
+    private  String personNum;
146 162
 }

+ 3
- 0
src/main/java/com/huiju/estateagents/entity/TaPointsExchange.java Parādīt failu

@@ -120,4 +120,7 @@ public class TaPointsExchange implements Serializable {
120 120
     
121 121
     @TableField(exist = false)
122 122
     private String endVerifyDate;
123
+    
124
+    @TableField(exist = false)
125
+    private String tel;
123 126
 }

+ 4
- 0
src/main/java/com/huiju/estateagents/entity/TaPointsRecords.java Parādīt failu

@@ -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 lombok.Data;
6 7
 import lombok.EqualsAndHashCode;
@@ -80,5 +81,8 @@ public class TaPointsRecords implements Serializable {
80 81
      */
81 82
     private Integer status;
82 83
 
84
+    @TableField(exist = false)
85
+    private Integer totalPoints;
86
+
83 87
 
84 88
 }

+ 8
- 0
src/main/java/com/huiju/estateagents/entity/TaRecommendCustomer.java Parādīt failu

@@ -123,6 +123,12 @@ public class TaRecommendCustomer implements Serializable {
123 123
     @TableField(exist = false)
124 124
     private Map<String, Object> consultants;
125 125
 
126
+    @TableField(exist = false)
127
+    private String consultantName;
128
+
129
+    @TableField(exist = false)
130
+    private String consultTel;
131
+
126 132
     private Integer verifyStatus;
127 133
 
128 134
     private String verifyRemark;
@@ -133,6 +139,8 @@ public class TaRecommendCustomer implements Serializable {
133 139
 
134 140
     private String city;
135 141
 
142
+    private String entryType;
143
+
136 144
     @TableField(exist = false)
137 145
     private List<TaPersonVisitRecord> visitRecords;
138 146
 

+ 58
- 0
src/main/java/com/huiju/estateagents/entity/TdBuildingType.java Parādīt failu

@@ -0,0 +1,58 @@
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-07-29
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TdBuildingType implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 项目类型id
28
+     */
29
+    @TableId(value = "building_type_id", type = IdType.AUTO)
30
+    private Integer buildingTypeId;
31
+
32
+    /**
33
+     * 项目类型名称
34
+     */
35
+    private String buildingTypeName;
36
+
37
+    /**
38
+     * 状态
39
+     */
40
+    private Integer status;
41
+
42
+    /**
43
+     * 创建时间
44
+     */
45
+    private LocalDateTime createDate;
46
+
47
+    /**
48
+     * 公司id
49
+     */
50
+    private Integer orgId;
51
+
52
+    /**
53
+     * 楼盘id
54
+     */
55
+    private String buildingId;
56
+
57
+
58
+}

+ 11
- 0
src/main/java/com/huiju/estateagents/mapper/TaActivityDynamicEnlistMapper.java Parādīt failu

@@ -1,8 +1,12 @@
1 1
 package com.huiju.estateagents.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.huiju.estateagents.entity.TaActivityDynamicEnlist;
5 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
6 10
 
7 11
 /**
8 12
  * <p>
@@ -15,4 +19,11 @@ import org.apache.ibatis.annotations.Mapper;
15 19
 @Mapper
16 20
 public interface TaActivityDynamicEnlistMapper extends BaseMapper<TaActivityDynamicEnlist> {
17 21
 
22
+    /**
23
+     * 查询活动报名记录
24
+     * @param page
25
+     * @param dynamicId
26
+     * @return
27
+     */
28
+    List<TaActivityDynamicEnlist> signList(Page<TaActivityDynamicEnlist> page, @Param("dynamicId") String dynamicId);
18 29
 }

+ 9
- 0
src/main/java/com/huiju/estateagents/mapper/TaBuildingMapper.java Parādīt failu

@@ -29,4 +29,13 @@ public interface TaBuildingMapper extends BaseMapper<TaBuilding> {
29 29
 
30 30
     @Update("UPDATE ta_building  SET ${field} = IFNULL(${field}, 0) + #{increment}  WHERE building_id = #{buildingId}")
31 31
     void setFieldNum(@Param("buildingId") String buildingId, @Param("field") String field, @Param("increment") int increment);
32
+
33
+    List<TaBuilding> buildingAll();
34
+
35
+    /**
36
+     * 查询当前楼盘
37
+     * @param buildingId
38
+     * @return
39
+     */
40
+    TaBuilding selectBuilding(@Param("buildingId") String buildingId);
32 41
 }

+ 2
- 1
src/main/java/com/huiju/estateagents/mapper/TaPointsExchangeMapper.java Parādīt failu

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 5
 import com.huiju.estateagents.entity.TaPointsExchange;
6 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
7 8
 
8 9
 import java.util.List;
9 10
 
@@ -18,5 +19,5 @@ import java.util.List;
18 19
 @Mapper
19 20
 public interface TaPointsExchangeMapper extends BaseMapper<TaPointsExchange> {
20 21
 	
21
-	List<TaPointsExchange> selectListByParams(Page page, TaPointsExchange taPointsExchange);
22
+	List<TaPointsExchange> selectListByParams(Page page,@Param("taPointsExchange") TaPointsExchange taPointsExchange);
22 23
 }

+ 3
- 0
src/main/java/com/huiju/estateagents/mapper/TaPointsRecordsMapper.java Parādīt failu

@@ -1,8 +1,10 @@
1 1
 package com.huiju.estateagents.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
4 5
 import com.huiju.estateagents.entity.TaPointsRecords;
5 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
6 8
 
7 9
 /**
8 10
  * <p>
@@ -14,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
14 16
  */
15 17
 @Mapper
16 18
 public interface TaPointsRecordsMapper extends BaseMapper<TaPointsRecords> {
19
+    IPage<TaPointsRecords> getCustomerPointsList(IPage<TaPointsRecords> page, @Param("personId") String personId);
17 20
 
18 21
 }

+ 5
- 0
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java Parādīt failu

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.mapper;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
3 4
 import com.huiju.estateagents.entity.TaRecommendCustomer;
4 5
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 6
 import org.apache.ibatis.annotations.Mapper;
@@ -22,5 +23,9 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
22 23
 
23 24
     TaRecommendCustomer getCustomerDetail(@Param("customerId")String customerId);
24 25
 
26
+    TaRecommendCustomer getCustomerById(@Param("customerId")String customerId);
27
+
28
+    IPage<TaRecommendCustomer> getCustomerList(IPage<TaRecommendCustomer> page,@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus);
29
+
25 30
 
26 31
 }

+ 19
- 0
src/main/java/com/huiju/estateagents/mapper/TdBuildingTypeMapper.java Parādīt failu

@@ -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.TdBuildingType;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+/**
9
+ * <p>
10
+ * 项目类型字典表  Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-07-29
15
+ */
16
+@Mapper
17
+public interface TdBuildingTypeMapper extends BaseMapper<TdBuildingType> {
18
+
19
+}

+ 8
- 0
src/main/java/com/huiju/estateagents/service/ITaBuildingDynamicService.java Parādīt failu

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.service;
2 2
 
3
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
3 4
 import com.baomidou.mybatisplus.extension.service.IService;
4 5
 import com.huiju.estateagents.base.ResponseBean;
5 6
 import com.huiju.estateagents.entity.TaActivityDynamicEnlist;
@@ -69,4 +70,11 @@ public interface ITaBuildingDynamicService extends IService<TaBuildingDynamic> {
69 70
      * @return
70 71
      */
71 72
     ResponseBean taActivityDynamicEnlistAdd(TaActivityDynamicEnlist taActivityDynamicEnlist);
73
+
74
+    /**
75
+     * 报名列表
76
+     * @param page
77
+     * @return
78
+     */
79
+    ResponseBean signList(Page<TaActivityDynamicEnlist> page,String dynamicId);
72 80
 }

+ 6
- 0
src/main/java/com/huiju/estateagents/service/ITaBuildingService.java Parādīt failu

@@ -128,4 +128,10 @@ public interface ITaBuildingService extends IService<TaBuilding> {
128 128
      * @return
129 129
      */
130 130
     ResponseBean apartmentDel(String id);
131
+
132
+    /**
133
+     * 查询所有项目
134
+     * @return
135
+     */
136
+    ResponseBean buildingAll();
131 137
 }

+ 2
- 0
src/main/java/com/huiju/estateagents/service/ITaPersonService.java Parādīt failu

@@ -54,5 +54,7 @@ public interface ITaPersonService extends IService<TaPerson> {
54 54
 
55 55
     IPage<TaPerson> getDriftCustomerList (int pageNumber, int pageSize,String building);
56 56
 
57
+    String getPersonIdByCustomerId(String customerId);
58
+
57 59
 
58 60
 }

+ 3
- 1
src/main/java/com/huiju/estateagents/service/ITaRecommendCustomerService.java Parādīt failu

@@ -26,10 +26,12 @@ public interface ITaRecommendCustomerService extends IService<TaRecommendCustome
26 26
 
27 27
     IPage<TaRecommendCustomer> getUnSignedCustomerList(int pageNumber, int pageSize, String building,String personId);
28 28
 
29
-    IPage<TaRecommendCustomer> getCustomerList(int pageNumber, int pageSize, String building,String name,String tel,String consultName,String consultTel);
29
+    IPage<TaRecommendCustomer> getCustomerList(int pageNumber, int pageSize, String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus);
30 30
 
31 31
     TaRecommendCustomer getCustomerDetail(String customerId);
32 32
 
33
+    TaRecommendCustomer getCustomerById(String customerId);
34
+
33 35
     IPage<TaRecommendCustomer>getCustomersIRecommended(int pageNumber, int pageSize,String customerId,String building);
34 36
 
35 37
 

+ 17
- 0
src/main/java/com/huiju/estateagents/service/ITdBuildingTypeService.java Parādīt failu

@@ -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.TdBuildingType;
6
+
7
+/**
8
+ * <p>
9
+ * 项目类型字典表  服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-07-29
14
+ */
15
+public interface ITdBuildingTypeService extends IService<TdBuildingType> {
16
+
17
+}

+ 14
- 1
src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java Parādīt failu

@@ -69,7 +69,14 @@ public class TaBuildingDynamicServiceImpl extends ServiceImpl<TaBuildingDynamicM
69 69
         page.setCurrent(pageNum == null ? 1 : pageNum);
70 70
 
71 71
         IPage<TaBuildingDynamic> buildingDynamic = buildingDynamicMapper.buildingDynamicList(page, name, buildingId);
72
-        List<TaBuildingDynamic> buildingDynamicList=buildingDynamic.getRecords();
72
+        List<TaBuildingDynamic> buildingDynamicList = buildingDynamic.getRecords();
73
+        for (TaBuildingDynamic taBuildingDynamic:buildingDynamicList){
74
+            QueryWrapper<TaActivityDynamicEnlist> taActivityDynamicEnlist= new QueryWrapper<>();
75
+            taActivityDynamicEnlist.eq("dynamic_id",taBuildingDynamic.getDynamicId());
76
+            taActivityDynamicEnlist.eq("building_id",taBuildingDynamic.getBuildingId());
77
+            int singCount= taActivityDynamicEnlistMapper.selectCount(taActivityDynamicEnlist);
78
+            taBuildingDynamic.setCount(singCount);
79
+        }
73 80
 
74 81
         HashMap hashMap= new HashMap<>();
75 82
         hashMap.put("list",buildingDynamicList);
@@ -219,6 +226,12 @@ public class TaBuildingDynamicServiceImpl extends ServiceImpl<TaBuildingDynamicM
219 226
         return ResponseBean.success(state);
220 227
     }
221 228
 
229
+    @Override
230
+    public ResponseBean signList(Page<TaActivityDynamicEnlist> page, String dynamicId) {
231
+        List<TaActivityDynamicEnlist> signList= taActivityDynamicEnlistMapper.signList(page,dynamicId);
232
+        return ResponseBean.success(signList);
233
+    }
234
+
222 235
     /**
223 236
      *     根据报名开始时间和结束时间判断当前图标状态
224 237
      */

+ 6
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java Parādīt failu

@@ -452,6 +452,12 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
452 452
        return ResponseBean.success("");
453 453
     }
454 454
 
455
+    @Override
456
+    public ResponseBean buildingAll() {
457
+        List<TaBuilding> taBuilding= taBuildingMapper.buildingAll();
458
+        return ResponseBean.success(taBuilding);
459
+    }
460
+
455 461
 
456 462
     int insertImgBatch(List<TaBuildingImg> imgs, String buildingId) {
457 463
         int rows = 0;

+ 5
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java Parādīt failu

@@ -639,4 +639,9 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
639 639
         IPage<TaPerson> page = new Page<>(pageNumber, pageSize);
640 640
         return taPersonMapper.selectPage(page,queryWrapper);
641 641
     }
642
+
643
+    @Override
644
+    public String getPersonIdByCustomerId(String customerId){
645
+        return taRecommendCustomerMapper.getCustomerPersonId(customerId);
646
+    }
642 647
 }

+ 10
- 24
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Parādīt failu

@@ -246,39 +246,25 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
246 246
     }
247 247
 
248 248
     @Override
249
-    public IPage<TaRecommendCustomer> getCustomerList(int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel){
250
-        QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
251
-        if(building.equals("") && null != building){
252
-            queryWrapper.eq("building_id",building);
253
-        }
254
-        if(name.equals("") && null != name){
255
-            queryWrapper.like("name",name);
256
-        }
257
-        if(tel.equals("") && null != tel){
258
-            queryWrapper.eq("phone",tel);
259
-        }
260
-        if(consultName.equals("") && null != consultName){
261
-            List<String> consultIds = taPersonMapper.getConsultantByName(consultName);
262
-            queryWrapper.in("realty_consultant",consultIds);
263
-        }
264
-        if(consultTel.equals("") && null != consultTel){
265
-            String consultId = taPersonMapper.getConsultantByTel(consultTel);
266
-            queryWrapper.eq("realty_consultant",consultId);
267
-        }
268
-
269
-        queryWrapper.gt("status", CommConstant.MESSAGE_UNREAD);
249
+    public IPage<TaRecommendCustomer> getCustomerList(int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus){
270 250
         IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
271
-        return taRecommendCustomerMapper.selectPage(page,queryWrapper);
251
+        return taRecommendCustomerMapper.getCustomerList(page,building,name,tel,consultName,consultTel,entryType,verifyStatus);
252
+    }
253
+
254
+    @Override
255
+    public TaRecommendCustomer getCustomerById(String customerId){
256
+        return taRecommendCustomerMapper.getCustomerById(customerId);
272 257
     }
273 258
 
259
+
274 260
     @Override
275 261
     public TaRecommendCustomer getCustomerDetail(String customerId){
276 262
         String personId = taRecommendCustomerMapper.getCustomerPersonId(customerId);
277 263
         TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId);
278
-        if(!personId.equals("")&& null != personId){
264
+        if(!StringUtils.isEmpty(personId)){
279 265
             taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
280 266
         }
281
-        if(!taRecommendCustomer.getRealtyConsultant().equals("")&&null != taRecommendCustomer.getRealtyConsultant()){
267
+        if(!StringUtils.isEmpty(taRecommendCustomer.getRealtyConsultant())){
282 268
             TaPerson consultant =  taPersonMapper.getById(taRecommendCustomer.getRealtyConsultant());
283 269
             consultant.setProjects(taPersonMapper.getUserProjects(consultant.getPersonId()));
284 270
             taRecommendCustomer.setConsultant(consultant);

+ 21
- 0
src/main/java/com/huiju/estateagents/service/impl/TdBuildingTypeServiceImpl.java Parādīt failu

@@ -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.TdBuildingType;
6
+import com.huiju.estateagents.mapper.TdBuildingTypeMapper;
7
+import com.huiju.estateagents.service.ITdBuildingTypeService;
8
+import org.springframework.stereotype.Service;
9
+
10
+/**
11
+ * <p>
12
+ * 项目类型字典表  服务实现类
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-07-29
17
+ */
18
+@Service
19
+public class TdBuildingTypeServiceImpl extends ServiceImpl<TdBuildingTypeMapper, TdBuildingType> implements ITdBuildingTypeService {
20
+
21
+}

+ 3
- 1
src/main/resources/mapper/TaActivityDynamicEnlistMapper.xml Parādīt failu

@@ -1,5 +1,7 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.huiju.estateagents.mapper.TaActivityDynamicEnlistMapper">
4
-
4
+        <select id="signList" resultType="com.huiju.estateagents.entity.TaActivityDynamicEnlist">
5
+            select * from ta_activity_dynamic_enlist where dynamic_id = #{dynamicId}
6
+        </select>
5 7
 </mapper>

+ 1
- 0
src/main/resources/mapper/TaBuildingDynamicMapper.xml Parādīt failu

@@ -24,6 +24,7 @@
24 24
         <if test="buildingId != null and buildingId !=''">
25 25
             and building_id = #{buildingId}
26 26
         </if>
27
+        ORDER BY create_date DESC
27 28
   </select>
28 29
 
29 30
     <select id="iBuildingDynamicSelectId" parameterType="string" resultType="com.huiju.estateagents.entity.TaBuildingDynamic">

+ 10
- 0
src/main/resources/mapper/TaBuildingMapper.xml Parādīt failu

@@ -15,4 +15,14 @@
15 15
         ORDER BY create_date DESC
16 16
     </select>
17 17
 
18
+    <select id="buildingAll" resultType="com.huiju.estateagents.entity.TaBuilding">
19
+         SELECT * FROM ta_building
20
+         where status > -1
21
+    </select>
22
+
23
+    <select id="selectBuilding" resultType="com.huiju.estateagents.entity.TaBuilding">
24
+         SELECT * FROM ta_building
25
+         where building_id = #{buildingId}
26
+    </select>
27
+
18 28
 </mapper>

+ 31
- 0
src/main/resources/mapper/TaPointsExchangeMapper.xml Parādīt failu

@@ -24,5 +24,36 @@
24 24
         FROM
25 25
             ta_points_exchange t
26 26
             LEFT JOIN ta_person p ON t.person_id = p.person_id
27
+        where 1=1
28
+        <if test="taPointsExchange.status != null and taPointsExchange.status != '' or taPointsExchange.status ==0">
29
+            and  t.`status` = #{taPointsExchange.status}
30
+        </if>
31
+        <if test="taPointsExchange.personName != null and taPointsExchange.personName != ''">
32
+            and  t.person_name like concat('%',#{taPointsExchange.personName},'%')
33
+        </if>
34
+        <if test="taPointsExchange.phone != null and taPointsExchange.phone != ''">
35
+            and  t.phone like concat('%',#{taPointsExchange.phone},'%')
36
+        </if>
37
+        <if test="taPointsExchange.tel != null and taPointsExchange.tel != ''">
38
+            and  t.phone = #{taPointsExchange.tel}
39
+        </if>
40
+        <if test="taPointsExchange.personType != null and taPointsExchange.personType != ''">
41
+            and  p.person_type = #{taPointsExchange.personType}
42
+        </if>
43
+        <if test="taPointsExchange.targetName != null and taPointsExchange.targetName != ''">
44
+            and  t.target_name like concat('%',#{taPointsExchange.targetName},'%')
45
+        </if>
46
+        <if test="taPointsExchange.startCreateDate != null and taPointsExchange.startCreateDate != ''">
47
+            and  date_format(t.create_date,'%Y-%m-%d') >= date_format(#{taPointsExchange.startCreateDate},'%Y-%m-%d')
48
+        </if>
49
+        <if test="taPointsExchange.endCreateDate != null and taPointsExchange.endCreateDate != ''">
50
+            and  date_format(t.create_date,'%Y-%m-%d') &lt;= date_format(#{taPointsExchange.endCreateDate},'%Y-%m-%d')
51
+        </if>
52
+        <if test="taPointsExchange.startVerifyDate != null and taPointsExchange.startVerifyDate != ''">
53
+            and  date_format(t.verify_date,'%Y-%m-%d') >= date_format(#{taPointsExchange.startVerifyDate},'%Y-%m-%d')
54
+        </if>
55
+        <if test="taPointsExchange.endVerifyDate != null and taPointsExchange.endVerifyDate != ''">
56
+            and  date_format(t.verify_date,'%Y-%m-%d') &lt;= date_format(#{taPointsExchange.startVerifyDate},'%Y-%m-%d')
57
+        </if>
27 58
     </select>
28 59
 </mapper>

+ 44
- 0
src/main/resources/mapper/TaRecommendCustomerMapper.xml Parādīt failu

@@ -30,4 +30,48 @@ FROM
30 30
 	LEFT JOIN ta_person_visit_record c ON b.person_id = c.person_id
31 31
 	where a.customer_id = #{customerId}
32 32
     </select>
33
+
34
+    <select id="getCustomerList" resultType="com.huiju.estateagents.entity.TaRecommendCustomer">
35
+        SELECT
36
+	a.*,
37
+	b.name as consultantName,
38
+    b.tel as consultTel
39
+FROM
40
+	ta_recommend_customer a
41
+	LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
42
+	<where>
43
+        a.status > 0
44
+        <if test="building != null and building !=''">
45
+            and a.building_id = #{building}
46
+        </if>
47
+        <if test="name != null and name !=''">
48
+            and a.name = #{name}
49
+        </if>
50
+        <if test="tel != null and tel!=''">
51
+            and a.phone = #{tel}
52
+        </if>
53
+        <if test="consultName != null and consultName !=''">
54
+            and b.name like CONCAT('%',#{consultName}, '%')
55
+        </if>
56
+        <if test="consultTel != null and consultTel !=''">
57
+            and b.tel = #{consultTel}
58
+        </if>
59
+        <if test="entryType != null and entryType !=''">
60
+            and a.entry_type = #{entryType}
61
+        </if>
62
+        <if test="verifyStatus != null and verifyStatus !=''">
63
+            and a.verify_status = #{verifyStatus}
64
+        </if>
65
+
66
+    </where>
67
+    </select>
68
+    <select id="getCustomerById" resultType="com.huiju.estateagents.entity.TaRecommendCustomer">
69
+         SELECT
70
+	a.*,
71
+	b.name as consultantName
72
+FROM
73
+	ta_recommend_customer a
74
+	LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
75
+	WHERE a.customer_id = #{customerId}
76
+    </select>
33 77
 </mapper>

+ 5
- 0
src/main/resources/mapper/TdBuildingTypeMapper.xml Parādīt failu

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