顾绍勇 před 5 roky
rodič
revize
cd5419dc43

+ 19
- 1
src/main/java/com/huiju/estateagents/controller/TaSalesBatchController.java Zobrazit soubor

@@ -191,7 +191,7 @@ public class TaSalesBatchController extends BaseController {
191 191
     }
192 192
 
193 193
     /**
194
-     * 根据id查询对象-小程序端
194
+     * 根据id提示信息-小程序端
195 195
      *
196 196
      * @param id 实体ID
197 197
      */
@@ -200,6 +200,24 @@ public class TaSalesBatchController extends BaseController {
200 200
         ResponseBean responseBean = new ResponseBean();
201 201
         try {
202 202
             responseBean = iTaSalesBatchService.getNoticeInfo(id);
203
+        } catch (Exception e) {
204
+            e.printStackTrace();
205
+            logger.error("getNoticeInfo -=- {}", e.toString());
206
+            responseBean.addError(e.getMessage());
207
+        }
208
+        return responseBean;
209
+    }
210
+
211
+    /**
212
+     * 根据id查询对象--小程序
213
+     *
214
+     * @param id 实体ID
215
+     */
216
+    @RequestMapping(value = "/wx/taSalesBatch/{id}", method = RequestMethod.GET)
217
+    public ResponseBean taSalesBatchGetForMiniApp(@PathVariable Integer id) {
218
+        ResponseBean responseBean = new ResponseBean();
219
+        try {
220
+            responseBean.addSuccess(iTaSalesBatchService.getById(id));
203 221
         } catch (Exception e) {
204 222
             e.printStackTrace();
205 223
             logger.error("taSalesBatchGetForMiniApp -=- {}", e.toString());

+ 4
- 4
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java Zobrazit soubor

@@ -158,10 +158,10 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
158 158
 
159 159
         // 获取该用户是否预选房源信息
160 160
         TaPreselectionRecord taPreselectionRecord = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
161
-        if (taPreselectionRecord == null) {
162
-            resourcesPO.setIsPreselect(false);
163
-        } else {
161
+        if (taPreselectionRecord != null && taPreselectionRecord.getStatus() == 1) {
164 162
             resourcesPO.setIsPreselect(true);
163
+        } else {
164
+            resourcesPO.setIsPreselect(false);
165 165
         }
166 166
 
167 167
         // 获取户型图片列表
@@ -380,7 +380,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
380 380
                 String floorName = row.getCell(3).getStringCellValue().trim();
381 381
                 String roomName = row.getCell(4).getStringCellValue().trim();
382 382
                 BigDecimal price = BigDecimal.valueOf(row.getCell(5).getNumericCellValue());
383
-                Integer heat = Integer.valueOf(String.valueOf(row.getCell(6).getNumericCellValue()).substring(0, 1));
383
+                Integer heat = Integer.valueOf((row.getCell(6).getNumericCellValue() + "").substring(0, 1));
384 384
                 Integer status = row.getCell(7).getStringCellValue().trim().equals("是") ? 1 : 0;
385 385
 
386 386
                 int currentRow = j + 1;

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Zobrazit soubor

@@ -129,6 +129,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
129 129
         }
130 130
 
131 131
         // 添加预选记录
132
+        taPreselectionRecord.setSalesBatchId(resourcesPO.getSalesBatchId());
132 133
         taPreselectionRecord.setStatus(1);
133 134
         taPreselectionRecord.setCreateDate(LocalDateTime.now());
134 135
         save(taPreselectionRecord);