From 774d48e554ba2b654b28ea89996da34d84e3c1f6 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期一, 08 四月 2024 11:51:36 +0800
Subject: [PATCH] 优化代码

---
 service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java b/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
index 35aca2f..876382e 100644
--- a/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
+++ b/service-fee/src/main/java/com/java110/fee/cmd/fee/ListFeeCmd.java
@@ -115,7 +115,7 @@
             ownerRoomRelDto.setRoomId(reqJson.getString("payerObjId"));
             ownerRoomRelDto.setOwnerId(reqJson.getString("ownerId"));
             List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
-            if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) {
+            if (ListUtil.isNull(ownerRoomRelDtos)) {
                 ApiFeeVo apiFeeVo = new ApiFeeVo();
                 apiFeeVo.setTotal(0);
                 apiFeeVo.setRecords((int) Math.ceil((double) 0 / (double) reqJson.getInteger("row")));
@@ -127,7 +127,8 @@
         int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto);
         if (count > 0) {
             List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);//鏌ヨ璐圭敤椤圭洰
-            computeFeePrice(feeDtos);//璁$畻璐圭敤
+            //todo 璁$畻璐圭敤
+            computeFeePrice(feeDtos);
             List<ApiFeeDataVo> apiFeeDataVos = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class);
             for (ApiFeeDataVo apiFeeDataVo : apiFeeDataVos) {
                 //鑾峰彇浠樿垂瀵硅薄绫诲瀷
@@ -183,7 +184,7 @@
         floorDto.setFloorNum(floorNum);
         floorDto.setCommunityId(reqJson.getString("communityId"));
         List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto);
-        if (floorDtos == null || floorDtos.size() < 1) {
+        if (ListUtil.isNull(floorDtos)) {
             return;
         }
         for (FloorDto floor : floorDtos) {
@@ -217,7 +218,7 @@
     }
 
     private void computeFeePrice(List<FeeDto> feeDtos) {
-        if (feeDtos == null || feeDtos.isEmpty()) {
+        if (ListUtil.isNull(feeDtos)) {
             return;
         }
         String val = CommunitySettingFactory.getValue(feeDtos.get(0).getCommunityId(), TOTAL_FEE_PRICE);

--
Gitblit v1.8.0