Skip to content

Commit aaaa5db

Browse files
committed
update annotation
1 parent 00c8d97 commit aaaa5db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

book-mapper/src/main/resources/mapper/VlogMapperCustom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
v.id = mlv.vlog_id
8888
LEFT JOIN
8989
users u
90+
<!--join之后一定要on,on关联的是外键,如果外键不进行关联,那么就会变成普通的查多个表数据,关联查询就会变成笛卡尔积,join。。on确定的是关联关系,where才是查询条件-->
9091
ON
9192
mlv.user_id = u.id
9293
WHERE
@@ -132,6 +133,7 @@
132133
</select>
133134
<!--
134135
思考查询朋友视频和关注视频SQL能不能合并,如果可以的话那么业务方法都可以合并
136+
完全可以合并,原因成为是朋友的前提是已经关注对方,所以可以调一个Api
135137
-->
136138

137139
<select id="getMyFriendVlogList" parameterType="map" resultType="com.imooc.vo.IndexVlogVO">

0 commit comments

Comments
 (0)