wuxw
2021-11-18 4c29e451488522663bef29b6f5a9584815561fea
优化代码
4个文件已修改
15 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/owner/OwnerRoomRelDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerRoomRelServiceDaoImplMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/fee/ListRoomsWhereFeeSetListener.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/owner/OwnerRoomRelDto.java
@@ -27,6 +27,7 @@
    private String roomId;
    private String bId;
    private boolean byOwnerInfo = false;
    private String communityId;
    private Date startTime;
    private Date endTime;
@@ -165,4 +166,12 @@
    public void setOwnerNameLike(String ownerNameLike) {
        this.ownerNameLike = ownerNameLike;
    }
    public String getCommunityId() {
        return communityId;
    }
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-db/src/main/resources/mapper/user/OwnerRoomRelServiceDaoImplMapper.xml
@@ -107,6 +107,7 @@
        where 1 =1
        <if test="byOwnerInfo == true">
            and t.owner_id = bow.owner_id
            and bow.community_id = #{communityId}
            and bow.status_cd = '0'
        </if>
        <if test="byOwnerInfo == true and ownerName !=null and ownerName != ''">
@@ -197,6 +198,7 @@
        where 1 =1
        <if test="byOwnerInfo == true">
            and t.owner_id = bow.owner_id
            and bow.community_id = #{communityId}
            and bow.status_cd = '0'
        </if>
        <if test="byOwnerInfo == true and ownerName !=null and ownerName != ''">
service-api/src/main/java/com/java110/api/listener/fee/ListRoomsWhereFeeSetListener.java
@@ -114,6 +114,7 @@
        OwnerRoomRelDto ownerRoomRelDto = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelDto.class);
        ownerRoomRelDto.setByOwnerInfo(true);
        ownerRoomRelDto.setCommunityId(reqJson.getString("communityId"));
        int total = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRelsCount(ownerRoomRelDto);
        apiRoomVo.setTotal(total);
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -569,6 +569,9 @@
            }
            double month = computeFeeSMOImpl.dayCompare(tmpReportFeeDto.getDeadlineTime(), tmpReportFeeDto.getEndTime());
            month = Math.ceil(month);
            if(month == 0){ // 防止除数为0
                return 0;
            }
            double money = feePriceDec.divide(new BigDecimal(month), 2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
            return money;
        }