igl 1 жил өмнө
parent
commit
32d92f9cea

+ 11 - 11
vehicle-server/src/main/resources/mapper/UserInviteMapper.xml

@@ -11,9 +11,9 @@
         FROM
             user_invite i
                 LEFT JOIN currency_record r ON i.user_id = r.user_id
-                AND i.target_id = r.source_user_id
-                AND r.type = 0
-                AND i.type = r.source_type
+                AND i.target_id = r.source_id
+                AND r.source_type = 0
+                AND i.type = r.type
         WHERE
             i.user_id = #{userId}
             <if test="type != null">
@@ -33,9 +33,9 @@
         FROM
         user_invite i
         LEFT JOIN currency_record r ON i.user_id = r.user_id
-        AND i.target_id = r.source_user_id
-        AND r.type = 0
-        AND i.type = r.source_type
+        AND i.target_id = r.source_id
+        AND r.source_type = 0
+        AND i.type = r.type
         WHERE
         i.user_id = #{userId}
         <if test="type != null">
@@ -56,8 +56,8 @@
         user_invite i
         LEFT JOIN currency_record r ON i.user_id = r.user_id
         AND i.target_id = r.source_id
-        AND r.type = 0
-        AND i.type = r.source_type
+        AND r.source_type = 0
+        AND i.type = r.type
         WHERE 1=1
         <if test="type != null">
             and i.type = #{type}
@@ -79,8 +79,8 @@
         user_invite i
         LEFT JOIN currency_record r ON i.user_id = r.user_id
         AND i.target_id = r.source_user_id
-        AND r.type = 0
-        AND i.type = r.source_type
+        AND r.source_type = 0
+        AND i.type = r.type
         WHERE
         1=1
         <if test="type != null">
@@ -88,4 +88,4 @@
         </if>
     </select>
 
-</mapper>
+</mapper>