andrew преди 4 години
родител
ревизия
1abde88034
променени са 48 файла, в които са добавени 371 реда и са изтрити 118 реда
  1. 49
    2
      src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java
  2. 1
    1
      src/main/java/com/huiju/estateagents/property/dao/BillStatementMapper.java
  3. 1
    1
      src/main/java/com/huiju/estateagents/property/dao/TaSysUserRoleMapper.java
  4. 2
    2
      src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseOrderMapper.java
  5. 45
    5
      src/main/java/com/huiju/estateagents/property/dao/TaUserVerifyMapper.java
  6. 1
    1
      src/main/java/com/huiju/estateagents/property/dao/ToCommunitiesMapper.java
  7. 1
    1
      src/main/java/com/huiju/estateagents/property/dao/TpBillOrderMapper.java
  8. 13
    2
      src/main/java/com/huiju/estateagents/property/dao/TpBuildingMapper.java
  9. 3
    3
      src/main/java/com/huiju/estateagents/property/dao/TpBuildingOwnerInfoMapper.java
  10. 2
    2
      src/main/java/com/huiju/estateagents/property/dao/TpEquipmentMapper.java
  11. 16
    1
      src/main/java/com/huiju/estateagents/property/dao/TpLevelMapper.java
  12. 12
    1
      src/main/java/com/huiju/estateagents/property/dao/TpPhaseMapper.java
  13. 12
    7
      src/main/java/com/huiju/estateagents/property/dao/TpRoomNoMapper.java
  14. 16
    0
      src/main/java/com/huiju/estateagents/property/dao/TpUnitMapper.java
  15. 23
    0
      src/main/java/com/huiju/estateagents/property/service/IBuildingOwnerInfoService.java
  16. 65
    2
      src/main/java/com/huiju/estateagents/property/service/impl/BuildingOwnerInfoServiceImpl.java
  17. 2
    2
      src/main/resources/mapper/property/AnnouncementTelMapper.xml
  18. 11
    11
      src/main/resources/mapper/property/BillInvoiceMapper.xml
  19. 2
    2
      src/main/resources/mapper/property/BillMapper.xml
  20. 1
    1
      src/main/resources/mapper/property/BillOrderMapper.xml
  21. 1
    1
      src/main/resources/mapper/property/BillStatementMapper.xml
  22. 1
    1
      src/main/resources/mapper/property/HotelMapper.xml
  23. 1
    1
      src/main/resources/mapper/property/HotelRoomMapper.xml
  24. 13
    13
      src/main/resources/mapper/property/IndexCountMapper.xml
  25. 2
    2
      src/main/resources/mapper/property/MessageMapper.xml
  26. 5
    5
      src/main/resources/mapper/property/SysRoleMapper.xml
  27. 1
    1
      src/main/resources/mapper/property/SysRoleMenuMapper.xml
  28. 6
    6
      src/main/resources/mapper/property/TaFaceMapper.xml
  29. 2
    2
      src/main/resources/mapper/property/TaSysMenuMapper.xml
  30. 2
    2
      src/main/resources/mapper/property/TaTemporaryLicenseCountMapper.xml
  31. 2
    2
      src/main/resources/mapper/property/TaUserLicenseOrderMapper.xml
  32. 26
    4
      src/main/resources/mapper/property/TaUserVerifyMapper.xml
  33. 1
    1
      src/main/resources/mapper/property/ToCommunitiesMapper.xml
  34. 6
    6
      src/main/resources/mapper/property/TpAnnouncementMapper.xml
  35. 1
    1
      src/main/resources/mapper/property/TpBuildingMapper.xml
  36. 4
    4
      src/main/resources/mapper/property/TpBuildingOwnerInfoMapper.xml
  37. 1
    1
      src/main/resources/mapper/property/TpHotelImgMapper.xml
  38. 1
    1
      src/main/resources/mapper/property/TpRentalHouseImgMapper.xml
  39. 1
    1
      src/main/resources/mapper/property/TpRentalHouseMapper.xml
  40. 1
    1
      src/main/resources/mapper/property/TpShopImgMapper.xml
  41. 1
    1
      src/main/resources/mapper/property/TpShopMapper.xml
  42. 1
    1
      src/main/resources/mapper/property/TpShopTypeMapper.xml
  43. 1
    1
      src/main/resources/mapper/property/TpSysRoleMapper.xml
  44. 3
    3
      src/main/resources/mapper/property/TpTicketMapper.xml
  45. 2
    2
      src/main/resources/mapper/property/TpTicketRecordMapper.xml
  46. 2
    2
      src/main/resources/mapper/property/TpTransactionMapper.xml
  47. 1
    1
      src/main/resources/mapper/property/TransactionReplyMapper.xml
  48. 4
    4
      src/main/resources/mapper/property/UserMapper.xml

+ 49
- 2
src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java Целия файл

38
  */
38
  */
39
 @RestController
39
 @RestController
40
 
40
 
41
-@RequestMapping("/")
42
-@Api(value = "楼栋业主资料信息", description = "楼栋业主资料信息 Api")
41
+@RequestMapping("/api")
42
+@Api(value = "楼栋业主资料信息", tags = "楼栋业主资料信息 Api")
43
 public class BuildingOwnerInfoController extends BaseController {
43
 public class BuildingOwnerInfoController extends BaseController {
44
 
44
 
45
     @Autowired
45
     @Autowired
327
         ResponseBean buildinglist=iBuildingOwnerInfoService.buildingDetails(paramets,userElement);
327
         ResponseBean buildinglist=iBuildingOwnerInfoService.buildingDetails(paramets,userElement);
328
         return buildinglist;
328
         return buildinglist;
329
     }
329
     }
330
+
331
+    @RequestMapping(value = "/wx/building/select/address", method = RequestMethod.GET)
332
+    @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号 (申请注册绑定)", notes = "根据 小区/期/楼栋/单元/楼层/户号")
333
+    @ApiImplicitParams({
334
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "orgId", value = "传1"),
335
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
336
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
337
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
338
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层")
339
+    })
340
+    public ResponseBean selectByAddress(@RequestParam("orgId") Integer orgId,
341
+                                        @RequestParam(value = "phaseId", required = false) Integer phaseId,
342
+                                        @RequestParam(value = "buildingId",required = false) Integer buildingId,
343
+                                        @RequestParam(value = "unitId", required = false) Integer unitId,
344
+                                        @RequestParam(value = "levelId", required = false) Integer levelId) {
345
+
346
+        ResponseBean responseBean = new ResponseBean();
347
+        responseBean = iBuildingOwnerInfoService.selectBuildList(orgId, phaseId, buildingId, unitId, levelId);
348
+        return responseBean;
349
+
350
+    }
351
+
352
+    @RequestMapping(value = "/wx/building/has", method = RequestMethod.GET)
353
+    @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号 (并校验这个用户,是否绑定了这个房产)", notes = "根据 小区、期、楼栋、单元、楼层、户号")
354
+    @ApiImplicitParams({
355
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "orgId", value = "传1"),
356
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
357
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
358
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
359
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
360
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
361
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
362
+    })
363
+    public ResponseBean hasBuilding(@RequestParam(value = "orgId", required = false) Integer orgId,
364
+                                    @RequestParam(value = "phaseId", required = false) Integer phaseId,
365
+                                    @RequestParam(value = "buildingId",required = false) Integer buildingId,
366
+                                    @RequestParam(value = "unitId", required = false) Integer unitId,
367
+                                    @RequestParam(value = "levelId", required = false) Integer levelId,
368
+                                    @RequestParam(value = "roomNoId", required = false) Integer roomNoId,
369
+                                    HttpServletRequest request){
370
+
371
+        ResponseBean responseBean = new ResponseBean();
372
+        TaUser userElement = getTaUser(request);
373
+        responseBean = iBuildingOwnerInfoService.hasBuild(userElement, orgId ,phaseId, buildingId, unitId, levelId, roomNoId);
374
+        return responseBean;
375
+    }
376
+
330
 }
377
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/BillStatementMapper.java Целия файл

28
      * @return
28
      * @return
29
      */
29
      */
30
     @ResultType(BillStatement.class)
30
     @ResultType(BillStatement.class)
31
-    @Select("select *  from tp_bill_statement where community_id = #{orgId} and bill_invoice_id = #{tpBillInvoiceId}")
31
+    @Select("select *  from tp_bill_statement where org_id = #{orgId} and bill_invoice_id = #{tpBillInvoiceId}")
32
     BillStatement selectByCommunityIdAndBillInvoiceId(Integer orgId, Integer tpBillInvoiceId);
32
     BillStatement selectByCommunityIdAndBillInvoiceId(Integer orgId, Integer tpBillInvoiceId);
33
 }
33
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/TaSysUserRoleMapper.java Целия файл

23
      * @param userId
23
      * @param userId
24
      * @return
24
      * @return
25
      */
25
      */
26
-    @Delete("delete from ta_sys_user_role where community_id=#{orgId} and user_id=#{userId}")
26
+    @Delete("delete from ta_sys_user_role where org_id=#{orgId} and user_id=#{userId}")
27
     int deleteByCommunityIdAndUserId(@Param("orgId") Integer orgId, @Param("userId") Integer userId);
27
     int deleteByCommunityIdAndUserId(@Param("orgId") Integer orgId, @Param("userId") Integer userId);
28
 
28
 
29
 }
29
 }

+ 2
- 2
src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseOrderMapper.java Целия файл

29
      * @return
29
      * @return
30
      */
30
      */
31
     @ResultType(TaUserLicenseOrder.class)
31
     @ResultType(TaUserLicenseOrder.class)
