hanfucheng 1 vuosi sitten
vanhempi
commit
bcee32dddc

+ 8 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/mapper/JnbNameAuthenticationMapper.java

@@ -60,6 +60,14 @@ public interface JnbNameAuthenticationMapper {
      */
     public int deleteJnbNameAuthenticationById(String id);
 
+    /*
+    * 更新用户信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 14:19
+    */
+    public int updateWxUser(JnbNameAuthentication jnbNameAuthentication);
+
     /**
      * 批量删除实名认证
      *

+ 3 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/service/impl/JnbNameAuthenticationServiceImpl.java

@@ -131,6 +131,9 @@ public class JnbNameAuthenticationServiceImpl implements IJnbNameAuthenticationS
         announcement.setAnnouncementTitle(type+":[实名认证]");
         announcement.setAnnouncementBody("您在"+data+"发起的[实名认证]信息已["+type+"]");
         announcementService.insertAnnouncement(announcement);
+        if (jnbNameAuthentication.getStatus().equals("1")){
+            jnbNameAuthenticationMapper.updateWxUser(jnbNameAuthentication);
+        }
         return jnbNameAuthenticationMapper.updateJnbNameAuthentication(jnbNameAuthentication);
     }
 }

+ 13 - 3
sooka-jnb/src/main/resources/mapper/my/JnbNameAuthenticationMapper.xml

@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     
     <select id="selectJnbNameAuthenticationById" parameterType="String" resultMap="JnbNameAuthenticationResult">
-        select a.id, a.name, a.phone, a.id_card, a.status,GROUP_CONCAT(b.path) path,a.create_time
+        select a.id, a.name, a.phone, a.id_card, a.status,GROUP_CONCAT(b.path) path,a.create_time,a.create_by
         from jnb_name_authentication a
 		left join jnb_authentication_img b on a.id = b.authentication_id
         where a.id = #{id}
@@ -102,11 +102,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         delete from jnb_name_authentication where id = #{id}
     </delete>
 
-    <delete id="deleteJnbNameAuthenticationByIds" parameterType="String">
+    <update id="deleteJnbNameAuthenticationByIds" parameterType="String">
         update jnb_name_authentication set del_flag = 2
         where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
-    </delete>
+    </update>
+
+    <update id="updateWxUser" parameterType="JnbNameAuthentication">
+        update jnb_wx_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="phone != null and phone != ''">phone = #{phone},</if>
+            <if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
+        </trim>
+        where id = #{createBy}
+    </update>
 </mapper>