by su 4 роки тому
батько
коміт
6f4f955d20
1 змінених файлів з 14 додано та 19 видалено
  1. 14 19
      house-biz/src/main/resources/mapper/TmUserMapper.xml

+ 14 - 19
house-biz/src/main/resources/mapper/TmUserMapper.xml

@@ -134,32 +134,27 @@
     <update id="update">
     <update id="update">
         update tm_user
         update tm_user
         <set>
         <set>
-            <if test="wx_open_id !=null and wx_open_id != '' ">
-                wx_open_id = #{wx_open_id},
+            <if test="updateUser.wxOpenId !=null and updateUser.wxOpenId != '' ">
+                wx_open_id = #{updateUser.wxOpenId},
             </if>
             </if>
-            <if test="name !=null and name != '' ">
-                name = #{name},
+            <if test="updateUser.name !=null and updateUser.name != '' ">
+                name = #{updateUser.name},
             </if>
             </if>
-            <if test="phone !=null and phone != '' ">
-                phone = #{phone},
+            <if test="updateUser.phone !=null and updateUser.phone != '' ">
+                phone = #{updateUser.phone},
             </if>
             </if>
-            <if test="email !=null and email != '' ">
-                email = #{email},
+            <if test="updateUser.email !=null and updateUser.email != '' ">
+                email = #{updateUser.email},
             </if>
             </if>
-            <if test="passwd !=null and passwd != '' ">
-                passwd = #{passwd},
+            <if test="updateUser.passwd !=null and updateUser.passwd != '' ">
+                passwd = #{updateUser.passwd},
             </if>
             </if>
-            <if test="avatar !=null and avatar != '' ">
-                avatar = #{avatar},
-            </if>
-            <if test="enable !=null ">
-                enable = #{enable},
-            </if>
-            <if test="last_modify_datetime !=null ">
-                last_modify_datetime = #{last_modify_datetime},
+            <if test="updateUser.avatar !=null and updateUser.avatar != '' ">
+                avatar = #{updateUser.avatar},
             </if>
             </if>
+                last_modify_datetime = now()
         </set>
         </set>
-        where user_id = #{user_id}
+        where user_id = #{updateUser.userId}
     </update>
     </update>
 
 
     <select id="selectTmUserCount" resultType="long">
     <select id="selectTmUserCount" resultType="long">