32
-    @Select("select * from ta_user_license_order where community_id = #{orgId} limit #{pageNum},#{pageSize}")
32
+    @Select("select * from ta_user_license_order where org_id = #{orgId} limit #{pageNum},#{pageSize}")
33
     List<TaUserLicenseOrder> getLicensePage(@Param("orgId") Integer orgId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
33
     List<TaUserLicenseOrder> getLicensePage(@Param("orgId") Integer orgId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
34
 
34
 
35
     /**
35
     /**
38
      * @return
38
      * @return
39
      */
39
      */
40
     @ResultType(Integer.class)
40
     @ResultType(Integer.class)
41
-    @Select("select count(*) from ta_user_license_order where community_id = #{orgId}")
41
+    @Select("select count(*) from ta_user_license_order where org_id = #{orgId}")
42
     Integer getCount(@Param("orgId") Integer orgId);
42
     Integer getCount(@Param("orgId") Integer orgId);
43
     
43
     
44
     
44
     

+ 45
- 5
src/main/java/com/huiju/estateagents/property/dao/TaUserVerifyMapper.java Целия файл

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.huiju.estateagents.property.model.TaUserVerify;
6
 import com.huiju.estateagents.property.model.TaUserVerify;
7
-import org.apache.ibatis.annotations.Mapper;
8
-import org.apache.ibatis.annotations.Param;
9
-import org.apache.ibatis.annotations.ResultType;
10
-import org.apache.ibatis.annotations.Select;
7
+import org.apache.ibatis.annotations.*;
11
 
8
 
12
 import java.util.List;
9
 import java.util.List;
13
 
10
 
69
      */
66
      */
70
     @ResultType(TaUserVerify.class)
67
     @ResultType(TaUserVerify.class)
71
     @Select("select  *  from ta_user_verify " +
68
     @Select("select  *  from ta_user_verify " +
72
-            "where community_id = #{orgId} " +
69
+            "where org_id = #{orgId} " +
73
             "and phase_name = #{phaseName} " +
70
             "and phase_name = #{phaseName} " +
74
             "and building_name = #{buildingName} " +
71
             "and building_name = #{buildingName} " +
75
             "and unit_name = #{unitName} " +
72
             "and unit_name = #{unitName} " +
100
                                                            @Param("levelId") Integer levelId,
97
                                                            @Param("levelId") Integer levelId,
101
                                                            @Param("roomNoId") Integer roomNoId,
98
                                                            @Param("roomNoId") Integer roomNoId,
102
                                                            @Param("verifyStatus") Integer verifyStatus);
99
                                                            @Param("verifyStatus") Integer verifyStatus);
100
+
101
+    /**
102
+     * 根据 用户id、小区id 、 期、栋、单元、楼层、户号、审核状态  进行条件查询
103
+     * @param orgId
104
+     * @param phaseId
105
+     * @param buildingId
106
+     * @param unitId
107
+     * @param levelId
108
+     * @param roomNoId
109
+     * @param verifyStatus
110
+     * @return
111
+     */
112
+    List<TaUserVerify> selectWxCommunityAndAddress(@Param("userId") Integer userId,
113
+                                                 @Param("orgId") Integer orgId,
114
+                                                 @Param("phaseId") Integer phaseId,
115
+                                                 @Param("buildingId") Integer buildingId,
116
+                                                 @Param("unitId") Integer unitId,
117
+                                                 @Param("levelId") Integer levelId,
118
+                                                 @Param("roomNoId") Integer roomNoId,
119
+                                                 @Param("verifyStatus") Integer verifyStatus);
120
+
121
+    /**
122
+     * 根据 小区id 、 期、栋、单元、楼层、户号, 角色id(业主), 审核通过(值为1) 进行条件查询
123
+     * @param orgId
124
+     * @param phaseId
125
+     * @param buildingId
126
+     * @param unitId
127
+     * @param levelId
128
+     * @param roomNoId
129
+     * @return
130
+     */
131
+    @ResultType(TaUserVerify.class)
132
+    @Select("select * from ta_user_verify where org_id=#{orgId}" +
133
+            " and phase_id=#{phaseId} and building_id=#{buildingId}" +
134
+            " and unit_id=#{unitId} and level_id=#{levelId}" +
135
+            " and room_no_id=#{roomNoId} and role_id=1 and verify_status=1")
136
+    TaUserVerify selectWxCommunityAndAddressAndRoleId(@Param("orgId") Integer orgId,
137
+                                                    @Param("phaseId") Integer phaseId,
138
+                                                    @Param("buildingId") Integer buildingId,
139
+                                                    @Param("unitId") Integer unitId,
140
+                                                    @Param("levelId") Integer levelId,
141
+                                                    @Param("roomNoId") Integer roomNoId);
142
+
103
 }
143
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/ToCommunitiesMapper.java Целия файл

23
      * @param phone
23
      * @param phone
24
      * @return
24
      * @return
25
      */
25
      */
26
-    @Select("SELECT tc.* FROM tp_user tu LEFT JOIN to_communities tc ON tu.community_id = tc.id WHERE tu.login_name = #{phone}")
26
+    @Select("SELECT tc.* FROM tp_user tu LEFT JOIN to_communities tc ON tu.org_id = tc.id WHERE tu.login_name = #{phone}")
27
     List<ToCommunities> selectUserById(String phone);
27
     List<ToCommunities> selectUserById(String phone);
28
 
28
 
29
 }
29
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/TpBillOrderMapper.java Целия файл

36
     @ResultType(TpBillOrder.class)
36
     @ResultType(TpBillOrder.class)
37
     @Select("select " +
37
     @Select("select " +
38
             "tbo.id as id, " +
38
             "tbo.id as id, " +
39
-            "tbo.community_id as orgId, " +
39
+            "tbo.org_id as orgId, " +
40
             "tbo.tp_bill_id as tpBillId, " +
40
             "tbo.tp_bill_id as tpBillId, " +
41
             "tbo.tp_bill_invoice_id as tpBillInvoiceId, " +
41
             "tbo.tp_bill_invoice_id as tpBillInvoiceId, " +
42
             "tbo.order_bumber as orderBumber, " +
42
             "tbo.order_bumber as orderBumber, " +

+ 13
- 2
src/main/java/com/huiju/estateagents/property/dao/TpBuildingMapper.java Целия файл

3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.huiju.estateagents.property.model.TpBuilding;
5
 import com.huiju.estateagents.property.model.TpBuilding;
6
-import org.apache.ibatis.annotations.Mapper;
7
-import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.*;
7
+
8
+import java.util.List;
8
 
9
 
9
 @Mapper
10
 @Mapper
10
 public interface TpBuildingMapper extends BaseMapper<TpBuilding> {
11
 public interface TpBuildingMapper extends BaseMapper<TpBuilding> {
16
      * @return
17
      * @return
17
      */
18
      */
18
     IPage<TpBuilding> buildinglist(Page<TpBuilding> page, @Param("tpBuilding") TpBuilding tpBuilding);
19
     IPage<TpBuilding> buildinglist(Page<TpBuilding> page, @Param("tpBuilding") TpBuilding tpBuilding);
20
+
21
+    /**
22
+     * 根据小区id,期id
23
+     * @param orgId
24
+     * @param phaseId
25
+     * @return
26
+     */
27
+    @ResultType(TpBuilding.class)
28
+    @Select("select * from tp_building where org_id=#{orgId} and phase_id=#{phaseId}")
29
+    List<TpBuilding> selectByAddress(@Param("orgId") Integer orgId, @Param("phaseId") Integer phaseId);
19
 }
30
 }

+ 3
- 3
src/main/java/com/huiju/estateagents/property/dao/TpBuildingOwnerInfoMapper.java Целия файл

26
      * @param
26
      * @param
27
      * @return
27
      * @return
28
      */
28
      */
29
-    IPage<TpBuildingOwnerInfo> selectUserApprove(Page page, @Param("ownerName") String r, @Param("ownerTel") String ownerTel, @Param("VerifyStatus") String VerifyStatus, @Param("CommunityId") Integer CommunityId);
29
+    IPage<TpBuildingOwnerInfo> selectUserApprove(Page page, @Param("ownerName") String r, @Param("ownerTel") String ownerTel, @Param("VerifyStatus") String VerifyStatus, @Param("orgId") Integer orgId);
30
 
30
 
31
     int batchInsert(List<TpBuildingOwnerInfo> list);
31
     int batchInsert(List<TpBuildingOwnerInfo> list);
32
 
32
 
47
      */
47
      */
48
 	@ResultType(TpBuildingOwnerInfo.class)
48
 	@ResultType(TpBuildingOwnerInfo.class)
49
 	@Select("select * FROM tp_building_owner_info tpio " +
49
 	@Select("select * FROM tp_building_owner_info tpio " +
50
-            "WHERE tpio.community_id = #{orgId} " +
50
+            "WHERE tpio.org_id = #{orgId} " +
51
             "and tpio.phase_id = #{phaseId} " +
51
             "and tpio.phase_id = #{phaseId} " +
52
             "and tpio.building_id = #{buildingId} " +
52
             "and tpio.building_id = #{buildingId} " +
53
             "and tpio.unit_id = #{unitId} " +
53
             "and tpio.unit_id = #{unitId} " +
70
      */
70
      */
71
     @ResultType(TpBuildingOwnerInfo.class)
71
     @ResultType(TpBuildingOwnerInfo.class)
72
     @Select("select * FROM tp_building_owner_info tpio " +
72
     @Select("select * FROM tp_building_owner_info tpio " +
73
-            "WHERE tpio.community_id = #{orgId} " +
73
+            "WHERE tpio.org_id = #{orgId} " +
74
             "and tpio.phase_name = #{phaseName} " +
74
             "and tpio.phase_name = #{phaseName} " +
75
             "and tpio.building_name = #{buildingName} " +
75
             "and tpio.building_name = #{buildingName} " +
76
             "and tpio.unit_name = #{unitName} " +
76
             "and tpio.unit_name = #{unitName} " +

+ 2
- 2
src/main/java/com/huiju/estateagents/property/dao/TpEquipmentMapper.java Целия файл

36
             "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
36
             "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
37
             "FROM " +
37
             "FROM " +
38
             "tp_equipment tm " +
38
             "tp_equipment tm " +
39
-            "where tm.community_id = #{orgId} and tm.equipment_type = #{equipmentType}")
39
+            "where tm.org_id = #{orgId} and tm.equipment_type = #{equipmentType}")
40
     List<TpEquipment> selectAllByCommunityAndEquipmentType(@Param("orgId") Integer orgId, @Param("equipmentType") Integer equipmentType);
40
     List<TpEquipment> selectAllByCommunityAndEquipmentType(@Param("orgId") Integer orgId, @Param("equipmentType") Integer equipmentType);
41
 
41
 
42
 
42
 
56
             "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
56
             "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
57
             "FROM " +
57
             "FROM " +
58
             "tp_equipment tm " +
58
             "tp_equipment tm " +
59
-            "where tm.community_id = #{orgId} and tm.equipment_type = #{equipmentType} and tm.id = #{monitoringId}")
59
+            "where tm.org_id = #{orgId} and tm.equipment_type = #{equipmentType} and tm.id = #{monitoringId}")
60
     TpEquipment getMonitoringById(@Param("orgId") Integer orgId, @Param("equipmentType") Integer equipmentType, @Param("monitoringId") Integer monitoringId);
60
     TpEquipment getMonitoringById(@Param("orgId") Integer orgId, @Param("equipmentType") Integer equipmentType, @Param("monitoringId") Integer monitoringId);
61
 
61
 
62
 
62
 

+ 16
- 1
src/main/java/com/huiju/estateagents/property/dao/TpLevelMapper.java Целия файл

3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import com.huiju.estateagents.property.model.TpLevel;
4
 import com.huiju.estateagents.property.model.TpLevel;
5
 import org.apache.ibatis.annotations.Mapper;
5
 import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
6
 
11
 
7
 /**
12
 /**
8
  * <p>
13
  * <p>
14
  */
19
  */
15
 @Mapper
20
 @Mapper
16
 public interface TpLevelMapper extends BaseMapper<TpLevel> {
21
 public interface TpLevelMapper extends BaseMapper<TpLevel> {
17
-
22
+    /**
23
+     * 根据 小区id,期id,楼栋id,单元id 进行查询
24
+     * @param orgId
25
+     * @param phaseId
26
+     * @param buildingId
27
+     * @param unitId
28
+     * @return
29
+     */
30
+    @ResultType(TpLevel.class)
31
+    @Select("select * from tp_level where org_id=#{orgId} and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}")
32
+    List<TpLevel> selectByAddress(Integer orgId, Integer phaseId, Integer buildingId, Integer unitId);
18
 }
33
 }

+ 12
- 1
src/main/java/com/huiju/estateagents/property/dao/TpPhaseMapper.java Целия файл

2
 
2
 
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import com.huiju.estateagents.property.model.TpPhase;
4
 import com.huiju.estateagents.property.model.TpPhase;
5
-import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.*;
6
+
7
+import java.util.List;
6
 
8
 
7
 /**
9
 /**
8
  * <p>
10
  * <p>
15
 @Mapper
17
 @Mapper
16
 public interface TpPhaseMapper extends BaseMapper<TpPhase> {
18
 public interface TpPhaseMapper extends BaseMapper<TpPhase> {
17
 
19
 
20
+    /**
21
+     * 根据小区查询 期
22
+     * @param orgId
23
+     * @return
24
+     */
25
+    @ResultType(TpPhase.class)
26
+    @Select("select * from tp_phase where org_id = #{orgId}")
27
+    List<TpPhase> selectByAddress(@Param("orgId") Integer orgId);
28
+
18
 }
29
 }

