linwe
2024-06-20 79d28c3b174275e4ecdd89baa5b0d7caccda5c8d
bug修复
6 files modified
74 ■■■■ changed files
src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java 27 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml 19 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java
@@ -160,11 +160,20 @@
                HouseholdEntity householdEntity = new HouseholdEntity();
                HouseholdEntity entity = new HouseholdEntity();
                if (parameter instanceof MapperMethod.ParamMap) {
                    entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("param1");
                    if (entity != null && entity.getId() != null) {
                        setHouseholdInfo(householdEntity, entity);
                        esParam.setTableId(entity.getId().toString());
                        elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
                    try {
                        entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("param1");
                        if (entity != null && entity.getId() != null) {
                            setHouseholdInfo(householdEntity, entity);
                            esParam.setTableId(entity.getId().toString());
                            elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
                        }
                    } catch (Exception e) {
                        entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("et");
                        if (entity != null && entity.getId() != null) {
                            setHouseholdInfo(householdEntity, entity);
                            esParam.setTableId(entity.getId().toString());
                            elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
                        }
                    }
                } else {
                    entity = (HouseholdEntity) parameter;
@@ -176,9 +185,11 @@
        }
        // 删除处理
        if (sqlType.equals("DELETE")) {
            List<Long> list = (List<Long>) ((MapperMethod.ParamMap) parameter).get("param1");
            esParam.setTableId(list.get(0).toString());
            elasticsearchDocumentService.removeByQuery(esParam);
            if (parameter instanceof MapperMethod.ParamMap) {
                List<Long> list = (List<Long>) ((MapperMethod.ParamMap) parameter).get("param1");
                esParam.setTableId(list.get(0).toString());
                elasticsearchDocumentService.removeByQuery(esParam);
            }
        }
    }
src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java
@@ -267,7 +267,7 @@
    /**
     * 是否删除
     */
    @TableLogic
    // @TableLogic
    @ApiModelProperty("是否已删除 0:否  1:是")
    private Integer isDeleted;
@@ -288,4 +288,19 @@
    @TableField("volunteer_org")
    private String volunteerOrg;
    @ApiModelProperty(value = "房东名称", example = "")
    @TableField("landlord_name")
    private String landlordName;
    @ApiModelProperty(value = "房东电话", example = "")
    @TableField("landlord_phone")
    private String landlordPhone;
    @ApiModelProperty(value = "房东身份证", example = "")
    @TableField("landlord_id_card")
    private String landlordIdCard;
}
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
@@ -204,21 +204,22 @@
        <include refid="filterData"/>
        order by jhr.create_time desc,jhr.id desc
        order by jhr.id desc
    </select>
    <!--查询房屋出租情况-->
    <select id="getHouseRentalListByCode" resultMap="houseRentalTenant">
        select
            jhr.*,
            if(termination_time is null,if(date_format(jhr.due_time,'%Y-%m-%d') >= date_format(now(),'%Y-%m-%d'),0,1),2) as status,
            jht.id as tenantId,
            jht.*
        select jhr.*,
               if(termination_time is null,
                  if(date_format(jhr.due_time, '%Y-%m-%d') >= date_format(now(), '%Y-%m-%d'), 0, 1), 2) as status,
               jht.id                                                                                   as tenantId,
               jht.*
        from jczz_house_rental jhr
        left join jczz_household jht on jhr.id = jht.housing_rental_id and jht.is_deleted = 0
                 left join jczz_household jht on jhr.id = jht.housing_rental_id and jht.is_deleted = 0
        where 1 = 1
        and jhr.is_deleted = 0
        and jhr.house_code = #{code}
          and jhr.is_deleted = 0
          and jhr.house_code = #{code}
        order by jhr.id desc
    </select>
    <sql id="filterHouseGrid">
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -1054,6 +1054,9 @@
            <if test="household.confirmFlag != null ">
                and jh.confirm_flag = #{household.confirmFlag}
            </if>
            <if test="household.relationship != null ">
                and jh.relationship = #{household.relationship}
            </if>
            <if test="household.townStreetName!=null and household.townStreetName!=''">
                and jda.town_street_name like concat('%',#{household.townStreetName},'%')
            </if>
src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
@@ -29,6 +29,8 @@
        jpp.confirm_notion,
        br.town_name as townStreetName,
        br.name as neiName,
        jp.place_name,
        jp.location,
        jc.category_name
        FROM
        jczz_place_practitioner jpp
src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java
@@ -65,4 +65,10 @@
     */
    private String neiName;
    @ApiModelProperty(value = "场所名称", example = "")
    private String placeName;
    @ApiModelProperty(value = "场所地址", example = "")
    private String location;
}