傅行帆 4 年前
父节点
当前提交
88c2e2ed19

+ 5
- 9
src/main/resources/mapper/property/TaUserVerifyMapper.xml 查看文件

10
 
10
 
11
     <select id="selectAllByPhoneAndUserNameAndIdCard" resultType="com.huiju.estateagents.property.model.TaUserVerify" >
11
     <select id="selectAllByPhoneAndUserNameAndIdCard" resultType="com.huiju.estateagents.property.model.TaUserVerify" >
12
         select
12
         select
13
-            tav.*,
14
-            tu.user_name as userName,
15
-            tu.login_name as phone,
16
-            tu.id_card as idCard,
17
-            tu.gender as gender
13
+            tav.*
18
         from
14
         from
19
-          ta_user_verify tav LEFT JOIN ta_user tu on tav.user_id = tu.id
15
+          ta_user_verify tav
20
         <where>
16
         <where>
21
             <trim suffixOverrides="and | or">
17
             <trim suffixOverrides="and | or">
22
                 tav.verify_status = 0
18
                 tav.verify_status = 0
23
                 <if test="phone != null and phone != ''">
19
                 <if test="phone != null and phone != ''">
24
-                    and tu.login_name like CONCAT('%',#{phone},'%')
20
+                    and tav.phone like CONCAT('%',#{phone},'%')
25
                 </if>
21
                 </if>
26
                 <if test="userName != null and userName != ''">
22
                 <if test="userName != null and userName != ''">
27
-                    and tu.user_name like CONCAT('%',#{userName},'%')
23
+                    and tav.owner_name like CONCAT('%',#{userName},'%')
28
                 </if>
24
                 </if>
29
                 <if test="idCard != null and idCard != ''">
25
                 <if test="idCard != null and idCard != ''">
30
-                    and tu.id_card like CONCAT('%',#{idCard},'%')
26
+                    and tav.id_card like CONCAT('%',#{idCard},'%')
31
                 </if>
27
                 </if>
32
                 <if test="orgId != null and orgId != ''">
28
                 <if test="orgId != null and orgId != ''">
33
                     and tav.org_id = #{orgId,jdbcType=INTEGER}
29
                     and tav.org_id = #{orgId,jdbcType=INTEGER}

+ 6
- 9
src/main/resources/mapper/property/TpBuildingOwnerInfoMapper.xml 查看文件

68
             u.room_no_name,
68
             u.room_no_name,
69
             u.id AS userVerifyId,
69
             u.id AS userVerifyId,
70
             u.org_id AS orgId,
70
             u.org_id AS orgId,
71
-            t.login_name AS ownerTel,
72
-            t.user_name AS ownerName,
73
-            t.id_card AS idCard,
74
-            r.description AS roleName,
71
+            u.phone AS ownerTel,
72
+            u.owner_name AS ownerName,
73
+            u.id_card AS idCard,
75
             u.verify_status AS verifyStatus,
74
             u.verify_status AS verifyStatus,
76
             u.verify_name AS updateName,
75
             u.verify_name AS updateName,
77
             u.create_date AS createDate
76
             u.create_date AS createDate
78
         FROM
77
         FROM
79
             ta_user_verify u
78
             ta_user_verify u
80
-            LEFT JOIN ta_user t ON t.id = u.user_id
81
-            LEFT JOIN ta_sys_role r ON u.role_id = r.id
82
         WHERE
79
         WHERE
83
 
80
 
84
         u.org_id=#{tpBuildingOwnerInfo.orgId,jdbcType=INTEGER}
81
         u.org_id=#{tpBuildingOwnerInfo.orgId,jdbcType=INTEGER}
98
             and u.room_no_id = #{tpBuildingOwnerInfo.roomNoId,jdbcType=INTEGER}
95
             and u.room_no_id = #{tpBuildingOwnerInfo.roomNoId,jdbcType=INTEGER}
99
         </if>
96
         </if>
100
         <if test="tpBuildingOwnerInfo.ownerName != null and tpBuildingOwnerInfo.ownerName != ''">
97
         <if test="tpBuildingOwnerInfo.ownerName != null and tpBuildingOwnerInfo.ownerName != ''">
101
-            and t.user_name like concat('%',#{tpBuildingOwnerInfo.ownerName,jdbcType=VARCHAR},'%')
98
+            and u.owner_name like concat('%',#{tpBuildingOwnerInfo.ownerName,jdbcType=VARCHAR},'%')
102
         </if>
99
         </if>
103
         <if test="tpBuildingOwnerInfo.ownerTel != null and tpBuildingOwnerInfo.ownerTel != ''">
100
         <if test="tpBuildingOwnerInfo.ownerTel != null and tpBuildingOwnerInfo.ownerTel != ''">
104
-            and t.login_name like concat('%',#{tpBuildingOwnerInfo.ownerTel,jdbcType=VARCHAR},'%')
101
+            and u.phone like concat('%',#{tpBuildingOwnerInfo.ownerTel,jdbcType=VARCHAR},'%')
105
         </if>
102
         </if>
106
         <if test="tpBuildingOwnerInfo.idCard != null and tpBuildingOwnerInfo.idCard != ''">
103
         <if test="tpBuildingOwnerInfo.idCard != null and tpBuildingOwnerInfo.idCard != ''">
107
-            and t.id_card like concat('%',#{tpBuildingOwnerInfo.idCard,jdbcType=VARCHAR},'%')
104
+            and u.id_card like concat('%',#{tpBuildingOwnerInfo.idCard,jdbcType=VARCHAR},'%')
108
         </if>
105
         </if>
109
         order by u.create_date desc
106
         order by u.create_date desc
110
     </select>
107
     </select>