Browse Source

修改组装数据逻辑

xueyiming 5 months ago
parent
commit
27e344bc4f
1 changed files with 4 additions and 3 deletions
  1. 4 3
      we-com-server/src/main/resources/mapper/StaffWithUserMapper.xml

+ 4 - 3
we-com-server/src/main/resources/mapper/StaffWithUserMapper.xml

@@ -266,11 +266,12 @@
     </foreach>
   </insert>
 
-  <select id="selectExternalUserIdByStaffId" parameterType="java.lang.Long" resultMap="java.lang.String">
-    select external_user_id
+  <select id="selectExternalUserIdByStaffId" parameterType="java.lang.Long" resultType="java.lang.String">
+    select t2.external_user_id
     from we_com_staff_with_user t1
     left join we_com_user t2
     on t1.user_id = t2.id
-    where t2.staff_id = #{staffId,jdbcType=BIGINT}
+    where t1.staff_id = #{staffId,jdbcType=BIGINT}
+    and t2.external_user_id is not null
   </select>
 </mapper>