+ 12
- 7
src/main/java/com/huiju/estateagents/property/dao/TpRoomNoMapper.java Целия файл

2
 
2
 
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import com.huiju.estateagents.property.model.TpRoomNo;
4
 import com.huiju.estateagents.property.model.TpRoomNo;
5
-import org.apache.ibatis.annotations.Mapper;
6
-import org.apache.ibatis.annotations.Param;
7
-import org.apache.ibatis.annotations.ResultType;
8
-import org.apache.ibatis.annotations.Select;
5
+import org.apache.ibatis.annotations.*;
9
 
6
 
10
 import java.util.List;
7
 import java.util.List;
11
 
8
 
33
      */
30
      */
34
     @ResultType(TpRoomNo.class)
31
     @ResultType(TpRoomNo.class)
35
     @Select("select * from tp_room_no " +
32
     @Select("select * from tp_room_no " +
36
-            "where community_id = #{orgId} " +
33
+            "where org_id = #{orgId} " +
37
             "and phase_name = #{phaseName} " +
34
             "and phase_name = #{phaseName} " +
38
             "and building_name = #{buildingName} " +
35
             "and building_name = #{buildingName} " +
39
             "and unit_name = #{unitName} " +
36
             "and unit_name = #{unitName} " +
48
      * @return
45
      * @return
49
      */
46
      */
50
     @ResultType(TpRoomNo.class)
47
     @ResultType(TpRoomNo.class)
51
-    @Select("select * from tp_room_no where community_id = #{orgId} limit #{pageNum},#{pageSize}")
48
+    @Select("select * from tp_room_no where org_id = #{orgId} limit #{pageNum},#{pageSize}")
52
     List<TpRoomNo> selectCommunityIdList(@Param("orgId") Integer orgId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
49
     List<TpRoomNo> selectCommunityIdList(@Param("orgId") Integer orgId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
53
 
50
 
54
     /**
51
     /**
57
      * @return
54
      * @return
58
      */
55
      */
59
     @ResultType(Long.class)
56
     @ResultType(Long.class)
60
-    @Select("select count(1) from tp_room_no where community_id = #{orgId}")
57
+    @Select("select count(1) from tp_room_no where org_id = #{orgId}")
61
     Long selectCommunityIdCount(@Param("orgId") Integer orgId);
58
     Long selectCommunityIdCount(@Param("orgId") Integer orgId);
62
 
59
 
60
+    @ResultType(TpRoomNo.class)
61
+    @Select("select * from tp_room_no where org_id=#{orgId} " +
62
+            "and phase_id=#{phaseId} " +
63
+            "and building_id=#{buildingId} " +
64
+            "and unit_id=#{unitId} " +
65
+            "and level_id=#{levelId}")
66
+    List<TpRoomNo> selectByAddress(Integer orgId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId);
67
+
63
 }
68
 }

+ 16
- 0
src/main/java/com/huiju/estateagents/property/dao/TpUnitMapper.java Целия файл

3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import com.huiju.estateagents.property.model.TpUnit;
4
 import com.huiju.estateagents.property.model.TpUnit;
5
 import org.apache.ibatis.annotations.Mapper;
5
 import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
6
 
11
 
7
 /**
12
 /**
8
  * <p>
13
  * <p>
15
 @Mapper
20
 @Mapper
16
 public interface TpUnitMapper extends BaseMapper<TpUnit> {
21
 public interface TpUnitMapper extends BaseMapper<TpUnit> {
17
 
22
 
23
+    /**
24
+     * 根据 小区id,期id,楼栋id 查询
25
+     * @param orgId
26
+     * @param phaseId
27
+     * @param buildingId
28
+     * @return
29
+     */
30
+    @ResultType(TpUnit.class)
31
+    @Select("select * from tp_unit where org_id =#{orgId} and phase_id=#{phaseId} and building_id=#{buildingId}")
32
+    List<TpUnit> selectByAddress(Integer orgId, Integer phaseId, Integer buildingId);
33
+
18
 }
34
 }

+ 23
- 0
src/main/java/com/huiju/estateagents/property/service/IBuildingOwnerInfoService.java Целия файл

158
      * @return
158
      * @return
159
      */
159
      */
160
     ResponseBean buildingDetails(String paramets, TaUser userElement);
160
     ResponseBean buildingDetails(String paramets, TaUser userElement);
161
+
162
+    /**
163
+     * 根据 小区/期/楼栋/单元/楼层/户号
164
+     * @param orgId
165
+     * @param phaseId
166
+     * @param buildingId
167
+     * @param unitId
168
+     * @param levelId
169
+     * @return
170
+     */
171
+    ResponseBean selectBuildList(Integer orgId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId);
172
+
173
+    /**
174
+     * 根据 小区/期/楼栋/单元/楼层/户号
175
+     * 并校验这个用户,是否绑定了这个房产
176
+     * @param phaseId
177
+     * @param buildingId
178
+     * @param unitId
179
+     * @param levelId
180
+     * @param roomNoId
181
+     * @return
182
+     */
183
+    ResponseBean hasBuild(TaUser userElement, Integer orgId ,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
161
 }
184
 }

+ 65
- 2
src/main/java/com/huiju/estateagents/property/service/impl/BuildingOwnerInfoServiceImpl.java Целия файл

742
         }
742
         }
743
 
743
 
744
     @Override
744
     @Override
