顾绍勇 5 лет назад
Родитель
Сommit
94cc571ecd

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaSalesBatchMapper.java Просмотреть файл

38
      * @param salesBatchId
38
      * @param salesBatchId
39
      * @return
39
      * @return
40
      */
40
      */
41
-    Map<String,Long> getTotalHousesAndHeat(@Param("salesBatchId") Integer salesBatchId);
41
+    Map<String,Object> getTotalHousesAndHeat(@Param("salesBatchId") Integer salesBatchId);
42
 }
42
 }

+ 6
- 5
src/main/java/com/huiju/estateagents/service/impl/TaSalesBatchServiceImpl.java Просмотреть файл

12
 import org.springframework.beans.factory.annotation.Autowired;
12
 import org.springframework.beans.factory.annotation.Autowired;
13
 import org.springframework.stereotype.Service;
13
 import org.springframework.stereotype.Service;
14
 
14
 
15
+import java.math.BigDecimal;
15
 import java.util.List;
16
 import java.util.List;
16
 import java.util.Map;
17
 import java.util.Map;
17
 
18
 
67
         }
68
         }
68
 
69
 
69
         Long totalHouses = null;
70
         Long totalHouses = null;
70
-        Long totalRealHeat = null;
71
+        BigDecimal totalRealHeat = null;
71
 
72
 
72
         // 获取房源预选数量
73
         // 获取房源预选数量
73
-        Map<String, Long> result = taSalesBatchMapper.getTotalHousesAndHeat(salesBatchId);
74
+        Map<String, Object> result = taSalesBatchMapper.getTotalHousesAndHeat(salesBatchId);
74
         if (result != null) {
75
         if (result != null) {
75
-            totalHouses = result.get("totalHouses");
76
-            totalRealHeat = result.get("totalRealHeat");
76
+            totalHouses = (Long) result.get("totalHouses");
77
+            totalRealHeat = (BigDecimal)result.get("totalRealHeat");
77
         }
78
         }
78
 
79
 
79
         JSONObject obj = new JSONObject();
80
         JSONObject obj = new JSONObject();
80
         obj.put("preselectionStartTime", salesBatch.getPreselectionStartTime());
81
         obj.put("preselectionStartTime", salesBatch.getPreselectionStartTime());
81
         obj.put("preselectionEndTime", salesBatch.getPreselectionEndTime());
82
         obj.put("preselectionEndTime", salesBatch.getPreselectionEndTime());
82
-        obj.put("salesNumber", totalHouses == null ? 0 : totalHouses);
83
+        obj.put("salesNumber", totalHouses == null ? 0:totalHouses);
83
         obj.put("preselectionNumber", totalRealHeat == null ? 0 : totalRealHeat);
84
         obj.put("preselectionNumber", totalRealHeat == null ? 0 : totalRealHeat);
84
         responseBean.addSuccess(obj);
85
         responseBean.addSuccess(obj);
85
         return responseBean;
86
         return responseBean;