From 5522f256331fb6dfdde26abba8cb528b9d96fdf0 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 30 五月 2020 18:53:24 +0800
Subject: [PATCH] 优化小区成员加入报错
---
CommunityService/src/main/java/com/java110/community/dao/impl/RoomServiceDaoImpl.java | 62 +++++++++++++++++++++++++++++--
1 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/CommunityService/src/main/java/com/java110/community/dao/impl/RoomServiceDaoImpl.java b/CommunityService/src/main/java/com/java110/community/dao/impl/RoomServiceDaoImpl.java
index 5c12c58..b5ffd8e 100644
--- a/CommunityService/src/main/java/com/java110/community/dao/impl/RoomServiceDaoImpl.java
+++ b/CommunityService/src/main/java/com/java110/community/dao/impl/RoomServiceDaoImpl.java
@@ -1,9 +1,9 @@
package com.java110.community.dao.impl;
import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.DAOException;
-import com.java110.common.util.DateUtil;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
import com.java110.community.dao.IRoomServiceDao;
import com.java110.core.base.dao.BaseServiceDao;
import org.slf4j.Logger;
@@ -139,7 +139,32 @@
return 0;
}
- return Integer.parseInt(businessRoomInfos.get(0).get("count").toString()); }
+ return Integer.parseInt(businessRoomInfos.get(0).get("count").toString());
+ }
+
+ @Override
+ public int queryRoomsWithOutSellByCommunityIdCount(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴垮眿鏁版嵁 鍏ュ弬 info : {}", info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomServiceDaoImpl.queryRoomsWithOutSellByCommunityIdCount", info);
+ if (businessRoomInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessRoomInfos.get(0).get("count").toString());
+ }
+
+ @Override
+ public int queryRoomsWithSellByCommunityIdCount(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴垮眿鏁版嵁 鍏ュ弬 info : {}", info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomServiceDaoImpl.queryRoomsWithSellByCommunityIdCount", info);
+ if (businessRoomInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessRoomInfos.get(0).get("count").toString());
+ }
@Override
public List<Map> getRoomInfoByCommunityId(Map info) {
@@ -150,5 +175,34 @@
return businessRoomInfos;
}
+ @Override
+ public List<Map> getRoomInfoByOwner(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴垮眿淇℃伅 鍏ュ弬 info : {}", info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomServiceDaoImpl.getRoomInfoByOwner", info);
+
+ return businessRoomInfos;
+ }
+
+ @Override
+ public List<Map> getRoomInfoWithOutSellByCommunityId(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴垮眿淇℃伅 鍏ュ弬 info : {}", info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomServiceDaoImpl.getRoomInfoWithOutSellByCommunityId", info);
+
+ return businessRoomInfos;
+ }
+
+
+ @Override
+ public List<Map> getRoomInfoWithSellByCommunityId(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴垮眿淇℃伅 鍏ュ弬 info : {}", info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomServiceDaoImpl.getRoomInfoWithSellByCommunityId", info);
+
+ return businessRoomInfos;
+ }
+
+
}
--
Gitblit v1.8.0