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

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

@@ -38,5 +38,5 @@ public interface TaSalesBatchMapper extends BaseMapper<TaSalesBatch> {
38 38
      * @param salesBatchId
39 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,6 +12,7 @@ import org.slf4j.LoggerFactory;
12 12
 import org.springframework.beans.factory.annotation.Autowired;
13 13
 import org.springframework.stereotype.Service;
14 14
 
15
+import java.math.BigDecimal;
15 16
 import java.util.List;
16 17
 import java.util.Map;
17 18
 
@@ -67,19 +68,19 @@ public class TaSalesBatchServiceImpl extends ServiceImpl<TaSalesBatchMapper, TaS
67 68
         }
68 69
 
69 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 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 80
         JSONObject obj = new JSONObject();
80 81
         obj.put("preselectionStartTime", salesBatch.getPreselectionStartTime());
81 82
         obj.put("preselectionEndTime", salesBatch.getPreselectionEndTime());
82
-        obj.put("salesNumber", totalHouses == null ? 0 : totalHouses);
83
+        obj.put("salesNumber", totalHouses == null ? 0:totalHouses);
83 84
         obj.put("preselectionNumber", totalRealHeat == null ? 0 : totalRealHeat);
84 85
         responseBean.addSuccess(obj);
85 86
         return responseBean;