|
@@ -60,53 +60,52 @@
|
60
|
60
|
|
61
|
61
|
<select id="selectListByParams" resultType="com.community.huiju.model.TpBuildingOwnerInfo">
|
62
|
62
|
SELECT
|
63
|
|
- t.id,
|
64
|
|
- t.phase_name,
|
65
|
|
- t.building_name,
|
66
|
|
- t.unit_name,
|
67
|
|
- t.level_name,
|
68
|
|
- t.room_no_name,
|
69
|
|
- u.id as userVerifyId,
|
70
|
|
- t.community_id as communityId,
|
71
|
|
- t.owner_tel as ownerTel,
|
72
|
|
- t.owner_name as ownerName,
|
73
|
|
- t.id_card as idCard,
|
74
|
|
- r.description as roleName,
|
75
|
|
- u.verify_status as verifyStatus,
|
76
|
|
- m.user_name AS updateName,
|
77
|
|
- t.create_date as createDate
|
|
63
|
+ u.id,
|
|
64
|
+ u.phase_name,
|
|
65
|
+ u.building_name,
|
|
66
|
+ u.unit_name,
|
|
67
|
+ u.level_name,
|
|
68
|
+ u.room_no_name,
|
|
69
|
+ u.id AS userVerifyId,
|
|
70
|
+ u.community_id AS communityId,
|
|
71
|
+ t.login_name AS ownerTel,
|
|
72
|
+ t.user_name AS ownerName,
|
|
73
|
+ t.id_card AS idCard,
|
|
74
|
+ r.description AS roleName,
|
|
75
|
+ u.verify_status AS verifyStatus,
|
|
76
|
+ u.verify_name AS updateName,
|
|
77
|
+ u.create_date AS createDate
|
78
|
78
|
FROM
|
79
|
|
- tp_building_owner_info t
|
80
|
|
- INNER JOIN ta_user_verify u ON t.ta_user_verify_id = u.id
|
|
79
|
+ ta_user_verify u
|
|
80
|
+ LEFT JOIN ta_user t ON t.id = u.user_id
|
81
|
81
|
LEFT JOIN ta_sys_role r ON u.role_id = r.id
|
82
|
|
- LEFT JOIN tp_user m ON t.create_user = m.id
|
83
|
82
|
WHERE
|
84
|
83
|
|
85
|
|
- t.community_id=#{tpBuildingOwnerInfo.communityId,jdbcType=INTEGER}
|
|
84
|
+ u.community_id=#{tpBuildingOwnerInfo.communityId,jdbcType=INTEGER}
|
86
|
85
|
<if test="tpBuildingOwnerInfo.phaseId != null and tpBuildingOwnerInfo.phaseId != ''">
|
87
|
|
- and t.phase_id = #{tpBuildingOwnerInfo.phaseId,jdbcType=INTEGER}
|
|
86
|
+ and u.phase_id = #{tpBuildingOwnerInfo.phaseId,jdbcType=INTEGER}
|
88
|
87
|
</if>
|
89
|
88
|
<if test="tpBuildingOwnerInfo.buildingId != null and tpBuildingOwnerInfo.buildingId != ''">
|
90
|
|
- and t.building_id = #{tpBuildingOwnerInfo.buildingId,jdbcType=INTEGER}
|
|
89
|
+ and u.building_id = #{tpBuildingOwnerInfo.buildingId,jdbcType=INTEGER}
|
91
|
90
|
</if>
|
92
|
91
|
<if test="tpBuildingOwnerInfo.unitId != null and tpBuildingOwnerInfo.unitId != ''">
|
93
|
|
- and t.unit_id = #{tpBuildingOwnerInfo.unitId,jdbcType=INTEGER}
|
|
92
|
+ and u.unit_id = #{tpBuildingOwnerInfo.unitId,jdbcType=INTEGER}
|
94
|
93
|
</if>
|
95
|
94
|
<if test="tpBuildingOwnerInfo.levelId != null and tpBuildingOwnerInfo.levelId != ''">
|
96
|
|
- and t.level_id = #{tpBuildingOwnerInfo.levelId,jdbcType=INTEGER}
|
|
95
|
+ and u.level_id = #{tpBuildingOwnerInfo.levelId,jdbcType=INTEGER}
|
97
|
96
|
</if>
|
98
|
97
|
<if test="tpBuildingOwnerInfo.roomNoId != null and tpBuildingOwnerInfo.roomNoId != ''">
|
99
|
|
- and t.room_no_id = #{tpBuildingOwnerInfo.roomNoId,jdbcType=INTEGER}
|
|
98
|
+ and u.room_no_id = #{tpBuildingOwnerInfo.roomNoId,jdbcType=INTEGER}
|
100
|
99
|
</if>
|
101
|
100
|
<if test="tpBuildingOwnerInfo.ownerName != null and tpBuildingOwnerInfo.ownerName != ''">
|
102
|
|
- and t.owner_name like concat('%',#{tpBuildingOwnerInfo.ownerName,jdbcType=VARCHAR},'%')
|
|
101
|
+ and t.user_name like concat('%',#{tpBuildingOwnerInfo.ownerName,jdbcType=VARCHAR},'%')
|
103
|
102
|
</if>
|
104
|
103
|
<if test="tpBuildingOwnerInfo.ownerTel != null and tpBuildingOwnerInfo.ownerTel != ''">
|
105
|
|
- and t.owner_tel like concat('%',#{tpBuildingOwnerInfo.ownerTel,jdbcType=VARCHAR},'%')
|
|
104
|
+ and t.login_name like concat('%',#{tpBuildingOwnerInfo.ownerTel,jdbcType=VARCHAR},'%')
|
106
|
105
|
</if>
|
107
|
106
|
<if test="tpBuildingOwnerInfo.idCard != null and tpBuildingOwnerInfo.idCard != ''">
|
108
|
107
|
and t.id_card like concat('%',#{tpBuildingOwnerInfo.idCard,jdbcType=VARCHAR},'%')
|
109
|
108
|
</if>
|
110
|
|
- order by t.update_date desc
|
|
109
|
+ order by u.create_date desc
|
111
|
110
|
</select>
|
112
|
111
|
</mapper>
|