瀏覽代碼

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

# Conflicts:
#	src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java
傅行帆 5 年之前
父節點
當前提交
0192b3c50d

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

157
      * @param pageSize     分页大小
157
      * @param pageSize     分页大小
158
      * @param salesBatchId 销售批次ID
158
      * @param salesBatchId 销售批次ID
159
      * @return
159
      * @return
160
+     * @author gushaoyong
160
      */
161
      */
161
-    @RequestMapping(value = "/wx/listHousingResources", method = RequestMethod.POST)
162
+    @RequestMapping(value = "/wx/listHousingResources", method = RequestMethod.GET)
162
     public ResponseBean listHousingResources(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
163
     public ResponseBean listHousingResources(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
163
                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
164
                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
164
                                              @RequestParam(value = "salesBatchId") String salesBatchId,
165
                                              @RequestParam(value = "salesBatchId") String salesBatchId,
178
      *
179
      *
179
      * @param salesBatchId
180
      * @param salesBatchId
180
      * @return
181
      * @return
182
+     * @author gushaoyong
181
      */
183
      */
182
-    @RequestMapping(value = "/wx/listBuildApartmentBySalesBatchId", method = RequestMethod.POST)
184
+    @RequestMapping(value = "/wx/listBuildApartmentBySalesBatchId", method = RequestMethod.GET)
183
     public ResponseBean listBuildApartmentBySalesBatchId(@RequestParam(value = "salesBatchId") String salesBatchId) {
185
     public ResponseBean listBuildApartmentBySalesBatchId(@RequestParam(value = "salesBatchId") String salesBatchId) {
184
         ResponseBean responseBean = new ResponseBean();
186
         ResponseBean responseBean = new ResponseBean();
185
         try {
187
         try {
196
      *
198
      *
197
      * @param houseId
199
      * @param houseId
198
      * @return
200
      * @return
201
+     * @author gushaoyong
199
      */
202
      */
200
-    @RequestMapping(value = "/wx/getHousingDetailById", method = RequestMethod.POST)
203
+    @RequestMapping(value = "/wx/getHousingDetailById", method = RequestMethod.GET)
201
     public ResponseBean getHousingDetailById(@RequestParam(value = "houseId") String houseId,
204
     public ResponseBean getHousingDetailById(@RequestParam(value = "houseId") String houseId,
202
                                              @RequestParam(value = "personId") String personId) {
205
                                              @RequestParam(value = "personId") String personId) {
203
         ResponseBean responseBean = new ResponseBean();
206
         ResponseBean responseBean = new ResponseBean();

+ 8
- 4
src/main/java/com/huiju/estateagents/controller/TaPreselectionRecordController.java 查看文件

39
      * @param pageNum
39
      * @param pageNum
40
      * @param pageSize
40
      * @param pageSize
41
      * @return
41
      * @return
42
+     * @author gushaoyong
42
      */
43
      */
43
     @RequestMapping(value = "/taPreselectionRecord", method = RequestMethod.GET)
44
     @RequestMapping(value = "/taPreselectionRecord", method = RequestMethod.GET)
44
     public ResponseBean taPreselectionRecordList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
45
     public ResponseBean taPreselectionRecordList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
65
      *
66
      *
66
      * @param taPreselectionRecord 实体对象
67
      * @param taPreselectionRecord 实体对象
67
      * @return
68
      * @return
69
+     * @author gushaoyong
68
      */
70
      */
69
     @RequestMapping(value = "/taPreselectionRecord", method = RequestMethod.POST)
71
     @RequestMapping(value = "/taPreselectionRecord", method = RequestMethod.POST)
70
     public ResponseBean taPreselectionRecordAdd(@RequestBody TaPreselectionRecord taPreselectionRecord) {
72
     public ResponseBean taPreselectionRecordAdd(@RequestBody TaPreselectionRecord taPreselectionRecord) {
172
         try {
174
         try {
173
             responseBean.addSuccess(iTaPreselectionRecordService.taPreselectionRecordCancel(personId, houseId));
175
             responseBean.addSuccess(iTaPreselectionRecordService.taPreselectionRecordCancel(personId, houseId));
174
         } catch (Exception e) {
176
         } catch (Exception e) {
175
-            logger.error("taPreselectionRecordCancel -=- {}", e.toString());
177
+            logger.error("taPreselectionRecordCancel -=- {}", e);
176
             responseBean.addError(e.getMessage());
178
             responseBean.addError(e.getMessage());
177
         }
179
         }
178
         return responseBean;
180
         return responseBean;
185
      * @param pageSize 分页大小
187
      * @param pageSize 分页大小
186
      * @param personId 用户ID
188
      * @param personId 用户ID
187
      * @return
189
      * @return
190
+     * @author gushaoyong
188
      */
191
      */
189
-    @RequestMapping(value = "/wx/listPreselectionRecord", method = RequestMethod.POST)
192
+    @RequestMapping(value = "/wx/listPreselectionRecord", method = RequestMethod.GET)
190
     public ResponseBean listPreselectionRecord(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
193
     public ResponseBean listPreselectionRecord(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
191
                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
194
                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
192
                                                @RequestParam("personId") String personId) {
195
                                                @RequestParam("personId") String personId) {
194
         try {
197
         try {
195
             responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNum, pageSize, personId));
198
             responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNum, pageSize, personId));
196
         } catch (Exception e) {
199
         } catch (Exception e) {
197
-            logger.error("listPreselectionRecord -=- {}", e.toString());
200
+            logger.error("listPreselectionRecord -=- {}", e);
198
             responseBean.addError(e.getMessage());
201
             responseBean.addError(e.getMessage());
199
         }
202
         }
200
         return responseBean;
203
         return responseBean;
206
      * @param personId 用户ID
209
      * @param personId 用户ID
207
      * @param houseId  房源ID
210
      * @param houseId  房源ID
208
      * @return
211
      * @return
212
+     * @author gushaoyong
209
      */
213
      */
210
     @RequestMapping(value = "/wx/checkPreselect", method = RequestMethod.POST)
214
     @RequestMapping(value = "/wx/checkPreselect", method = RequestMethod.POST)
211
     public ResponseBean checkPreselect(@RequestParam("personId") String personId,
215
     public ResponseBean checkPreselect(@RequestParam("personId") String personId,
214
         try {
218
         try {
215
             responseBean.addSuccess(iTaPreselectionRecordService.checkPreselect(personId, houseId));
219
             responseBean.addSuccess(iTaPreselectionRecordService.checkPreselect(personId, houseId));
216
         } catch (Exception e) {
220
         } catch (Exception e) {
217
-            logger.error("checkPreselect -=- {}", e.toString());
221
+            logger.error("checkPreselect -=- {}", e);
218
             responseBean.addError(e.getMessage());
222
             responseBean.addError(e.getMessage());
219
         }
223
         }
220
         return responseBean;
224
         return responseBean;

+ 9
- 1
src/main/java/com/huiju/estateagents/po/TaHousingResourcesPO.java 查看文件

1
 package com.huiju.estateagents.po;
1
 package com.huiju.estateagents.po;
2
 
2
 
3
 import com.baomidou.mybatisplus.annotation.TableField;
3
 import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.huiju.estateagents.entity.TaBuildingImg;
4
 import com.huiju.estateagents.entity.TaHousingResources;
5
 import com.huiju.estateagents.entity.TaHousingResources;
5
 import lombok.Data;
6
 import lombok.Data;
6
 import lombok.EqualsAndHashCode;
7
 import lombok.EqualsAndHashCode;
7
 import lombok.experimental.Accessors;
8
 import lombok.experimental.Accessors;
8
 
9
 
9
 import java.time.LocalDateTime;
10
 import java.time.LocalDateTime;
11
+import java.util.List;
10
 
12
 
11
 /**
13
 /**
12
  * @Auther: gusy
14
  * @Auther: gusy
27
     private Double buildingArea;
29
     private Double buildingArea;
28
 
30
 
29
     /**
31
     /**
30
-     * 是否预选已经预选,1 是 0
32
+     * 是否已经预选该房源,true 是 false
31
      */
33
      */
32
     @TableField(exist = false)
34
     @TableField(exist = false)
33
     private Boolean isPreselect;
35
     private Boolean isPreselect;
46
      * 销售批次状态
48
      * 销售批次状态
47
      */
49
      */
48
     private Integer saleBatchStatus;
50
     private Integer saleBatchStatus;
51
+
52
+    /**
53
+     * 户型图片列表
54
+     */
55
+    @TableField(exist = false)
56
+    private List<TaBuildingImg> buildingImgList;
49
 }
57
 }

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

1
 package com.huiju.estateagents.po;
1
 package com.huiju.estateagents.po;
2
 
2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.huiju.estateagents.entity.TaBuildingImg;
3
 import com.huiju.estateagents.entity.TaPreselectionRecord;
5
 import com.huiju.estateagents.entity.TaPreselectionRecord;
4
 import lombok.Data;
6
 import lombok.Data;
5
 import lombok.EqualsAndHashCode;
7
 import lombok.EqualsAndHashCode;
6
 import lombok.experimental.Accessors;
8
 import lombok.experimental.Accessors;
7
 
9
 
10
+import java.util.List;
11
+
8
 /**
12
 /**
9
  * @Auther: gusy
13
  * @Auther: gusy
10
  * @Date: 2020/2/11 15:16
14
  * @Date: 2020/2/11 15:16
38
      * 价格
42
      * 价格
39
      */
43
      */
40
     private String price;
44
     private String price;
45
+
46
+    /**
47
+     * 户型id
48
+     */
49
+    private String apartmentId;
50
+
51
+    /**
52
+     * 楼盘名称
53
+     */
54
+    private String buildingName;
55
+
56
+    /**
57
+     * 户型图片列表
58
+     */
59
+    @TableField(exist = false)
60
+    private List<TaBuildingImg> buildingImgList;
41
 }
61
 }

+ 70
- 3
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java 查看文件

9
 import com.huiju.estateagents.common.StringUtils;
9
 import com.huiju.estateagents.common.StringUtils;
10
 import com.huiju.estateagents.entity.*;
10
 import com.huiju.estateagents.entity.*;
11
 import com.huiju.estateagents.mapper.*;
11
 import com.huiju.estateagents.mapper.*;
12
+import com.huiju.estateagents.mapper.TaApartmentImgMapper;
13
+import com.huiju.estateagents.mapper.TaBuildingImgMapper;
14
+import com.huiju.estateagents.mapper.TaHousingResourcesMapper;
15
+import com.huiju.estateagents.mapper.TaPreselectionRecordMapper;
12
 import com.huiju.estateagents.po.TaHousingResourcesPO;
16
 import com.huiju.estateagents.po.TaHousingResourcesPO;
13
 import com.huiju.estateagents.service.ITaHousingResourcesService;
17
 import com.huiju.estateagents.service.ITaHousingResourcesService;
18
+import org.apache.commons.collections.CollectionUtils;
14
 import org.slf4j.Logger;
19
 import org.slf4j.Logger;
15
 import org.slf4j.LoggerFactory;
20
 import org.slf4j.LoggerFactory;
16
 import org.springframework.beans.factory.annotation.Autowired;
21
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.stereotype.Service;
22
 import org.springframework.stereotype.Service;
18
-
19
 import java.time.LocalDateTime;
23
 import java.time.LocalDateTime;
24
+import java.util.ArrayList;
20
 import java.util.List;
25
 import java.util.List;
21
 
26
 
22
 /**
27
 /**
56
     @Autowired
61
     @Autowired
57
     private TaPreselectionRecordMapper taPreselectionRecordMapper;
62
     private TaPreselectionRecordMapper taPreselectionRecordMapper;
58
 
63
 
64
+    @Autowired
65
+    TaBuildingImgMapper taBuildingImgMapper;
66
+
67
+    @Autowired
68
+    TaApartmentImgMapper taApartmentImgMapper;
69
+
59
 
70
 
60
     /**
71
     /**
61
      * 分页获取房源列表
72
      * 分页获取房源列表
87
     public List<TaBuildingApartment> listBuildApartmentBySalesBatchId(String salesBatchId) {
98
     public List<TaBuildingApartment> listBuildApartmentBySalesBatchId(String salesBatchId) {
88
         logger.info("listBuildApartmentBySalesBatchId 接收参数:salesBatchId:{}", salesBatchId);
99
         logger.info("listBuildApartmentBySalesBatchId 接收参数:salesBatchId:{}", salesBatchId);
89
 
100
 
90
-        return taHousingResourcesMapper.listBuildApartmentBySalesBatchId(salesBatchId);
101
+        // 获取户型列表
102
+        List<TaBuildingApartment> apartmentList = taHousingResourcesMapper.listBuildApartmentBySalesBatchId(salesBatchId);
103
+        if (CollectionUtils.isEmpty(apartmentList)) {
104
+            return null;
105
+        }
106
+
107
+        // 组装户型图片
108
+        List<TaBuildingApartment> resultList = new ArrayList<>();
109
+        List<TaBuildingImg> taBuildingImgList;
110
+        List<TaApartmentImg> buildingImg;
111
+        QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper;
112
+        QueryWrapper<TaBuildingImg> buildingImgQueryWrapper;
113
+        for (TaBuildingApartment apartment : apartmentList) {
114
+            apartmentImgQueryWrapper = new QueryWrapper<>();
115
+            apartmentImgQueryWrapper.eq("apartment_id", apartment.getApartmentId());
116
+            buildingImg = taApartmentImgMapper.selectList(apartmentImgQueryWrapper);
117
+            for (TaApartmentImg apartmentImg : buildingImg) {
118
+                buildingImgQueryWrapper = new QueryWrapper<>();
119
+                buildingImgQueryWrapper.eq("img_id", apartmentImg.getImgId());
120
+                buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
121
+                taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
122
+                apartment.setBuildingImgList(taBuildingImgList);
123
+                resultList.add(apartment);
124
+            }
125
+        }
126
+        return resultList;
91
     }
127
     }
92
 
128
 
93
     /**
129
     /**
101
     public TaHousingResourcesPO getHousingDetailById(String personId, String houseId) {
137
     public TaHousingResourcesPO getHousingDetailById(String personId, String houseId) {
102
         logger.info("getHousingDetailById 接收参数:personId:{},houseId:{}", personId, houseId);
138
         logger.info("getHousingDetailById 接收参数:personId:{},houseId:{}", personId, houseId);
103
 
139
 
104
-        return taHousingResourcesMapper.getHousingDetailById(houseId, "1");
140
+        // 查询房源详情
141
+        TaHousingResourcesPO resourcesPO = taHousingResourcesMapper.getHousingDetailById(houseId, "1");
142
+        if (resourcesPO == null) {
143
+            return null;
144
+        }
145
+
146
+        // 获取该用户是否预选房源信息
147
+        TaPreselectionRecord taPreselectionRecord = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
148
+        if (taPreselectionRecord == null) {
149
+            resourcesPO.setIsPreselect(false);
150
+        } else {
151
+            resourcesPO.setIsPreselect(true);
152
+        }
153
+
154
+        // 获取户型图片列表
155
+        List<TaBuildingImg> taBuildingImgList = new ArrayList<>();
156
+        List<TaApartmentImg> buildingImg;
157
+        QueryWrapper<TaBuildingImg> buildingImgQueryWrapper;
158
+        QueryWrapper<TaApartmentImg>  apartmentImgQueryWrapper = new QueryWrapper<>();
159
+        apartmentImgQueryWrapper.eq("apartment_id", resourcesPO.getApartmentId());
160
+        buildingImg = taApartmentImgMapper.selectList(apartmentImgQueryWrapper);
161
+        for (TaApartmentImg apartmentImg : buildingImg) {
162
+            buildingImgQueryWrapper = new QueryWrapper<>();
163
+            buildingImgQueryWrapper.eq("img_id", apartmentImg.getImgId());
164
+            buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
165
+            taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
166
+        }
167
+        if(CollectionUtils.isNotEmpty(taBuildingImgList)){
168
+            resourcesPO.setBuildingImgList(taBuildingImgList);
169
+        }
170
+
171
+        return resourcesPO;
105
     }
172
     }
106
 
173
 
107
     /**
174
     /**

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

1
 package com.huiju.estateagents.service.impl;
1
 package com.huiju.estateagents.service.impl;
2
 
2
 
3
 import com.alibaba.fastjson.JSONObject;
3
 import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
 import com.huiju.estateagents.base.ResponseBean;
8
 import com.huiju.estateagents.base.ResponseBean;
9
+import com.huiju.estateagents.common.CommConstant;
8
 import com.huiju.estateagents.common.DateUtils;
10
 import com.huiju.estateagents.common.DateUtils;
11
+import com.huiju.estateagents.entity.TaApartmentImg;
12
+import com.huiju.estateagents.entity.TaBuildingImg;
9
 import com.huiju.estateagents.entity.TaPreselectionRecord;
13
 import com.huiju.estateagents.entity.TaPreselectionRecord;
14
+import com.huiju.estateagents.mapper.TaApartmentImgMapper;
15
+import com.huiju.estateagents.mapper.TaBuildingImgMapper;
10
 import com.huiju.estateagents.mapper.TaHousingResourcesMapper;
16
 import com.huiju.estateagents.mapper.TaHousingResourcesMapper;
11
 import com.huiju.estateagents.mapper.TaPreselectionRecordMapper;
17
 import com.huiju.estateagents.mapper.TaPreselectionRecordMapper;
12
 import com.huiju.estateagents.po.TaHousingResourcesPO;
18
 import com.huiju.estateagents.po.TaHousingResourcesPO;
13
 import com.huiju.estateagents.po.TaPreselectionRecordPO;
19
 import com.huiju.estateagents.po.TaPreselectionRecordPO;
14
 import com.huiju.estateagents.service.ITaPreselectionRecordService;
20
 import com.huiju.estateagents.service.ITaPreselectionRecordService;
21
+import org.apache.commons.collections.CollectionUtils;
15
 import org.slf4j.Logger;
22
 import org.slf4j.Logger;
16
 import org.slf4j.LoggerFactory;
23
 import org.slf4j.LoggerFactory;
17
 import org.springframework.beans.factory.annotation.Autowired;
24
 import org.springframework.beans.factory.annotation.Autowired;
19
 import org.springframework.transaction.annotation.Transactional;
26
 import org.springframework.transaction.annotation.Transactional;
20
 
27
 
21
 import java.time.LocalDateTime;
28
 import java.time.LocalDateTime;
29
+import java.util.ArrayList;
30
+import java.util.List;
22
 
31
 
23
 /**
32
 /**
24
  * <p>
33
  * <p>
39
     @Autowired
48
     @Autowired
40
     private TaHousingResourcesMapper taHousingResourcesMapper;
49
     private TaHousingResourcesMapper taHousingResourcesMapper;
41
 
50
 
51
+    @Autowired
52
+    TaBuildingImgMapper taBuildingImgMapper;
53
+
54
+    @Autowired
55
+    TaApartmentImgMapper taApartmentImgMapper;
56
+
42
     @Override
57
     @Override
43
     public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, String personId) {
58
     public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, String personId) {
44
         logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},personId:{}", pageNum, pageSize, personId);
59
         logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},personId:{}", pageNum, pageSize, personId);
45
 
60
 
46
         IPage<TaPreselectionRecordPO> iPage = new Page<>(pageNum, pageSize);
61
         IPage<TaPreselectionRecordPO> iPage = new Page<>(pageNum, pageSize);
47
-        return taPreselectionRecordMapper.listPreselectionRecord(iPage, personId);
62
+        iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, personId);
63
+
64
+        List<TaPreselectionRecordPO> poList = iPage.getRecords();
65
+        if (CollectionUtils.isNotEmpty(poList)) {
66
+            List<TaPreselectionRecordPO> resultList = new ArrayList<>();
67
+            List<TaBuildingImg> taBuildingImgList;
68
+            List<TaApartmentImg> buildingImg;
69
+            QueryWrapper<TaApartmentImg> apartmentImgQueryWrapper;
70
+            QueryWrapper<TaBuildingImg> buildingImgQueryWrapper;
71
+            for (TaPreselectionRecordPO po : poList) {
72
+                apartmentImgQueryWrapper = new QueryWrapper<>();
73
+                apartmentImgQueryWrapper.eq("apartment_id", po.getApartmentId());
74
+                buildingImg = taApartmentImgMapper.selectList(apartmentImgQueryWrapper);
75
+                for (TaApartmentImg apartmentImg : buildingImg) {
76
+                    buildingImgQueryWrapper = new QueryWrapper<>();
77
+                    buildingImgQueryWrapper.eq("img_id", apartmentImg.getImgId());
78
+                    buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
79
+                    taBuildingImgList = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
80
+                    po.setBuildingImgList(taBuildingImgList);
81
+                    resultList.add(po);
82
+                }
83
+            }
84
+            iPage.setRecords(resultList);
85
+        }
86
+        return iPage;
48
     }
87
     }
49
 
88
 
50
     @Override
89
     @Override
81
         }
120
         }
82
 
121
 
83
         // 校验预选操作时间是否在规定范围内
122
         // 校验预选操作时间是否在规定范围内
84
-        if (DateUtils.checkTimeRange(resourcesPO.getPreselectionStartTime(), resourcesPO.getPreselectionEndTime(), null)) {
123
+        if (!DateUtils.checkTimeRange(resourcesPO.getPreselectionStartTime(), resourcesPO.getPreselectionEndTime(), null)) {
85
             responseBean.addError("当前时间不在预选时间范围内,请联系置业顾问了解详情。");
124
             responseBean.addError("当前时间不在预选时间范围内,请联系置业顾问了解详情。");
86
             return responseBean;
125
             return responseBean;
87
         }
126
         }

+ 1
- 1
src/main/resources/mapper/TaActivityDynamicEnlistMapper.xml 查看文件

29
                         and tade.phone like CONCAT('%',#{phone}, '%')
29
                         and tade.phone like CONCAT('%',#{phone}, '%')
30
                     </if>
30
                     </if>
31
                 </where>
31
                 </where>
32
-
32
+            GROUP BY tade.person_id
33
 
33
 
34
         </select>
34
         </select>
35
 
35
 

+ 23
- 23
src/main/resources/mapper/TaHousingResourcesMapper.xml 查看文件

4
 
4
 
5
     <select id="listHousingResources" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
5
     <select id="listHousingResources" resultType="com.huiju.estateagents.po.TaHousingResourcesPO">
6
         SELECT
6
         SELECT
7
-        t.house_id,
8
-        t.building_id,
9
-        t.block_id,
10
-        t.block_name,
11
-        t.sales_batch_id,
12
-        t.unit_id,
13
-        t.unit_name,
14
-        t.floor_id,
15
-        t.floor_name,
16
-        t.room_id,
17
-        t.room_name,
18
-        t.price,
19
-        t.heat,
20
-        t.apartment_id,
21
-        t.`status`,
22
-        t.org_id,
23
-        t2.inside_area,
24
-        t2.building_area
7
+            t.house_id,
8
+            t.building_id,
9
+            t.block_id,
10
+            t.block_name,
11
+            t.sales_batch_id,
12
+            t.unit_id,
13
+            t.unit_name,
14
+            t.floor_id,
15
+            t.floor_name,
16
+            t.room_id,
17
+            t.room_name,
18
+            t.price,
19
+            t.heat,
20
+            t.apartment_id,
21
+            t.`status`,
22
+            t.org_id,
23
+            t2.inside_area,
24
+            t2.building_area,
25
+            t2.apartment_name
25
         FROM
26
         FROM
26
-        ta_housing_resources t,
27
-        ta_building_apartment t2
27
+            ta_housing_resources t,
28
+            ta_building_apartment t2
28
         WHERE
29
         WHERE
29
-        t.sales_batch_id = #{salesBatchId}
30
+            t.sales_batch_id = #{salesBatchId}
30
         <if test="startPrice != null and startPrice != '' and endPrice != null and endPrice != ''">
31
         <if test="startPrice != null and startPrice != '' and endPrice != null and endPrice != ''">
31
             AND ( t.price BETWEEN #{startPrice} AND #{endPrice} )
32
             AND ( t.price BETWEEN #{startPrice} AND #{endPrice} )
32
         </if>
33
         </if>
36
         AND t.apartment_id = t2.apartment_id
37
         AND t.apartment_id = t2.apartment_id
37
         AND t.`status` = 1
38
         AND t.`status` = 1
38
         AND t2.`status` = 1
39
         AND t2.`status` = 1
39
-        ORDER BY
40
-        t.create_date DESC
40
+        ORDER BY t.create_date DESC
41
     </select>
41
     </select>
42
 
42
 
43
     <select id="listBuildApartmentBySalesBatchId" resultType="com.huiju.estateagents.entity.TaBuildingApartment">
43
     <select id="listBuildApartmentBySalesBatchId" resultType="com.huiju.estateagents.entity.TaBuildingApartment">

+ 14
- 5
src/main/resources/mapper/TaPreselectionRecordMapper.xml 查看文件

3
 <mapper namespace="com.huiju.estateagents.mapper.TaPreselectionRecordMapper">
3
 <mapper namespace="com.huiju.estateagents.mapper.TaPreselectionRecordMapper">
4
 
4
 
5
     <select id="listPreselectionRecord" resultType="com.huiju.estateagents.po.TaPreselectionRecordPO">
5
     <select id="listPreselectionRecord" resultType="com.huiju.estateagents.po.TaPreselectionRecordPO">
6
+        SELECT
7
+            t3.*,
8
+            t4.building_name
9
+        FROM
10
+            (
6
         SELECT
11
         SELECT
7
             t.*,
12
             t.*,
8
             t2.block_name,
13
             t2.block_name,
9
             t2.unit_name,
14
             t2.unit_name,
10
             t2.floor_name,
15
             t2.floor_name,
11
             t2.room_name,
16
             t2.room_name,
12
-            t2.price
17
+            t2.price,
18
+            t2.apartment_id,
19
+            t2.building_id buildingId
13
         FROM
20
         FROM
14
-            ta_preselection_record t ,
21
+            ta_preselection_record t,
15
             ta_housing_resources t2
22
             ta_housing_resources t2
16
         WHERE
23
         WHERE
17
-            t.person_id = #{persionId}
18
-            and t.house_id = t2.house_id
24
+            t.person_id = #{personId}
25
+            AND t.house_id = t2.house_id
19
         ORDER BY
26
         ORDER BY
20
-            t.create_date DESC;
27
+            t.create_date DESC
28
+            ) t3
29
+            LEFT JOIN ta_building t4 ON t3.buildingId = t4.building_id
21
     </select>
30
     </select>
22
 
31
 
23
     <select id="getRecordByPersonIdAndHouseId" resultType="com.huiju.estateagents.entity.TaPreselectionRecord">
32
     <select id="getRecordByPersonIdAndHouseId" resultType="com.huiju.estateagents.entity.TaPreselectionRecord">