wuxw 1 год назад
Родитель
Сommit
bace2a70c5

+ 1 - 1
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml

@@ -481,7 +481,7 @@
         END) stateName,ca.area_code areaCode,ca.area_name areaName,
         ca.parent_area_code parentAreaCode,ca.parent_area_name parentAreaName,
         t.community_area communityArea,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.fee_price,t.fee_price
-        feePrice,t.qr_code qrCode
+        feePrice,t.qr_code qrCode,t.create_time createTime
         from s_community t,city_area ca
         <if test="memberId !=null and memberId !=''">
             ,s_community_member cm

+ 19 - 19
service-community/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java

@@ -108,15 +108,15 @@ public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunit
 
         logger.debug("查询小区信息 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityInfo", info);
-        if (businessCommunityInfos == null) {
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityInfo", info);
+        if (infos == null) {
             return null;
         }
-        if (businessCommunityInfos.size() > 1) {
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessCommunityInfos," + JSONObject.toJSONString(info));
+        if (infos.size() > 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:infos," + JSONObject.toJSONString(info));
         }
 
-        return businessCommunityInfos.get(0);
+        return infos.get(0);
     }
 
     /**
@@ -218,15 +218,15 @@ public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunit
     public Map getCommunityInfo(Map info) throws DAOException {
         logger.debug("查询小区信息 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfo", info);
-        if (businessCommunityInfos == null || businessCommunityInfos.size() == 0) {
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfo", info);
+        if (infos == null || infos.size() == 0) {
             return null;
         }
-        if (businessCommunityInfos.size() > 1) {
+        if (infos.size() > 1) {
             throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getCommunityInfo," + JSONObject.toJSONString(info));
         }
 
-        return businessCommunityInfos.get(0);
+        return infos.get(0);
     }
 
     /**
@@ -445,9 +445,9 @@ public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunit
     public List<Map> getCommunityInfoNew(Map info) throws DAOException {
         logger.debug("查询小区信息 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfoNew", info);
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfoNew", info);
 
-        return businessCommunityInfos;
+        return infos;
     }
 
     /**
@@ -460,33 +460,33 @@ public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunit
     public int queryCommunitysCount(Map info) {
         logger.debug("查询小区数据 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.queryCommunitysCount", info);
-        if (businessCommunityInfos.size() < 1) {
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.queryCommunitysCount", info);
+        if (infos.size() < 1) {
             return 0;
         }
 
-        return Integer.parseInt(businessCommunityInfos.get(0).get("count").toString());
+        return Integer.parseInt(infos.get(0).get("count").toString());
     }
 
     @Override
     public int getCommunityAttrsCount(Map info) {
         logger.debug("查询小区数据 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrsCount", info);
-        if (businessCommunityInfos.size() < 1) {
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrsCount", info);
+        if (infos.size() < 1) {
             return 0;
         }
 
-        return Integer.parseInt(businessCommunityInfos.get(0).get("count").toString());
+        return Integer.parseInt(infos.get(0).get("count").toString());
     }
 
     @Override
     public List<Map> getStoreCommunitys(Map info) {
         logger.debug("查询小区信息 入参 info : {}", info);
 
-        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getStoreCommunitys", info);
+        List<Map> infos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getStoreCommunitys", info);
 
-        return businessCommunityInfos;
+        return infos;
     }
 
     @Override

+ 4 - 4
service-community/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java

@@ -10,6 +10,7 @@ import com.java110.dto.community.CommunityDto;
 import com.java110.intf.community.ICommunityInnerServiceSMO;
 import com.java110.po.community.CommunityAttrPo;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.ListUtil;
 import org.slf4j.Logger;
 import com.java110.core.log.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -103,6 +104,7 @@ public class CommunityInnerServiceSMOImpl extends BaseServiceSMO implements ICom
 
     /**
      * 保存小区属性
+     *
      * @param communityAttrPo 数据对象分享
      * @return
      */
@@ -126,7 +128,7 @@ public class CommunityInnerServiceSMOImpl extends BaseServiceSMO implements ICom
 
         List<String> communityIds = new ArrayList<>();
 
-        if (communitys == null || communitys.size() < 1) {
+        if (ListUtil.isNull(communitys)) {
             return communitys;
         }
         for (CommunityDto tmpCommunityDto : communitys) {
@@ -136,11 +138,10 @@ public class CommunityInnerServiceSMOImpl extends BaseServiceSMO implements ICom
         info.put("communityIds", communityIds.toArray(new String[communityIds.size()]));
         List<CommunityAttrDto> communityAttrDtos = BeanConvertUtil.covertBeanList(communityServiceDaoImpl.getCommunityAttrs(info), CommunityAttrDto.class);
 
-        if (communityAttrDtos == null || communityAttrDtos.size() < 1) {
+        if (ListUtil.isNull(communityAttrDtos)) {
             return communitys;
         }
 
-
         for (CommunityDto tmpCommunityDto : communitys) {
             List<CommunityAttrDto> tmpCommunityAttrDtos = new ArrayList<>();
             for (CommunityAttrDto communityAttrDto : communityAttrDtos) {
@@ -149,7 +150,6 @@ public class CommunityInnerServiceSMOImpl extends BaseServiceSMO implements ICom
                 }
             }
             tmpCommunityDto.setCommunityAttrDtos(tmpCommunityAttrDtos);
-
         }
 
         return communitys;