745
-    public ResponseBean selectUserApprove(String paramets,Integer CommunityId) {
745
+    public ResponseBean selectUserApprove(String paramets,Integer orgId) {
746
 
746
 
747
         ResponseBean responseBean = new ResponseBean();
747
         ResponseBean responseBean = new ResponseBean();
748
 
748
 
756
         page.setSize(pageSize == null ? 10 : pageSize);
756
         page.setSize(pageSize == null ? 10 : pageSize);
757
         page.setCurrent(pageNum == null ? 1 : pageNum);
757
         page.setCurrent(pageNum == null ? 1 : pageNum);
758
 
758
 
759
-        IPage<TpBuildingOwnerInfo> ownerInfoIPage = tpBuildingOwnerInfoMapper.selectUserApprove(page, tpBuildingOwnerInfo.getOwnerName(),tpBuildingOwnerInfo.getOwnerTel(),tpBuildingOwnerInfo.getVerifyStatus(),CommunityId);
759
+        IPage<TpBuildingOwnerInfo> ownerInfoIPage = tpBuildingOwnerInfoMapper.selectUserApprove(page, tpBuildingOwnerInfo.getOwnerName(),tpBuildingOwnerInfo.getOwnerTel(),tpBuildingOwnerInfo.getVerifyStatus(),orgId);
760
         List<TpBuildingOwnerInfo> infoList = ownerInfoIPage.getRecords();
760
         List<TpBuildingOwnerInfo> infoList = ownerInfoIPage.getRecords();
761
         infoList.stream().forEach(e->{
761
         infoList.stream().forEach(e->{
762
             if (null!=e.getBuildingName()&&!"".equals(e.getBuildingName())&&isNumeric(e.getBuildingName())){
762
             if (null!=e.getBuildingName()&&!"".equals(e.getBuildingName())&&isNumeric(e.getBuildingName())){
1173
         response.addSuccess(map);
1173
         response.addSuccess(map);
1174
         return response;
1174
         return response;
1175
     }
1175
     }
1176
+
1177
+
1178
+    @Override
1179
+    public ResponseBean selectBuildList(Integer orgId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId) {
1180
+        ResponseBean responseBean = new ResponseBean();
1181
+
1182
+        // 查询 期 -> 栋 -> 单元 -> 楼层 -> 户号
1183
+        if (null == phaseId && null == buildingId && null == unitId && null == levelId) {
1184
+            List<TpPhase> phaseList = tpPhaseMapper.selectByAddress(orgId);
1185
+            responseBean.addSuccess(phaseList);
1186
+        } else if (null == buildingId && null == unitId && null == levelId) {
1187
+            List<TpBuilding> buildingList = tpBuildingMapper.selectByAddress(orgId, phaseId);
1188
+            responseBean.addSuccess(buildingList);
1189
+        } else if (null == unitId && null == levelId) {
1190
+            List<TpUnit> unitList = tpUnitMapper.selectByAddress(orgId, phaseId, buildingId);
1191
+            responseBean.addSuccess(unitList);
1192
+        } else if (null == levelId) {
1193
+            List<TpLevel> levelList = tpLevelMapper.selectByAddress(orgId, phaseId, buildingId, unitId);
1194
+            responseBean.addSuccess(levelList);
1195
+        } else {
1196
+            List<TpRoomNo> roomNoList = tpRoomNoMapper.selectByAddress(orgId, phaseId, buildingId, unitId, levelId);
1197
+            responseBean.addSuccess(roomNoList);
1198
+        }
1199
+
1200
+        return responseBean;
1201
+    }
1202
+
1203
+    @Override
1204
+    public ResponseBean hasBuild(TaUser userElement, Integer orgId ,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
1205
+        ResponseBean responseBean = new ResponseBean();
1206
+        // 1.检验该用户关联有没有这个 户号,审核通过的
1207
+        List<TaUserVerify> taUserVerifyEqVerifyStatus1 = taUserVerifyMapper.selectWxCommunityAndAddress(userElement.getUserId(),userElement.getOrgId(), phaseId, buildingId, unitId, levelId, roomNoId, 1);
1208
+        // List<TaUserVerify> taUserVerify = taUserVerifyMapper.selectCommunityAndAddressAndNotVerifyStatus2(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
1209
+        if (null != taUserVerifyEqVerifyStatus1 && taUserVerifyEqVerifyStatus1.size() > 0) {
1210
+            responseBean.addError("你已关联此房间,无法再次关联!");
1211
+            return  responseBean;
1212
+        }
1213
+
1214
+        // 1.检验该用户关联有没有这个 户号,待审核
1215
+        List<TaUserVerify> taUserVerifyEqVerifyStatus0 = taUserVerifyMapper.selectWxCommunityAndAddress(userElement.getUserId(),userElement.getOrgId(), phaseId, buildingId, unitId, levelId, roomNoId, 0);
1216
+        if (null != taUserVerifyEqVerifyStatus0 && taUserVerifyEqVerifyStatus0.size() > 0) {
1217
+            responseBean.addError("您已提交了这个房产的审核!请等待户主或者物业审核后,再进行下一步操作!");
1218
+            return responseBean;
1219
+        }
1220
+
1221
+
1222
+        Map<String,Object> result = Maps.newHashMap();
1223
+
1224
+        // 2.检验这个户号是否关联了 户主
1225
+        TaUserVerify ownerUserVerify = taUserVerifyMapper.selectWxCommunityAndAddressAndRoleId(orgId, phaseId, buildingId, unitId, levelId, roomNoId);
1226
+        if (null != ownerUserVerify) {
1227
+            TaUser user = taUserMapper.selectById(ownerUserVerify.getUserId());
1228
+            result.put("ownerName",user.getUserName());
1229
+            result.put("roleName", "OWNER");
1230
+            responseBean.addSuccess(result);
1231
+            return responseBean;
1232
+        }
1233
+
1234
+        result.put("ownerName",null);
1235
+        result.put("roleName", null);
1236
+        responseBean.addSuccess(result);
1237
+        return responseBean;
1238
+    }
1176
 }
1239
 }

+ 2
- 2
src/main/resources/mapper/property/AnnouncementTelMapper.xml Целия файл

4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.AnnouncementTel">
4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.AnnouncementTel">
5
        SELECT
5
        SELECT
6
             t.id,
6
             t.id,
7
-            t.community_id AS orgId,
7
+            t.org_id AS orgId,
8
             t.NAME,
8
             t.NAME,
9
             t.tel,
9
             t.tel,
10
             t.remark,
10
             t.remark,
15
             LEFT JOIN tp_user u ON t.update_user = u.id
15
             LEFT JOIN tp_user u ON t.update_user = u.id
16
         WHERE
16
         WHERE
17
             1 = 1
17
             1 = 1
18
-        AND t.community_id = #{announcementTel.orgId}
18
+        AND t.org_id = #{announcementTel.orgId}
19
         <if test="announcementTel.tel != null and announcementTel.tel != ''">
19
         <if test="announcementTel.tel != null and announcementTel.tel != ''">
20
           AND t.tel like concat('%',#{announcementTel.tel},'%')
20
           AND t.tel like concat('%',#{announcementTel.tel},'%')
21
         </if>
21
         </if>

+ 11
- 11
src/main/resources/mapper/property/BillInvoiceMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.huiju.estateagents.property.dao.BillInvoiceMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.BillInvoiceMapper">
4
     <sql id="Base_Column_List" >
4
     <sql id="Base_Column_List" >
5
-    id, community_id, bill_id, building_owner_info_id, ta_user_id, bill_invoice_explain,
5
+    id, org_id, bill_id, building_owner_info_id, ta_user_id, bill_invoice_explain,
6
     pay_price, bill_statement_id, bill_status, pay_name, pay_date, create_user, create_date,
6
     pay_price, bill_statement_id, bill_status, pay_name, pay_date, create_user, create_date,
7
     update_user, update_date, pay_type
7
     update_user, update_date, pay_type
8
   </sql>
8
   </sql>
50
                     AND tpi.bill_id = #{map.billId}
50
                     AND tpi.bill_id = #{map.billId}
51
                 </if>
51
                 </if>
52
                 <if test="map.orgId != null">
52
                 <if test="map.orgId != null">
53
-                    AND tpi.community_Id = #{map.orgId}
53
+                    AND tpi.org_id = #{map.orgId}
54
                 </if>
54
                 </if>
55
                 AND tpi.status = 1
55
                 AND tpi.status = 1
56
             </trim>
56
             </trim>
78
                     AND tpi.bill_id = #{map.billId}
78
                     AND tpi.bill_id = #{map.billId}
79
                 </if>
79
                 </if>
80
                 <if test="map.orgId != null">
80
                 <if test="map.orgId != null">
81
-                    AND tpi.community_Id = #{map.orgId}
81
+                    AND tpi.org_id = #{map.orgId}
82
                 </if>
82
                 </if>
83
                 AND tpi.status = 0
83
                 AND tpi.status = 0
84
             </trim>
84
             </trim>
109
                     AND tpi.bill_id = #{map.billId}
109
                     AND tpi.bill_id = #{map.billId}
110
                 </if>
110
                 </if>
111
                 <if test="map.orgId != null">
111
                 <if test="map.orgId != null">
112
-                    AND tpi.community_Id = #{map.orgId}
112
+                    AND tpi.org_id = #{map.orgId}
113
                 </if>
113
                 </if>
114
                 AND tpi.status = 1
114
                 AND tpi.status = 1
115
             </trim>
115
             </trim>
120
     <select id="getPriceCount" resultType="map">
120
     <select id="getPriceCount" resultType="map">
121
         SELECT
121
         SELECT
122
             sum( pay_price ) AS totalPrice,
122
             sum( pay_price ) AS totalPrice,
123
-            community_id AS orgId
123
+            org_id AS orgId
124
         FROM
124
         FROM
125
             tp_bill_invoice
125
             tp_bill_invoice
126
         WHERE
126
         WHERE
127
             `status` = 1
127
             `status` = 1
128
         AND bill_status = 1
128
         AND bill_status = 1
129
         GROUP BY
129
         GROUP BY
130
-            community_id
130
+            org_id
131
     </select>
131
     </select>
132
 
132
 
133
     <select id="getBillsList" resultType="map">
133
     <select id="getBillsList" resultType="map">
145
         FROM
145
         FROM
146
         tp_bill_invoice i
146
         tp_bill_invoice i
147
         LEFT JOIN tp_bill b ON b.id = i.bill_id
147
         LEFT JOIN tp_bill b ON b.id = i.bill_id
148
-        AND b.community_id = #{communityId,jdbcType=INTEGER}
148
+        AND b.org_id = #{communityId,jdbcType=INTEGER}
149
         WHERE
149
         WHERE
150
         i.orgId = #{orgId,jdbcType=INTEGER}
150
         i.orgId = #{orgId,jdbcType=INTEGER}
151
         <if test="payType == 0">
151
         <if test="payType == 0">
188
     <select id="selectByIdAndroomNoId" resultType="com.huiju.estateagents.property.model.BillInvoice" >
188
     <select id="selectByIdAndroomNoId" resultType="com.huiju.estateagents.property.model.BillInvoice" >
189
     SELECT
189
     SELECT
190
         t.id,
190
         t.id,
191
-        t.community_id AS communityId,
191
+        t.org_id AS orgId,
192
         t.bill_id AS billId,
192
         t.bill_id AS billId,
193
         t.building_owner_info_id AS buildingOwnerInfoId,
193
         t.building_owner_info_id AS buildingOwnerInfoId,
194
         t.ta_user_id AS taUserId,
194
         t.ta_user_id AS taUserId,
201
         b.bill_name as billName
201
         b.bill_name as billName
202
     FROM
202
     FROM
203
 	    tp_bill_invoice t
203
 	    tp_bill_invoice t
204
-	LEFT JOIN tp_bill b ON t.bill_id = b.id and b.community_id = #{communityId,jdbcType=INTEGER}
204
+	LEFT JOIN tp_bill b ON t.bill_id = b.id and b.org_id = #{orgId,jdbcType=INTEGER}
205
     where t.id = #{id,jdbcType=INTEGER}
205
     where t.id = #{id,jdbcType=INTEGER}
206
-    and t.community_id = #{communityId,jdbcType=INTEGER}
206
+    and t.org_id = #{orgId,jdbcType=INTEGER}
207
     and t.status = 1
207
     and t.status = 1
208
     and t.room_no_id = #{roomNoId,jdbcType=INTEGER}
208
     and t.room_no_id = #{roomNoId,jdbcType=INTEGER}
209
   </select>
209
   </select>
211
     <select id="selectByOutTradeNo" resultType="com.huiju.estateagents.property.model.BillInvoice" >
211
     <select id="selectByOutTradeNo" resultType="com.huiju.estateagents.property.model.BillInvoice" >
212
   SELECT
212
   SELECT
213
         t.id,
213
         t.id,
214
-        t.community_id AS communityId,
214
+        t.org_id AS communityId,
215
         t.bill_id AS billId,
215
         t.bill_id AS billId,
216
         t.building_owner_info_id AS buildingOwnerInfoId,
216
         t.building_owner_info_id AS buildingOwnerInfoId,
217
         t.ta_user_id AS taUserId,
217
         t.ta_user_id AS taUserId,

+ 2
- 2
src/main/resources/mapper/property/BillMapper.xml Целия файл

4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.Bill">
4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.Bill">
5
         SELECT
5
         SELECT
6
             t.id,
6
             t.id,
7
-            t.community_id,
7
+            t.org_id,
8
             t.bill_name,
8
             t.bill_name,
9
             t.bill_explain,
9
             t.bill_explain,
10
             t.pay_total_num,
10
             t.pay_total_num,
20
             tp_bill t
20
             tp_bill t
21
         WHERE
21
         WHERE
22
         1 = 1
22
         1 = 1
23
-        AND t.community_id = #{bill.orgId}
23
+        AND t.org_id = #{bill.orgId}
24
         <if test="bill.id != null and bill.id != '' or bill.id ==0">
24
         <if test="bill.id != null and bill.id != '' or bill.id ==0">
25
             and t.id like concat('%',#{bill.id},'%')
25
             and t.id like concat('%',#{bill.id},'%')
26
         </if>
26
         </if>

+ 1
- 1
src/main/resources/mapper/property/BillOrderMapper.xml Целия файл

28
                     and tbo.pay_phone like CONCAT('%', #{map.payPhone},'%')
28
                     and tbo.pay_phone like CONCAT('%', #{map.payPhone},'%')
29
                 </if>
29
                 </if>
30
                 <if test="map.orgId != null">
30
                 <if test="map.orgId != null">
31
-                    and tbo.community_id = #{map.orgId}
31
+                    and tbo.org_id = #{map.orgId}
32
                 </if>
32
                 </if>
33
             </trim>
33
             </trim>
34
         </where>
34
         </where>

+ 1
- 1
src/main/resources/mapper/property/BillStatementMapper.xml Целия файл

29
                     and tbs.pay_name like CONCAT('%', #{map.payName},'%')
29
                     and tbs.pay_name like CONCAT('%', #{map.payName},'%')
30
                 </if>
30
                 </if>
31
                 <if test="map.orgId != null">
31
                 <if test="map.orgId != null">
32
-                    and tbs.community_id = #{map.orgId}
32
+                    and tbs.org_id = #{map.orgId}
33
                 </if>
33
                 </if>
34
             </trim>
34
             </trim>
35
         </where>
35
         </where>

+ 1
- 1
src/main/resources/mapper/property/HotelMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.huiju.estateagents.property.dao.HotelMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.HotelMapper">
4
  <select id="selectHotel" resultType="com.huiju.estateagents.property.model.Hotel">
4
  <select id="selectHotel" resultType="com.huiju.estateagents.property.model.Hotel">
5
-  select * from tp_hotel where community_id = #{orgId};
5
+  select * from tp_hotel where org_id = #{orgId};
6
  </select>
6
  </select>
7
 </mapper>
7
 </mapper>

+ 1
- 1
src/main/resources/mapper/property/HotelRoomMapper.xml Целия файл

22
                 AND date_format(create_date, '%Y-%m-%d') <![CDATA[>= ]]> date_format(#{beginTime}, '%Y-%m-%d')
22
                 AND date_format(create_date, '%Y-%m-%d') <![CDATA[>= ]]> date_format(#{beginTime}, '%Y-%m-%d')
23
                 AND date_format(create_date, '%Y-%m-%d')<![CDATA[<= ]]> date_format(#{endTime}, '%Y-%m-%d')
23
                 AND date_format(create_date, '%Y-%m-%d')<![CDATA[<= ]]> date_format(#{endTime}, '%Y-%m-%d')
24
             </if>
24
             </if>
25
-            and community_id = #{orgId}
25
+            and org_id = #{orgId}
26
         </where>
26
         </where>
27
         order by sort desc,update_date desc
27
         order by sort desc,update_date desc
28
     </select>
28
     </select>

+ 13
- 13
src/main/resources/mapper/property/IndexCountMapper.xml Целия файл

5
  <select id="getTicketList" resultType="com.huiju.estateagents.property.model.TpTicket">
5
  <select id="getTicketList" resultType="com.huiju.estateagents.property.model.TpTicket">
6
     SELECT
6
     SELECT
7
         id,
7
         id,
8
-        community_id,
8
+        org_id,
9
         `status`,
9
         `status`,
10
         type,
10
         type,
11
         repair_type,
11
         repair_type,
12
         create_date
12
         create_date
13
     FROM
13
     FROM
14
         tp_ticket
14
         tp_ticket
15
-    WHERE community_id = #{orgId}
15
+    WHERE org_id = #{orgId}
16
  </select>
16
  </select>
17
 
17
 
18
     <select id="selectCommunityOpenDoorCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
18
     <select id="selectCommunityOpenDoorCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
28
     </select>
28
     </select>
29
 
29
 
30
     <select id="getPublicCameraCount" resultType="java.lang.Integer">
30
     <select id="getPublicCameraCount" resultType="java.lang.Integer">
31
-        SELECT count(id) FROM ta_public_monitor WHERE community_id = #{orgId}
31
+        SELECT count(id) FROM ta_public_monitor WHERE org_id = #{orgId}
32
     </select>
32
     </select>
33
 
33
 
34
     <select id="getRemoteMonitoringCount" resultType="java.lang.Integer">
34
     <select id="getRemoteMonitoringCount" resultType="java.lang.Integer">
35
-        SELECT count(id) FROM ta_remotely_monitor WHERE community_id = #{orgId}
35
+        SELECT count(id) FROM ta_remotely_monitor WHERE org_id = #{orgId}
36
     </select>
36
     </select>
37
 
37
 
38
     <select id="getRemoteUnitCount" resultType="java.lang.Integer">
38
     <select id="getRemoteUnitCount" resultType="java.lang.Integer">
39
-        SELECT count(id) FROM ta_remotely_door WHERE community_id = #{orgId}
39
+        SELECT count(id) FROM ta_remotely_door WHERE org_id = #{orgId}
40
     </select>
40
     </select>
41
 
41
 
42
     <select id="getBillInvoiceCountList" resultType="com.huiju.estateagents.property.model.TpBillInvoiceCount">
42
     <select id="getBillInvoiceCountList" resultType="com.huiju.estateagents.property.model.TpBillInvoiceCount">
46
         FROM
46
         FROM
47
             tp_bill_invoice_count
47
             tp_bill_invoice_count
48
         WHERE
48
         WHERE
49
-            community_id = #{orgId}
49
+            org_id = #{orgId}
50
             ORDER BY create_date desc LIMIT 7
50
             ORDER BY create_date desc LIMIT 7
51
     </select>
51
     </select>
52
 
52
 
57
         FROM
57
         FROM
58
             ta_user_license_count
58
             ta_user_license_count
59
         WHERE
59
         WHERE
60
-            community_id = #{orgId}
60
+            org_id = #{orgId}
61
             ORDER BY create_date desc LIMIT 7
61
             ORDER BY create_date desc LIMIT 7
62
     </select>
62
     </select>
63
     <select id="getTemporaryLicenseCountList" resultType="com.huiju.estateagents.property.model.TaTemporaryLicenseCount">
63
     <select id="getTemporaryLicenseCountList" resultType="com.huiju.estateagents.property.model.TaTemporaryLicenseCount">
67
         FROM
67
         FROM
68
             ta_temporary_license_count
68
             ta_temporary_license_count
69
         WHERE
69
         WHERE
70
-            community_id = #{orgId}
70
+            org_id = #{orgId}
71
             ORDER BY create_date desc LIMIT 7
71
             ORDER BY create_date desc LIMIT 7
72
     </select>
72
     </select>
73
 
73
 
77
         FROM
77
         FROM
78
             ta_user_verify
78
             ta_user_verify
79
         WHERE
79
         WHERE
80
-            community_id = #{orgId}
80
+            org_id = #{orgId}
81
         AND role_id = #{roleId}
81
         AND role_id = #{roleId}
82
     </select>
82
     </select>
83
 
83
 
88
         FROM
88
         FROM
89
             ta_brisk_user
89
             ta_brisk_user
90
         WHERE
90
         WHERE
91
-            community_id = #{orgId}
91
+            org_id = #{orgId}
92
             GROUP BY TO_DAYS(create_date)
92
             GROUP BY TO_DAYS(create_date)
93
             ORDER BY TO_DAYS(create_date)  desc limit 7
93
             ORDER BY TO_DAYS(create_date)  desc limit 7
94
     </select>
94
     </select>
99
         FROM
99
         FROM
100
             tp_announcement
100
             tp_announcement
101
         WHERE
101
         WHERE
102
-            community_id = #{orgId}
102
+            org_id = #{orgId}
103
     </select>
103
     </select>
104
 
104
 
105
     <select id="getActivityCount" resultType="java.lang.Integer">
105
     <select id="getActivityCount" resultType="java.lang.Integer">
108
         FROM
108
         FROM
109
             tp_activity
109
             tp_activity
110
         WHERE
110
         WHERE
111
-            community_id = #{orgId}
111
+            org_id = #{orgId}
112
     </select>
112
     </select>
113
 
113
 
114
     <select id="getTopicCount" resultType="java.lang.Integer">
114
     <select id="getTopicCount" resultType="java.lang.Integer">
117
         FROM
117
         FROM
118
             tp_transaction
118
             tp_transaction
119
         WHERE
119
         WHERE
120
-            community_id = #{orgId}
120
+            org_id = #{orgId}
121
     </select>
121
     </select>
122
 </mapper>
122
 </mapper>

+ 2
- 2
src/main/resources/mapper/property/MessageMapper.xml Целия файл

5
         SELECT
5
         SELECT
6
         id,
6
         id,
7
         ticket_id,
7
         ticket_id,
8
-        community_id,
8
+        org_id,
9
         message_type,
9
         message_type,
10
         advice_type,
10
         advice_type,
11
         model_type,
11
         model_type,
91
         SELECT
91
         SELECT
92
         id,
92
         id,
93
         ticket_id,
93
         ticket_id,
94
-        community_id,
94
+        org_id,
95
         message_type,
95
         message_type,
96
         advice_type,
96
         advice_type,
97
         model_type,
97
         model_type,

+ 5
- 5
src/main/resources/mapper/property/SysRoleMapper.xml Целия файл

4
     <select id="getRoleListByParams" resultType="com.huiju.estateagents.property.model.SysRole">
4
     <select id="getRoleListByParams" resultType="com.huiju.estateagents.property.model.SysRole">
5
         SELECT
5
         SELECT
6
             t.id,
6
             t.id,
7
-            t.community_id as orgId,
7
+            t.org_id as orgId,
8
             t.role_name AS roleName,
8
             t.role_name AS roleName,
9
             t.description,
9
             t.description,
10
             t.create_user AS createUser,
10
             t.create_user AS createUser,
15
             uu.user_name as updateName
15
             uu.user_name as updateName
16
         FROM
16
         FROM
17
             tp_sys_role t
17
             tp_sys_role t
18
-        LEFT JOIN tp_user u ON t.create_user = u.id AND u.community_id = #{role.orgId}
19
-        LEFT JOIN tp_user uu ON t.update_user = uu.id AND uu.community_id = #{role.orgId}
18
+        LEFT JOIN tp_user u ON t.create_user = u.id AND u.org_id = #{role.orgId}
19
+        LEFT JOIN tp_user uu ON t.update_user = uu.id AND uu.org_id = #{role.orgId}
20
         where
20
         where
21
           1 = 1
21
           1 = 1
22
-        AND t.community_id = #{role.orgId}
22
+        AND t.org_id = #{role.orgId}
23
         <if test="role.roleName != null and role.roleName != ''">
23
         <if test="role.roleName != null and role.roleName != ''">
24
             and t.role_name like concat('%',#{role.roleName,jdbcType=VARCHAR},'%')
24
             and t.role_name like concat('%',#{role.roleName,jdbcType=VARCHAR},'%')
25
         </if>
25
         </if>
28
     </select>
28
     </select>
29
 
29
 
30
     <select id="selectByRoleName" resultType="com.huiju.estateagents.property.model.SysRole">
30
     <select id="selectByRoleName" resultType="com.huiju.estateagents.property.model.SysRole">
31
-        SELECT id,community_id,role_name,description from tp_sys_role where role_name = #{roleName,jdbcType=VARCHAR} and community_id = #{orgId}
31
+        SELECT id,org_id,role_name,description from tp_sys_role where role_name = #{roleName,jdbcType=VARCHAR} and org_id = #{orgId}
32
     </select>
32
     </select>
33
 </mapper>
33
 </mapper>

+ 1
- 1
src/main/resources/mapper/property/SysRoleMenuMapper.xml Целия файл

3
 <mapper namespace="com.huiju.estateagents.property.dao.SysRoleMenuMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.SysRoleMenuMapper">
4
 
4
 
5
     <insert id="insertList" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
     <insert id="insertList" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
-        insert into tp_sys_role_menu(community_id,role_id,menu_id)
6
+        insert into tp_sys_role_menu(org_id,role_id,menu_id)
7
         VALUES
7
         VALUES
8
         <foreach collection="list" item="item" index="index" separator=",">
8
         <foreach collection="list" item="item" index="index" separator=",">
9
             (#{item.orgId},#{item.roleId},#{item.menuId})
9
             (#{item.orgId},#{item.roleId},#{item.menuId})

+ 6
- 6
src/main/resources/mapper/property/TaFaceMapper.xml Целия файл

4
 
4
 
5
     <select id="selectByPrimaryKey" resultType="com.huiju.estateagents.property.model.TaFace">
5
     <select id="selectByPrimaryKey" resultType="com.huiju.estateagents.property.model.TaFace">
6
         select
6
         select
7
-        id, community_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
7
+        id, org_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
8
         update_date
8
         update_date
9
         from ta_face
9
         from ta_face
10
         where id = #{id,jdbcType=INTEGER}
10
         where id = #{id,jdbcType=INTEGER}
14
         where id = #{id,jdbcType=INTEGER}
14
         where id = #{id,jdbcType=INTEGER}
15
     </delete>
15
     </delete>
16
     <insert id="insert" parameterType="com.huiju.estateagents.property.model.TaFace" >
16
     <insert id="insert" parameterType="com.huiju.estateagents.property.model.TaFace" >
17
-        insert into ta_face (id, community_id, ta_user_verify_id,face_img, create_user, create_date,
17
+        insert into ta_face (id, org_id, ta_user_verify_id,face_img, create_user, create_date,
18
         update_user, update_date)
18
         update_user, update_date)
19
         values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER},#{taUserVerifyId,jdbcType=INTEGER},#{faceImg,jdbcType=VARCHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
19
         values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER},#{taUserVerifyId,jdbcType=INTEGER},#{faceImg,jdbcType=VARCHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
20
         #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
20
         #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
26
                 id,
26
                 id,
27
             </if>
27
             </if>
28
             <if test="orgId != null" >
28
             <if test="orgId != null" >
29
-                community_id,
29
+                org_id,
30
             </if>
30
             </if>
31
             <if test="taUserVerifyId != null" >
31
             <if test="taUserVerifyId != null" >
32
                 ta_user_verify_id,
32
                 ta_user_verify_id,
78
         update ta_face
78
         update ta_face
79
         <set >
79
         <set >
80
             <if test="orgId != null" >
80
             <if test="orgId != null" >
81
-                community_id = #{orgId,jdbcType=INTEGER},
81
+                org_id = #{orgId,jdbcType=INTEGER},
82
             </if>
82
             </if>
83
             <if test="taUserVerifyId != null" >
83
             <if test="taUserVerifyId != null" >
84
                 ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
84
                 ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
104
 
104
 
105
     <select id="getByUserVerifyId" resultType="com.huiju.estateagents.property.model.TaFace" parameterType="java.lang.Integer">
105
     <select id="getByUserVerifyId" resultType="com.huiju.estateagents.property.model.TaFace" parameterType="java.lang.Integer">
106
         select
106
         select
107
-        id, community_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
107
+        id, org_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
108
         update_date
108
         update_date
109
         from ta_face
109
         from ta_face
110
         where ta_user_verify_id = #{userVerifyId,jdbcType=INTEGER}
110
         where ta_user_verify_id = #{userVerifyId,jdbcType=INTEGER}
112
 
112
 
113
     <select id="getById" resultType="com.huiju.estateagents.property.model.TaFace"  parameterType="java.lang.Integer" >
113
     <select id="getById" resultType="com.huiju.estateagents.property.model.TaFace"  parameterType="java.lang.Integer" >
114
         select
114
         select
115
-        id, community_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
115
+        id, org_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
116
         update_date
116
         update_date
117
         from ta_face
117
         from ta_face
118
         where id = #{id,jdbcType=INTEGER}
118
         where id = #{id,jdbcType=INTEGER}

+ 2
- 2
src/main/resources/mapper/property/TaSysMenuMapper.xml Целия файл

5
     <select id="selectList" parameterType="integer" resultType="com.huiju.estateagents.property.model.TaSysMenu" >
5
     <select id="selectList" parameterType="integer" resultType="com.huiju.estateagents.property.model.TaSysMenu" >
6
         SELECT
6
         SELECT
7
             tas.id,
7
             tas.id,
8
-            tas.community_id,
8
+            tas.org_id,
9
             tas.menu_name,
9
             tas.menu_name,
10
             tas.menu_url,
10
             tas.menu_url,
11
             tas.parent_id,
11
             tas.parent_id,
18
         FROM
18
         FROM
19
             ta_sys_menu tas
19
             ta_sys_menu tas
20
         WHERE
20
         WHERE
21
-            tas.community_id = #{orgId}
21
+            tas.org_id = #{orgId}
22
         order by sort
22
         order by sort
23
     </select>
23
     </select>
24
 
24
 

+ 2
- 2
src/main/resources/mapper/property/TaTemporaryLicenseCountMapper.xml Целия файл

5
     <select id="getTemporaryLicenseOrderPriceCount" resultType="map">
5
     <select id="getTemporaryLicenseOrderPriceCount" resultType="map">
6
         SELECT
6
         SELECT
7
             sum( actual_amount ) AS totalPrice,
7
             sum( actual_amount ) AS totalPrice,
8
-            community_id AS orgId
8
+            org_id AS orgId
9
         FROM
9
         FROM
10
             ta_temporary_license_order
10
             ta_temporary_license_order
11
         WHERE
11
         WHERE
12
             order_status = 1
12
             order_status = 1
13
         GROUP BY
13
         GROUP BY
14
-            community_id
14
+            org_id
15
     </select>
15
     </select>
16
 </mapper>
16
 </mapper>

+ 2
- 2
src/main/resources/mapper/property/TaUserLicenseOrderMapper.xml Целия файл

4
     <select id="getPriceCount" resultType="map">
4
     <select id="getPriceCount" resultType="map">
5
         SELECT
5
         SELECT
6
             sum( extension_price ) AS totalPrice,
6
             sum( extension_price ) AS totalPrice,
7
-            community_id AS orgId
7
+            org_id AS orgId
8
         FROM
8
         FROM
9
             ta_user_license_order
9
             ta_user_license_order
10
         WHERE
10
         WHERE
11
             order_status = 1
11
             order_status = 1
12
         GROUP BY
12
         GROUP BY
13
-            community_id
13
+            org_id
14
     </select>
14
     </select>
15
 </mapper>
15
 </mapper>

+ 26
- 4
src/main/resources/mapper/property/TaUserVerifyMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TaUserVerifyMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TaUserVerifyMapper">
4
 
4
 
5
+    <sql id="Base_Column_List" >
6
+    id, user_id, community_id, role_id, phase_id, phase_name, building_id, building_name,
7
+    unit_id, unit_name, level_id, level_name, room_no_id, room_no_name, verify_status,
8
+    create_date, verify_name, remark
9
+  </sql>
10
+
5
     <select id="selectAllByPhoneAndUserNameAndIdCard" resultType="com.huiju.estateagents.property.model.TaUserVerify" >
11
     <select id="selectAllByPhoneAndUserNameAndIdCard" resultType="com.huiju.estateagents.property.model.TaUserVerify" >
6
         select
12
         select
7
             tav.*,
13
             tav.*,
24
                     and tu.id_card like CONCAT('%',#{idCard},'%')
30
                     and tu.id_card like CONCAT('%',#{idCard},'%')
25
                 </if>
31
                 </if>
26
                 <if test="orgId != null and orgId != ''">
32
                 <if test="orgId != null and orgId != ''">
27
-                    and tav.community_id = #{orgId,jdbcType=INTEGER}
33
+                    and tav.org_id = #{orgId,jdbcType=INTEGER}
28
                 </if>
34
                 </if>
29
             </trim>
35
             </trim>
30
         </where>
36
         </where>
35
         select
41
         select
36
         *
42
         *
37
         from ta_user_verify
43
         from ta_user_verify
38
-        where community_id = #{orgId,jdbcType=INTEGER}
44
+        where org_id = #{orgId,jdbcType=INTEGER}
39
         and phase_id = #{phaseId,jdbcType=INTEGER}
45
         and phase_id = #{phaseId,jdbcType=INTEGER}
40
         and building_id = #{buildingId,jdbcType=INTEGER}
46
         and building_id = #{buildingId,jdbcType=INTEGER}
41
         and unit_id = #{unitId,jdbcType=INTEGER}
47
         and unit_id = #{unitId,jdbcType=INTEGER}
49
         select
55
         select
50
         *
56
         *
51
         from ta_user_verify
57
         from ta_user_verify
52
-        where community_id = #{orgId,jdbcType=INTEGER}
58
+        where org_id = #{orgId,jdbcType=INTEGER}
53
         and phase_id = #{phaseId,jdbcType=INTEGER}
59
         and phase_id = #{phaseId,jdbcType=INTEGER}
54
         and building_id = #{buildingId,jdbcType=INTEGER}
60
         and building_id = #{buildingId,jdbcType=INTEGER}
55
         and unit_id = #{unitId,jdbcType=INTEGER}
61
         and unit_id = #{unitId,jdbcType=INTEGER}
64
         select
70
         select
65
           *
71
           *
66
         from ta_user_verify
72
         from ta_user_verify
67
-        where community_id = #{orgId,jdbcType=INTEGER}
73
+        where org_id = #{orgId,jdbcType=INTEGER}
74
+        and user_id = #{userId,jdbcType=INTEGER}
75
+        and phase_id = #{phaseId,jdbcType=INTEGER}
76
+        and building_id = #{buildingId,jdbcType=INTEGER}
77
+        and unit_id = #{unitId,jdbcType=INTEGER}
78
+        and level_id = #{levelId,jdbcType=INTEGER}
79
+        and room_no_id = #{roomNoId,jdbcType=INTEGER}
80
+        <if test="verifyStatus != null and verifyStatus != ''">
81
+            and verify_status = #{verifyStatus}
82
+        </if>
83
+    </select>
84
+
85
+    <select id="selectWxCommunityAndAddress" resultType="com.huiju.estateagents.property.model.TaUserVerify">
86
+        select
87
+        <include refid="Base_Column_List"/>
88
+        from ta_user_verify
89
+        where community_id = #{communityId,jdbcType=INTEGER}
68
         and user_id = #{userId,jdbcType=INTEGER}
90
         and user_id = #{userId,jdbcType=INTEGER}
69
         and phase_id = #{phaseId,jdbcType=INTEGER}
91
         and phase_id = #{phaseId,jdbcType=INTEGER}
70
         and building_id = #{buildingId,jdbcType=INTEGER}
92
         and building_id = #{buildingId,jdbcType=INTEGER}

+ 1
- 1
src/main/resources/mapper/property/ToCommunitiesMapper.xml Целия файл

3
 <mapper namespace="com.huiju.estateagents.property.dao.ToCommunitiesMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.ToCommunitiesMapper">
4
 
4
 
5
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
-        insert into tp_building_owner_info(community_id,id_card, building,unit, `level`,
6
+        insert into tp_building_owner_info(org_id,id_card, building,unit, `level`,
7
         room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
7
         room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
8
         VALUES
8
         VALUES
9
         <foreach collection="list" item="item" index="index" separator=",">
9
         <foreach collection="list" item="item" index="index" separator=",">

+ 6
- 6
src/main/resources/mapper/property/TpAnnouncementMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpAnnouncementMapper" >
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpAnnouncementMapper" >
4
   <sql id="Base_Column_List" >
4
   <sql id="Base_Column_List" >
5
-    id, community_id, announcement_title, announcement_carousel_img, announcement_content,
5
+    id, org_id, announcement_title, announcement_carousel_img, announcement_content,
6
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
6
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
7
     update_date
7
     update_date
8
   </sql>
8
   </sql>
9
   <select id="getAnnouncements" resultType="com.huiju.estateagents.property.model.TpAnnouncement">
9
   <select id="getAnnouncements" resultType="com.huiju.estateagents.property.model.TpAnnouncement">
10
     SELECT
10
     SELECT
11
-    id, community_id, announcement_title, announcement_carousel_img, announcement_content,
11
+    id, org_id, announcement_title, announcement_carousel_img, announcement_content,
12
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
12
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
13
     update_date
13
     update_date
14
    FROM
14
    FROM
20
         <if test="record.announcementTitle != null and record.announcementTitle != ''" >
20
         <if test="record.announcementTitle != null and record.announcementTitle != ''" >
21
           AND announcement_title like concat('%',#{record.announcementTitle,jdbcType=VARCHAR},'%')
21
           AND announcement_title like concat('%',#{record.announcementTitle,jdbcType=VARCHAR},'%')
22
         </if>
22
         </if>
23
-          AND community_id = #{record.orgId,jdbcType=INTEGER}
23
+          AND org_id = #{record.orgId,jdbcType=INTEGER}
24
           ORDER BY sort DESC,create_date desc
24
           ORDER BY sort DESC,create_date desc
25
       </where>
25
       </where>
26
   </select>
26
   </select>
27
   <select id="getById" resultType="com.huiju.estateagents.property.model.TpAnnouncement">
27
   <select id="getById" resultType="com.huiju.estateagents.property.model.TpAnnouncement">
28
     SELECT
28
     SELECT
29
-    id, community_id, announcement_title, announcement_carousel_img, announcement_content,
29
+    id, org_id, announcement_title, announcement_carousel_img, announcement_content,
30
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
30
     sort, view_count, set_up_carousel, status, create_user, create_date, update_user,
31
     update_date
31
     update_date
32
     FROM
32
     FROM
33
     tp_announcement
33
     tp_announcement
34
-    WHERE community_id = #{record.orgId,jdbcType=INTEGER}
34
+    WHERE org_id = #{record.orgId,jdbcType=INTEGER}
35
   </select>
35
   </select>
36
   <update id="updateTpAnnouncement" parameterType="com.huiju.estateagents.property.model.TpAnnouncement" >
36
   <update id="updateTpAnnouncement" parameterType="com.huiju.estateagents.property.model.TpAnnouncement" >
37
     update tp_announcement
37
     update tp_announcement
38
     <set >
38
     <set >
39
       <if test="orgId != null" >
39
       <if test="orgId != null" >
40
-        community_id = #{orgId,jdbcType=INTEGER},
40
+        org_id = #{orgId,jdbcType=INTEGER},
41
       </if>
41
       </if>
42
       <if test="announcementTitle != null" >
42
       <if test="announcementTitle != null" >
43
         announcement_title = #{announcementTitle,jdbcType=VARCHAR},
43
         announcement_title = #{announcementTitle,jdbcType=VARCHAR},

+ 1
- 1
src/main/resources/mapper/property/TpBuildingMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpBuildingMapper" >
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpBuildingMapper" >
4
   <sql id="Base_Column_List" >
4
   <sql id="Base_Column_List" >
5
-    id, community_id, phase, building, unit, `level`, room_no, create_date
5
+    id, org_id, phase, building, unit, `level`, room_no, create_date
6
   </sql>
6
   </sql>
7
   <select id="buildinglist" resultType="com.huiju.estateagents.property.model.TpBuilding">
7
   <select id="buildinglist" resultType="com.huiju.estateagents.property.model.TpBuilding">
8
     select
8
     select

+ 4
- 4
src/main/resources/mapper/property/TpBuildingOwnerInfoMapper.xml Целия файл

31
             <if test="VerifyStatus == null or VerifyStatus == ''" >
31
             <if test="VerifyStatus == null or VerifyStatus == ''" >
32
                 and	(verify_status = 1 or verify_status = 2)
32
                 and	(verify_status = 1 or verify_status = 2)
33
             </if>
33
             </if>
34
-            and community_id=#{CommunityId,jdbcType=INTEGER}
34
+            and org_id=#{orgId,jdbcType=INTEGER}
35
             order by create_date desc
35
             order by create_date desc
36
         </where>
36
         </where>
37
     </select>
37
     </select>
38
 
38
 
39
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
39
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
40
-        insert into tp_building_owner_info(community_id,id_card, phase, building,unit, `level`,
40
+        insert into tp_building_owner_info(org_id,id_card, phase, building,unit, `level`,
41
         room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
41
         room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
42
         VALUES
42
         VALUES
43
         <foreach collection="list" item="item" index="index" separator=",">
43
         <foreach collection="list" item="item" index="index" separator=",">
67
             u.level_name,
67
             u.level_name,
68
             u.room_no_name,
68
             u.room_no_name,
69
             u.id AS userVerifyId,
69
             u.id AS userVerifyId,
70
-            u.community_id AS orgId,
70
+            u.org_id AS orgId,
71
             t.login_name AS ownerTel,
71
             t.login_name AS ownerTel,
72
             t.user_name AS ownerName,
72
             t.user_name AS ownerName,
73
             t.id_card AS idCard,
73
             t.id_card AS idCard,
81
             LEFT JOIN ta_sys_role r ON u.role_id = r.id
81
             LEFT JOIN ta_sys_role r ON u.role_id = r.id
82
         WHERE
82
         WHERE
83
 
83
 
84
-        u.community_id=#{tpBuildingOwnerInfo.orgId,jdbcType=INTEGER}
84
+        u.org_id=#{tpBuildingOwnerInfo.orgId,jdbcType=INTEGER}
85
         <if test="tpBuildingOwnerInfo.phaseId != null and tpBuildingOwnerInfo.phaseId != ''">
85
         <if test="tpBuildingOwnerInfo.phaseId != null and tpBuildingOwnerInfo.phaseId != ''">
86
             and u.phase_id = #{tpBuildingOwnerInfo.phaseId,jdbcType=INTEGER}
86
             and u.phase_id = #{tpBuildingOwnerInfo.phaseId,jdbcType=INTEGER}
87
         </if>
87
         </if>

+ 1
- 1
src/main/resources/mapper/property/TpHotelImgMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpHotelImgMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpHotelImgMapper">
4
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
4
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
-        insert into tp_hotel_img(community_id,hotel_id,img_url,img_type,create_date)
5
+        insert into tp_hotel_img(org_id,hotel_id,img_url,img_type,create_date)
6
         VALUES
6
         VALUES
7
         <foreach collection="list" item="item" index="index" separator=",">
7
         <foreach collection="list" item="item" index="index" separator=",">
8
             (#{item.orgId},#{item.hotelId},#{item.imgUrl},#{item.imgType},#{item.createDate})
8
             (#{item.orgId},#{item.hotelId},#{item.imgUrl},#{item.imgType},#{item.createDate})

+ 1
- 1
src/main/resources/mapper/property/TpRentalHouseImgMapper.xml Целия файл

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpRentalHouseImgMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpRentalHouseImgMapper">
4
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
4
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
-        insert into tp_rental_house_img(community_id,rental_house_id,img_url,img_type,create_date)
5
+        insert into tp_rental_house_img(org_id,rental_house_id,img_url,img_type,create_date)
6
         VALUES
6
         VALUES
7
         <foreach collection="list" item="item" index="index" separator=",">
7
         <foreach collection="list" item="item" index="index" separator=",">
8
             (#{item.orgId},#{item.rentalHouseId},#{item.imgUrl},#{item.imgType},#{item.createDate})
8
             (#{item.orgId},#{item.rentalHouseId},#{item.imgUrl},#{item.imgType},#{item.createDate})

+ 1
- 1
src/main/resources/mapper/property/TpRentalHouseMapper.xml Целия файл

17
             tp_rental_house t
17
             tp_rental_house t
18
         LEFT JOIN tp_user u ON t.update_user = u.id
18
         LEFT JOIN tp_user u ON t.update_user = u.id
19
         where 1=1
19
         where 1=1
20
-        and t.community_id = #{tpRentalHouse.orgId}
20
+        and t.org_id = #{tpRentalHouse.orgId}
21
         <if test="tpRentalHouse.id != null and tpRentalHouse.id != ''">
21
         <if test="tpRentalHouse.id != null and tpRentalHouse.id != ''">
22
             and t.id like concat('%',#{tpRentalHouse.id},'%')
22
             and t.id like concat('%',#{tpRentalHouse.id},'%')
23
         </if>
23
         </if>

+ 1
- 1
src/main/resources/mapper/property/TpShopImgMapper.xml Целия файл

3
 <mapper namespace="com.huiju.estateagents.property.dao.TpShopImgMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpShopImgMapper">
4
 
4
 
5
     <insert id="batchSave" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
     <insert id="batchSave" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
-        insert into tp_shop_img(community_id,shop_id,img_url,img_type,create_date)
6
+        insert into tp_shop_img(org_id,shop_id,img_url,img_type,create_date)
7
         VALUES
7
         VALUES
8
         <foreach collection="list" item="item" index="index" separator=",">
8
         <foreach collection="list" item="item" index="index" separator=",">
9
             (#{item.orgId},#{item.shopId},#{item.imgUrl},#{item.imgType},#{item.createDate})
9
             (#{item.orgId},#{item.shopId},#{item.imgUrl},#{item.imgType},#{item.createDate})

+ 1
- 1
src/main/resources/mapper/property/TpShopMapper.xml Целия файл

20
             LEFT JOIN  tp_shop_type s on t.shop_type_id = s.id
20
             LEFT JOIN  tp_shop_type s on t.shop_type_id = s.id
21
             LEFT JOIN tp_user u on t.update_user = u.id
21
             LEFT JOIN tp_user u on t.update_user = u.id
22
         where 1=1
22
         where 1=1
23
-        and t.community_id = #{tpShop.orgId}
23
+        and t.org_id = #{tpShop.orgId}
24
         <if test="tpShop.id != null and tpShop.id != ''">
24
         <if test="tpShop.id != null and tpShop.id != ''">
25
             and t.id like concat('%',#{tpShop.id},'%')
25
             and t.id like concat('%',#{tpShop.id},'%')
26
         </if>
26
         </if>

+ 1
- 1
src/main/resources/mapper/property/TpShopTypeMapper.xml Целия файл

3
 <mapper namespace="com.huiju.estateagents.property.dao.TpShopTypeMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpShopTypeMapper">
4
 
4
 
5
     <insert id="insertBatchIds" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
5
     <insert id="insertBatchIds" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
-        insert into tp_shop_type(community_id,type_name,sort,source,create_date,create_user)
6
+        insert into tp_shop_type(org_id,type_name,sort,source,create_date,create_user)
7
         VALUES
7
         VALUES
8
         <foreach collection="list" item="item" index="index" separator=",">
8
         <foreach collection="list" item="item" index="index" separator=",">
9
             (#{item.orgId},#{item.typeName},#{item.sort},#{item.source},#{item.createDate},#{item.createUser})
9
             (#{item.orgId},#{item.typeName},#{item.sort},#{item.source},#{item.createDate},#{item.createUser})

+ 1
- 1
src/main/resources/mapper/property/TpSysRoleMapper.xml Целия файл

15
     id
15
     id
16
     FROM
16
     FROM
17
     tp_sys_role
17
     tp_sys_role
18
-    WHERE community_id=#{orgId,jdbcType=INTEGER}
18
+    WHERE org_id=#{orgId,jdbcType=INTEGER}
19
     </select>
19
     </select>
20
 </mapper>
20
 </mapper>

+ 3
- 3
src/main/resources/mapper/property/TpTicketMapper.xml Целия файл

4
     <select id="ticketList" resultType="com.huiju.estateagents.property.model.TpTicket">
4
     <select id="ticketList" resultType="com.huiju.estateagents.property.model.TpTicket">
5
     SELECT
5
     SELECT
6
     p.id,
6
     p.id,
7
-    p.community_id,
7
+    p.org_id,
8
     p.ta_user_id,
8
     p.ta_user_id,
9
     p.ticket_title,
9
     p.ticket_title,
10
     p.ticket_content,
10
     p.ticket_content,
42
     <if test="updateUserNmae != null and updateUserNmae !=''">
42
     <if test="updateUserNmae != null and updateUserNmae !=''">
43
         and u.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
43
         and u.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
44
     </if>
44
     </if>
45
-    and p.community_id=#{orgId,jdbcType=INTEGER}
45
+    and p.org_id=#{orgId,jdbcType=INTEGER}
46
 </where>
46
 </where>
47
         order by  create_date desc
47
         order by  create_date desc
48
     </select>
48
     </select>
50
     <select id="ticketDetails" resultType="com.huiju.estateagents.property.vo.TpTicketVO">
50
     <select id="ticketDetails" resultType="com.huiju.estateagents.property.vo.TpTicketVO">
51
         SELECT
51
         SELECT
52
         p.id,
52
         p.id,
53
-        p.community_id,
53
+        p.org_id,
54
         p.ta_user_id,
54
         p.ta_user_id,
55
         p.ticket_title,
55
         p.ticket_title,
56
         p.ticket_content,
56
         p.ticket_content,

+ 2
- 2
src/main/resources/mapper/property/TpTicketRecordMapper.xml Целия файл

3
 <mapper namespace="com.huiju.estateagents.property.dao.TpTicketRecordMapper">
3
 <mapper namespace="com.huiju.estateagents.property.dao.TpTicketRecordMapper">
4
 <select id="selectTpTicketRecord" resultType="com.huiju.estateagents.property.model.TpTicketRecord">
4
 <select id="selectTpTicketRecord" resultType="com.huiju.estateagents.property.model.TpTicketRecord">
5
     SELECT
5
     SELECT
6
-    id, community_id, ticket_id, content, status, create_user, create_date
6
+    id, org_id, ticket_id, content, status, create_user, create_date
7
     FROM tp_ticket_record
7
     FROM tp_ticket_record
8
     WHERE ticket_id = #{ticketId,jdbcType=INTEGER}
8
     WHERE ticket_id = #{ticketId,jdbcType=INTEGER}
9
           and status = #{status,jdbcType=INTEGER}
9
           and status = #{status,jdbcType=INTEGER}
12
         update tp_ticket_record
12
         update tp_ticket_record
13
         <set >
13
         <set >
14
             <if test="orgId != null" >
14
             <if test="orgId != null" >
15
-                community_id = #{orgId,jdbcType=INTEGER},
15
+                org_id = #{orgId,jdbcType=INTEGER},
16
             </if>
16
             </if>
17
             <if test="ticketId != null" >
17
             <if test="ticketId != null" >
18
                 ticket_id = #{ticketId,jdbcType=INTEGER},
18
                 ticket_id = #{ticketId,jdbcType=INTEGER},

+ 2
- 2
src/main/resources/mapper/property/TpTransactionMapper.xml Целия файл

4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.TpTransaction">
4
     <select id="selectListByParams" resultType="com.huiju.estateagents.property.model.TpTransaction">
5
         SELECT
5
         SELECT
6
         t.id,
6
         t.id,
7
-        t.community_id AS orgId,
7
+        t.org_id AS orgId,
8
         t.transaction_title AS transactionTitle,
8
         t.transaction_title AS transactionTitle,
9
         t.view_count AS viewCount,
9
         t.view_count AS viewCount,
10
         t.`status`,
10
         t.`status`,
20
         LEFT JOIN tp_transaction_like li ON t.id = li.transaction_id
20
         LEFT JOIN tp_transaction_like li ON t.id = li.transaction_id
21
         AND li.like_status = 1
21
         AND li.like_status = 1
22
         LEFT JOIN tp_transaction_reply re ON t.id = re.transaction_id
22
         LEFT JOIN tp_transaction_reply re ON t.id = re.transaction_id
23
-        WHERE t.community_id =#{orgId}
23
+        WHERE t.org_id =#{orgId}
24
         <if test="id != null and id != '' or id ==0">
24
         <if test="id != null and id != '' or id ==0">
25
             and t.id like concat('%',#{id},'%')
25
             and t.id like concat('%',#{id},'%')
26
         </if>
26
         </if>

+ 1
- 1
src/main/resources/mapper/property/TransactionReplyMapper.xml Целия файл

4
     <select id="transactionReplyList" resultType="com.huiju.estateagents.property.model.TransactionReply">
4
     <select id="transactionReplyList" resultType="com.huiju.estateagents.property.model.TransactionReply">
5
     SELECT
5
     SELECT
6
         re.id,
6
         re.id,
7
-        re.community_id,
7
+        re.org_id,
8
         re.transaction_id,
8
         re.transaction_id,
9
         re.uuid_name,
9
         re.uuid_name,
10
         re.reply_content,
10
         re.reply_content,

+ 4
- 4
src/main/resources/mapper/property/UserMapper.xml Целия файл

28
             <if test="userName != null and userName !=''" >
28
             <if test="userName != null and userName !=''" >
29
                 and tu.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%')
29
                 and tu.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%')
30
             </if>
30
             </if>
31
-            and  tu.community_id=#{orgId,jdbcType=INTEGER}
31
+            and  tu.org_id=#{orgId,jdbcType=INTEGER}
32
         </where>
32
         </where>
33
         order by  tu.create_date desc
33
         order by  tu.create_date desc
34
     </select>
34
     </select>
111
             r.parent_id
111
             r.parent_id
112
         FROM
112
         FROM
113
             tp_sys_user_role t
113
             tp_sys_user_role t
114
-            LEFT JOIN tp_sys_role_menu m ON t.role_id = m.role_id AND m.community_id = #{orgId}
114
+            LEFT JOIN tp_sys_role_menu m ON t.role_id = m.role_id AND m.org_id = #{orgId}
115
             LEFT JOIN tp_sys_menu r on m.menu_id = r.id and r.status = 0
115
             LEFT JOIN tp_sys_menu r on m.menu_id = r.id and r.status = 0
116
         WHERE
116
         WHERE
117
             t.user_id = #{userId}
117
             t.user_id = #{userId}
118
-            AND t.community_id = #{orgId}
118
+            AND t.org_id = #{orgId}
119
         GROUP BY r.id
119
         GROUP BY r.id
120
     </select>
120
     </select>
121
 
121
 
140
         tu.id
140
         tu.id
141
         FROM
141
         FROM
142
          tp_user tu
142
          tp_user tu
143
-        WHERE   tu.community_id=#{orgId,jdbcType=INTEGER}
143
+        WHERE   tu.org_id=#{orgId,jdbcType=INTEGER}
144
         and tu.id!=#{id,jdbcType=INTEGER}
144
         and tu.id!=#{id,jdbcType=INTEGER}
145
     </select>
145
     </select>
146
 </mapper>
146
 </mapper>