chengf
2026-01-27 b6184e2ddf3db37a94f7efb3b619bbc64642a292
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="communityV1ServiceDaoImpl">
 
 
    <!-- 保存小区管理信息 add by wuxw 2018-07-03 -->
    <insert id="saveCommunityInfo" parameterType="Map">
        insert into s_community(
        fee_price,address,city_code,map_y,pay_fee_month,map_x,nearby_landmarks,name,tel,state,community_id,community_area,take_time,
        project_address_province,project_address_city,project_address_district,project_address_town,project_address_road,
        house_completion_date,project_nature,project_type,project_land_area,total_construction_area,chargeable_total_area,
        chargeable_area_multilayer,chargeable_area_high_rise1,chargeable_area_high_rise_up,chargeable_area_shop,chargeable_area_villa,
        chargeable_area_office,chargeable_area_commercial_house,green_area,area_details,property_management_address,
        property_manager_name,property_manager_phone,day_repair_phone,night_repair_phone,project_manager,has_manager_certificate,
        certificate_name,manager_certificate_no,manager_phone,neighborhood_committee_name,neighborhood_committee_address,
        neighborhood_secretary,neighborhood_office_phone,secretary_phone,owners_committee_address,owners_committee_chairman,
        chairman_phone,fire_hydrant_count,fire_channel_count,water_tank_count,reservoir_count,total_motor_vehicle_spaces,
        ground_motor_vehicle_spaces,underground_motor_vehicle_spaces,new_energy_charging_piles,non_motor_vehicle_charging_points,
        ground_non_motor_vehicle_area,underground_non_motor_vehicle_area,clubhouse_area,has_decoration_rubbish_point,
        security_entrance_count,elevator_count,elevator_type,elevator_install_date,elevator_service_life,elevator_brand1,
        elevator_brand2,monitor_count,monitor_maintenance_company,barrier_gate_count,barrier_gate_brand,barrier_supplier_contact,
        barrier_supplier_phone,water_pump_count,ground_parking_spaces,underground_parking_spaces,ground_non_mechanical_fee,
        garage_non_mechanical_fee,temporary_hourly_fee,temporary_daily_fee,temporary_per_time_fee,total_building_count,
        building_unit_count,high_rise_building_count,multilayer_villa_building_count,residential_household_count,shop_household_count
        <!-- 添加新字段 -->
        <if test="publicArea != null">
            ,public_area
        </if>
        <if test="propertyRoomArea != null">
            ,property_room_area
        </if>
        <if test="outTime != null and outTime != ''">
            ,out_time
        </if>
        <if test="communityCode != null and communityCode != ''">
            ,community_code
        </if>
        ) values (
        #{feePrice},#{address},#{cityCode},#{mapY},#{payFeeMonth},#{mapX},#{nearbyLandmarks},#{name},#{tel},#{state},#{communityId},#{communityArea},#{takeTime},
        #{projectAddressProvince},#{projectAddressCity},#{projectAddressDistrict},#{projectAddressTown},#{projectAddressRoad},
        #{houseCompletionDate},#{projectNature},#{projectType},#{projectLandArea},#{totalConstructionArea},#{chargeableTotalArea},
        #{chargeableAreaMultilayer},#{chargeableAreaHighRise1},#{chargeableAreaHighRiseUp},#{chargeableAreaShop},#{chargeableAreaVilla},
        #{chargeableAreaOffice},#{chargeableAreaCommercialHouse},#{greenArea},#{areaDetails},#{propertyManagementAddress},
        #{propertyManagerName},#{propertyManagerPhone},#{dayRepairPhone},#{nightRepairPhone},#{projectManager},#{hasManagerCertificate},
        #{certificateName},#{managerCertificateNo},#{managerPhone},#{neighborhoodCommitteeName},#{neighborhoodCommitteeAddress},
        #{neighborhoodSecretary},#{neighborhoodOfficePhone},#{secretaryPhone},#{ownersCommitteeAddress},#{ownersCommitteeChairman},
        #{chairmanPhone},#{fireHydrantCount},#{fireChannelCount},#{waterTankCount},#{reservoirCount},#{totalMotorVehicleSpaces},
        #{groundMotorVehicleSpaces},#{undergroundMotorVehicleSpaces},#{newEnergyChargingPiles},#{nonMotorVehicleChargingPoints},
        #{groundNonMotorVehicleArea},#{undergroundNonMotorVehicleArea},#{clubhouseArea},#{hasDecorationRubbishPoint},
        #{securityEntranceCount},#{elevatorCount},#{elevatorType},#{elevatorInstallDate},#{elevatorServiceLife},#{elevatorBrand1},
        #{elevatorBrand2},#{monitorCount},#{monitorMaintenanceCompany},#{barrierGateCount},#{barrierGateBrand},#{barrierSupplierContact},
        #{barrierSupplierPhone},#{waterPumpCount},#{groundParkingSpaces},#{undergroundParkingSpaces},#{groundNonMechanicalFee},
        #{garageNonMechanicalFee},#{temporaryHourlyFee},#{temporaryDailyFee},#{temporaryPerTimeFee},#{totalBuildingCount},
        #{buildingUnitCount},#{highRiseBuildingCount},#{multilayerVillaBuildingCount},#{residentialHouseholdCount},#{shopHouseholdCount}
        <!-- 添加新字段的值 -->
        <if test="publicArea != null">
            ,#{publicArea}
        </if>
        <if test="propertyRoomArea != null">
            ,#{propertyRoomArea}
        </if>
        <if test="outTime != null and outTime != ''">,#{outTime}</if>
        <if test="communityCode != null and communityCode != ''">,#{communityCode}</if>
        )
    </insert>
 
    <!-- 查询小区管理信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityInfo" parameterType="Map" resultType="Map">
        select t.fee_price,t.fee_price feePrice,t.address,t.city_code,t.city_code cityCode,t.status_cd,t.status_cd
        statusCd,t.map_y,t.map_y mapY,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.map_x,t.map_x
        mapX,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,t.name,t.tel,t.state,t.community_id,t.community_id
        communityId,t.community_area,t.community_area communityArea,t.qr_code qrCode,t.take_time, t.take_time takeTime,
        t.out_time , t.out_time outTime,t.community_code,t.community_code communityCode
        from s_community t
        where 1 =1
        <if test="feePrice !=null and feePrice != ''">
            and t.fee_price= #{feePrice}
        </if>
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="cityCode !=null and cityCode != ''">
            and t.city_code= #{cityCode}
        </if>
        <if test="communityCode !=null and communityCode != ''">
            and t.community_code= #{communityCode}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="mapY !=null and mapY != ''">
            and t.map_y= #{mapY}
        </if>
        <if test="payFeeMonth !=null and payFeeMonth != ''">
            and t.pay_fee_month= #{payFeeMonth}
        </if>
        <if test="mapX !=null and mapX != ''">
            and t.map_x= #{mapX}
        </if>
        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
            and t.nearby_landmarks= #{nearbyLandmarks}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            and t.tel= #{tel}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityIds != null">
            and t.community_id in
            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="communityArea !=null and communityArea != ''">
            and t.community_area= #{communityArea}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
 
    </select>
 
 
    <!-- 修改小区管理信息 add by wuxw 2018-07-03 -->
    <update id="updateCommunityInfo" parameterType="Map">
        update s_community t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="feePrice !=null and feePrice != ''">
            , t.fee_price= #{feePrice}
        </if>
        <if test="feePrice == '0'">
            , t.fee_price= #{feePrice}
        </if>
        <if test="address !=null and address != ''">
            , t.address= #{address}
        </if>
        <if test="cityCode !=null and cityCode != ''">
            , t.city_code= #{cityCode}
        </if>
        <if test="mapY !=null and mapY != ''">
            , t.map_y= #{mapY}
        </if>
        <if test="payFeeMonth !=null and payFeeMonth != ''">
            , t.pay_fee_month= #{payFeeMonth}
        </if>
        <if test="mapX !=null and mapX != ''">
            , t.map_x= #{mapX}
        </if>
        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
            , t.nearby_landmarks= #{nearbyLandmarks}
        </if>
        <if test="name !=null and name != ''">
            , t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            , t.tel= #{tel}
        </if>
        <if test="state !=null and state != ''">
            , t.state= #{state}
        </if>
        <if test="communityArea !=null and communityArea != ''">
            , t.community_area= #{communityArea}
        </if>
        <if test="qrCode !=null and qrCode != ''">
            , t.qr_code= #{qrCode}
        </if>
        <if test="takeTime !=null and takeTime != ''">
            , t.take_time= #{takeTime}
        </if>
        <if test="outTime !=null and outTime != ''">
            , t.out_time= #{outTime}
        </if>
        <if test="communityCode !=null and communityCode != ''">
            , t.community_code= #{communityCode}
        </if>
        <if test="projectAddressProvince !=null and projectAddressProvince != ''">
            , t.project_address_province= #{projectAddressProvince}
        </if>
        <if test="projectAddressCity !=null and projectAddressCity != ''">
            , t.project_address_city= #{projectAddressCity}
        </if>
        <if test="projectAddressDistrict !=null and projectAddressDistrict != ''">
            , t.project_address_district= #{projectAddressDistrict}
        </if>
        <if test="projectAddressTown !=null and projectAddressTown != ''">
            , t.project_address_town= #{projectAddressTown}
        </if>
        <if test="projectAddressRoad !=null and projectAddressRoad != ''">
            , t.project_address_road= #{projectAddressRoad}
        </if>
        <if test="houseCompletionDate !=null">
            , t.house_completion_date= #{houseCompletionDate}
        </if>
        <if test="projectNature !=null and projectNature != ''">
            , t.project_nature= #{projectNature}
        </if>
        <if test="projectType !=null and projectType != ''">
            , t.project_type= #{projectType}
        </if>
        <if test="projectLandArea != null and projectLandArea != ''">
            , t.project_land_area= #{projectLandArea}
        </if>
        <if test="totalConstructionArea != null and totalConstructionArea != ''">
            , t.total_construction_area= #{totalConstructionArea}
        </if>
        <if test="chargeableTotalArea != null and chargeableTotalArea != ''">
            , t.chargeable_total_area= #{chargeableTotalArea}
        </if>
        <if test="chargeableAreaMultilayer != null and chargeableAreaMultilayer != ''">
            , t.chargeable_area_multilayer= #{chargeableAreaMultilayer}
        </if>
        <if test="chargeableAreaHighRise1 != null and chargeableAreaHighRise1 != ''">
            , t.chargeable_area_high_rise1= #{chargeableAreaHighRise1}
        </if>
        <if test="chargeableAreaHighRiseUp != null and chargeableAreaHighRiseUp != ''">
            , t.chargeable_area_high_rise_up= #{chargeableAreaHighRiseUp}
        </if>
        <if test="chargeableAreaShop != null and chargeableAreaShop != ''">
            , t.chargeable_area_shop= #{chargeableAreaShop}
        </if>
        <if test="chargeableAreaVilla != null and chargeableAreaVilla != ''">
            , t.chargeable_area_villa= #{chargeableAreaVilla}
        </if>
        <if test="chargeableAreaOffice != null and chargeableAreaOffice != ''">
            , t.chargeable_area_office= #{chargeableAreaOffice}
        </if>
        <if test="chargeableAreaCommercialHouse != null and chargeableAreaCommercialHouse != ''">
            , t.chargeable_area_commercial_house= #{chargeableAreaCommercialHouse}
        </if>
        <if test="greenArea != null and greenArea != ''">
            , t.green_area= #{greenArea}
        </if>
        <if test="areaDetails != null and areaDetails != ''">
            , t.area_details= #{areaDetails}
        </if>
        <if test="propertyManagementAddress != null and propertyManagementAddress != ''">
            , t.property_management_address= #{propertyManagementAddress}
        </if>
        <if test="propertyManagerName != null and propertyManagerName != ''">
            , t.property_manager_name= #{propertyManagerName}
        </if>
        <if test="propertyManagerPhone != null and propertyManagerPhone != ''">
            , t.property_manager_phone= #{propertyManagerPhone}
        </if>
        <if test="dayRepairPhone != null and dayRepairPhone != ''">
            , t.day_repair_phone= #{dayRepairPhone}
        </if>
        <if test="nightRepairPhone != null and nightRepairPhone != ''">
            , t.night_repair_phone= #{nightRepairPhone}
        </if>
        <if test="projectManager != null and projectManager != ''">
            , t.project_manager= #{projectManager}
        </if>
        <if test="hasManagerCertificate != null">
            , t.has_manager_certificate= #{hasManagerCertificate}
        </if>
        <if test="certificateName != null and certificateName != ''">
            , t.certificate_name= #{certificateName}
        </if>
        <if test="managerCertificateNo != null and managerCertificateNo != ''">
            , t.manager_certificate_no= #{managerCertificateNo}
        </if>
        <if test="managerPhone != null and managerPhone != ''">
            , t.manager_phone= #{managerPhone}
        </if>
        <if test="neighborhoodCommitteeName != null and neighborhoodCommitteeName != ''">
            , t.neighborhood_committee_name= #{neighborhoodCommitteeName}
        </if>
        <if test="neighborhoodCommitteeAddress != null and neighborhoodCommitteeAddress != ''">
            , t.neighborhood_committee_address= #{neighborhoodCommitteeAddress}
        </if>
        <if test="neighborhoodSecretary != null and neighborhoodSecretary != ''">
            , t.neighborhood_secretary= #{neighborhoodSecretary}
        </if>
        <if test="neighborhoodOfficePhone != null and neighborhoodOfficePhone != ''">
            , t.neighborhood_office_phone= #{neighborhoodOfficePhone}
        </if>
        <if test="secretaryPhone != null and secretaryPhone != ''">
            , t.secretary_phone= #{secretaryPhone}
        </if>
        <if test="ownersCommitteeAddress != null and ownersCommitteeAddress != ''">
            , t.owners_committee_address= #{ownersCommitteeAddress}
        </if>
        <if test="ownersCommitteeChairman != null and ownersCommitteeChairman != ''">
            , t.owners_committee_chairman= #{ownersCommitteeChairman}
        </if>
        <if test="chairmanPhone != null and chairmanPhone != ''">
            , t.chairman_phone= #{chairmanPhone}
        </if>
        <if test="fireHydrantCount != null and fireHydrantCount != ''">
            , t.fire_hydrant_count= #{fireHydrantCount}
        </if>
        <if test="fireChannelCount != null and fireChannelCount != ''">
            , t.fire_channel_count= #{fireChannelCount}
        </if>
        <if test="waterTankCount != null and waterTankCount != ''">
            , t.water_tank_count= #{waterTankCount}
        </if>
        <if test="reservoirCount != null and reservoirCount != ''">
            , t.reservoir_count= #{reservoirCount}
        </if>
        <if test="totalMotorVehicleSpaces != null and totalMotorVehicleSpaces != ''">
            , t.total_motor_vehicle_spaces= #{totalMotorVehicleSpaces}
        </if>
        <if test="groundMotorVehicleSpaces != null and groundMotorVehicleSpaces != ''">
            , t.ground_motor_vehicle_spaces= #{groundMotorVehicleSpaces}
        </if>
        <if test="undergroundMotorVehicleSpaces != null and undergroundMotorVehicleSpaces != ''">
            , t.underground_motor_vehicle_spaces= #{undergroundMotorVehicleSpaces}
        </if>
        <if test="newEnergyChargingPiles != null and newEnergyChargingPiles != ''">
            , t.new_energy_charging_piles= #{newEnergyChargingPiles}
        </if>
        <if test="nonMotorVehicleChargingPoints != null and nonMotorVehicleChargingPoints != ''">
            , t.non_motor_vehicle_charging_points= #{nonMotorVehicleChargingPoints}
        </if>
        <if test="groundNonMotorVehicleArea != null and groundNonMotorVehicleArea != ''">
            , t.ground_non_motor_vehicle_area= #{groundNonMotorVehicleArea}
        </if>
        <if test="undergroundNonMotorVehicleArea != null and undergroundNonMotorVehicleArea != ''">
            , t.underground_non_motor_vehicle_area= #{undergroundNonMotorVehicleArea}
        </if>
        <if test="clubhouseArea != null and clubhouseArea != ''">
            , t.clubhouse_area= #{clubhouseArea}
        </if>
        <if test="hasDecorationRubbishPoint != null">
            , t.has_decoration_rubbish_point= #{hasDecorationRubbishPoint}
        </if>
        <if test="securityEntranceCount != null and securityEntranceCount != ''">
            , t.security_entrance_count= #{securityEntranceCount}
        </if>
        <if test="elevatorCount != null and elevatorCount != ''">
            , t.elevator_count= #{elevatorCount}
        </if>
        <if test="elevatorType != null and elevatorType != ''">
            , t.elevator_type= #{elevatorType}
        </if>
        <if test="elevatorInstallDate != null and elevatorInstallDate != ''">
            , t.elevator_install_date= #{elevatorInstallDate}
        </if>
        <if test="elevatorServiceLife != null and elevatorServiceLife != ''">
            , t.elevator_service_life= #{elevatorServiceLife}
        </if>
        <if test="elevatorBrand1 != null and elevatorBrand1 != ''">
            , t.elevator_brand1= #{elevatorBrand1}
        </if>
        <if test="elevatorBrand2 != null and elevatorBrand2 != ''">
            , t.elevator_brand2= #{elevatorBrand2}
        </if>
        <if test="monitorCount != null and monitorCount != ''">
            , t.monitor_count= #{monitorCount}
        </if>
        <if test="monitorMaintenanceCompany != null and monitorMaintenanceCompany != ''">
            , t.monitor_maintenance_company= #{monitorMaintenanceCompany}
        </if>
        <if test="barrierGateCount != null and barrierGateCount != ''">
            , t.barrier_gate_count= #{barrierGateCount}
        </if>
        <if test="barrierGateBrand != null and barrierGateBrand != ''">
            , t.barrier_gate_brand= #{barrierGateBrand}
        </if>
        <if test="barrierSupplierContact != null and barrierSupplierContact != ''">
            , t.barrier_supplier_contact= #{barrierSupplierContact}
        </if>
        <if test="barrierSupplierPhone != null and barrierSupplierPhone != ''">
            , t.barrier_supplier_phone= #{barrierSupplierPhone}
        </if>
        <if test="waterPumpCount != null and waterPumpCount != ''">
            , t.water_pump_count= #{waterPumpCount}
        </if>
        <if test="groundParkingSpaces != null and groundParkingSpaces != ''">
            , t.ground_parking_spaces= #{groundParkingSpaces}
        </if>
        <if test="undergroundParkingSpaces != null and undergroundParkingSpaces != ''">
            , t.underground_parking_spaces= #{undergroundParkingSpaces}
        </if>
        <if test="groundNonMechanicalFee != null and groundNonMechanicalFee != ''">
            , t.ground_non_mechanical_fee= #{groundNonMechanicalFee}
        </if>
        <if test="garageNonMechanicalFee != null and garageNonMechanicalFee != ''">
            , t.garage_non_mechanical_fee= #{garageNonMechanicalFee}
        </if>
        <if test="temporaryHourlyFee != null and temporaryHourlyFee != ''">
            , t.temporary_hourly_fee= #{temporaryHourlyFee}
        </if>
        <if test="temporaryDailyFee != null and temporaryDailyFee != ''">
            , t.temporary_daily_fee= #{temporaryDailyFee}
        </if>
        <if test="temporaryPerTimeFee != null and temporaryPerTimeFee != ''">
            , t.temporary_per_time_fee= #{temporaryPerTimeFee}
        </if>
        <if test="totalBuildingCount != null and totalBuildingCount != ''">
            , t.total_building_count= #{totalBuildingCount}
        </if>
        <if test="buildingUnitCount != null and buildingUnitCount != ''">
            , t.building_unit_count= #{buildingUnitCount}
        </if>
        <if test="highRiseBuildingCount != null and highRiseBuildingCount != ''">
            , t.high_rise_building_count= #{highRiseBuildingCount}
        </if>
        <if test="multilayerVillaBuildingCount != null and multilayerVillaBuildingCount != ''">
            , t.multilayer_villa_building_count= #{multilayerVillaBuildingCount}
        </if>
        <if test="residentialHouseholdCount != null and residentialHouseholdCount != ''">
            , t.residential_household_count= #{residentialHouseholdCount}
        </if>
        <if test="shopHouseholdCount != null and shopHouseholdCount != ''">
            , t.shop_household_count= #{shopHouseholdCount}
        </if>
        <if test="publicArea != null and publicArea != ''">
            , t.public_area= #{publicArea}
        </if>
        <if test="propertyRoomArea != null and propertyRoomArea != ''">
            , t.property_room_area= #{propertyRoomArea}
        </if>
        where 1=1
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
 
    </update>
 
    <!-- 查询小区管理数量 add by wuxw 2018-07-03 -->
    <select id="queryCommunitysCount" parameterType="Map" resultType="Map">
        select count(1) count
        from s_community t
        where 1 =1
        <if test="feePrice !=null and feePrice != ''">
            and t.fee_price= #{feePrice}
        </if>
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="cityCode !=null and cityCode != ''">
            and t.city_code= #{cityCode}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="mapY !=null and mapY != ''">
            and t.map_y= #{mapY}
        </if>
        <if test="payFeeMonth !=null and payFeeMonth != ''">
            and t.pay_fee_month= #{payFeeMonth}
        </if>
        <if test="mapX !=null and mapX != ''">
            and t.map_x= #{mapX}
        </if>
        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
            and t.nearby_landmarks= #{nearbyLandmarks}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            and t.tel= #{tel}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityCode !=null and communityCode != ''">
            and t.community_code= #{communityCode}
        </if>
        <if test="communityIds != null">
            and t.community_id in
            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="communityArea !=null and communityArea != ''">
            and t.community_area= #{communityArea}
        </if>
 
 
    </select>
    <select id="queryCommunityAndPropertys" parameterType="Map" resultType="Map">
        select t.fee_price,t.fee_price feePrice,t.address,t.city_code,t.city_code cityCode,t.status_cd,t.status_cd
        statusCd,t.map_y,t.map_y mapY,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.map_x,t.map_x
        mapX,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,t.name,t.tel,t.state,t.community_id,t.community_id
        communityId,t.community_area,t.community_area communityArea,t.qr_code qrCode,cm.member_id storeId,t.take_time,
        t.take_time takeTime, t.out_time , t.out_time outTime,t.community_code,t.community_code communityCode
        from s_community t
        left join s_community_member cm on t.community_id = cm.community_id and cm.member_type_cd = '390001200002'
        where 1 =1
        <if test="feePrice !=null and feePrice != ''">
            and t.fee_price= #{feePrice}
        </if>
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="cityCode !=null and cityCode != ''">
            and t.city_code= #{cityCode}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="mapY !=null and mapY != ''">
            and t.map_y= #{mapY}
        </if>
        <if test="payFeeMonth !=null and payFeeMonth != ''">
            and t.pay_fee_month= #{payFeeMonth}
        </if>
        <if test="mapX !=null and mapX != ''">
            and t.map_x= #{mapX}
        </if>
        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
            and t.nearby_landmarks= #{nearbyLandmarks}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            and t.tel= #{tel}
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityArea !=null and communityArea != ''">
            and t.community_area= #{communityArea}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
 
 
</mapper>