Skip to content

Commit d7f041e

Browse files
committed
首页bug 修复
1 parent 483ef12 commit d7f041e

6 files changed

Lines changed: 58 additions & 1 deletion

File tree

Api/src/main/java/com/java110/api/listener/index/QueryIndexStatisticListener.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.java110.dto.RoomDto;
2323
import com.java110.event.service.api.ServiceDataFlowEvent;
2424
import com.java110.vo.api.ApiFeeVo;
25+
import com.java110.vo.api.ApiIndexStatisticVo;
2526
import org.springframework.beans.factory.annotation.Autowired;
2627
import org.springframework.http.HttpMethod;
2728
import org.springframework.http.HttpStatus;
@@ -65,16 +66,20 @@ public void soService(ServiceDataFlowEvent event) {
6566
JSONObject reqJson = dataFlowContext.getReqJson();
6667
validateIndexStatistic(reqJson);
6768
// 查询业主 总数量
69+
ApiIndexStatisticVo apiIndexStatisticVo = new ApiIndexStatisticVo();
6870
OwnerDto ownerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
6971
int ownerCount = ownerInnerServiceSMOImpl.queryOwnersCount(ownerDto);
70-
int noEnterRoomCount =
72+
int noEnterRoomOwnerCount = ownerInnerServiceSMOImpl.queryNoEnterRoomOwnerCount(ownerDto);
7173
// 查询房屋 总数量
7274

7375
// 查询停车位 总数量
7476

7577
// 查询商铺 总数量
7678

7779

80+
apiIndexStatisticVo.setOwnerCount(ownerCount + "");
81+
apiIndexStatisticVo.setNoEnterRoomCount(noEnterRoomOwnerCount + "");
82+
ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiIndexStatisticVo), HttpStatus.OK);
7883
dataFlowContext.setResponseEntity(responseEntity);
7984
}
8085

UserService/src/main/java/com/java110/user/dao/IOwnerServiceDao.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,11 @@ public interface IOwnerServiceDao {
9191
*/
9292
List<Map> getOwnerInfoByCondition(Map info) throws DAOException;
9393

94+
/**
95+
* 查询没有入驻的 业主数量
96+
* @param info 信息
97+
* @return 未入驻业主数量
98+
*/
99+
int queryNoEnterRoomOwnerCount(Map info);
100+
94101
}

UserService/src/main/java/com/java110/user/dao/impl/OwnerServiceDaoImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,17 @@ public List<Map> getOwnerInfoByCondition(Map info) throws DAOException {
164164
return businessOwnerInfos;
165165
}
166166

167+
@Override
168+
public int queryNoEnterRoomOwnerCount(Map info) {
169+
logger.debug("查询业主数据 入参 info : {}", info);
170+
171+
List<Map> businessOwnerInfos = sqlSessionTemplate.selectList("ownerServiceDaoImpl.queryNoEnterRoomOwnerCount", info);
172+
if (businessOwnerInfos.size() < 1) {
173+
return 0;
174+
}
175+
176+
return Integer.parseInt(businessOwnerInfos.get(0).get("count").toString());
177+
}
178+
167179

168180
}

UserService/src/main/java/com/java110/user/smo/impl/OwnerInnerServiceSMOImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ public List<OwnerDto> queryOwnersByCondition(@RequestBody OwnerDto ownerDto) {
194194
return owners;
195195
}
196196

197+
198+
@Override
199+
public int queryNoEnterRoomOwnerCount(OwnerDto ownerDto) {
200+
return ownerServiceDaoImpl.queryNoEnterRoomOwnerCount(BeanConvertUtil.beanCovertMap(ownerDto));
201+
}
202+
197203
public IUserInnerServiceSMO getUserInnerServiceSMOImpl() {
198204
return userInnerServiceSMOImpl;
199205
}

java110-core/src/main/java/com/java110/core/smo/owner/IOwnerInnerServiceSMO.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,14 @@ public interface IOwnerInnerServiceSMO {
6969
@RequestMapping(value = "/queryOwnersByCondition", method = RequestMethod.POST)
7070
List<OwnerDto> queryOwnersByCondition(@RequestBody OwnerDto ownerDto);
7171

72+
73+
/**
74+
* 查询<p>小区楼</p>总记录数
75+
*
76+
* @param ownerDto 数据对象分享
77+
* @return 小区下的小区楼记录数
78+
*/
79+
@RequestMapping(value = "/queryNoEnterRoomOwnerCount", method = RequestMethod.POST)
80+
int queryNoEnterRoomOwnerCount(@RequestBody OwnerDto ownerDto);
81+
7282
}

java110-db/src/main/resources/mapper/owner/OwnerServiceDaoImplMapper.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,5 +333,22 @@ and t.member_id= #{memberId}
333333
limit #{page}, #{row}
334334
</if>
335335
</select>
336+
<!-- 查询未入驻业主 总数 -->
337+
<select id="queryNoEnterRoomOwnerCount" parameterType="Map" resultType="Map">
338+
SELECT
339+
COUNT(1) count
340+
FROM
341+
building_owner_room_rel a,
342+
building_owner o,
343+
s_community_member m
344+
WHERE a.`state` IN ('2001', '2003')
345+
AND a.`owner_id` = o.`owner_id`
346+
AND o.`owner_id` = m.`member_id`
347+
AND m.`member_type_cd` = '390001200005'
348+
AND m.`community_id` = #{communityId}
349+
AND a.`status_cd` = '0'
350+
AND o.`status_cd` = '0'
351+
AND m.`status_cd` = '0'
352+
</select>
336353

337354
</mapper>

0 commit comments

Comments
 (0)