Commit e90d316c by 田超

Merge branch 'fixbug/1027961' into 'master'

bug: [1027961] 小睿书判断

See merge request rays/pcloud-book!1197
parents 331f1777 0c0fc52f
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</delete> </delete>
<select id="getUserLastGroupBookRe" parameterType="long" resultType="com.pcloud.book.applet.dto.UserLastBookReDTO"> <select id="getUserLastGroupBookRe" parameterType="long" resultType="com.pcloud.book.applet.dto.UserLastBookReDTO">
SELECT SELECT
t.book_id bookId, t.book_id bookId,
t.adviser_id adviserId, t.adviser_id adviserId,
t.channel_id channelId, t.channel_id channelId,
...@@ -141,15 +141,23 @@ ...@@ -141,15 +141,23 @@
1 bookGroup 1 bookGroup
FROM FROM
applet_user_bookcase t applet_user_bookcase t
INNER JOIN book_group t1 ON t.book_id = t1.book_id INNER JOIN book_adviser a ON t.book_id = a.BOOK_ID
AND t1.join_group_type = 4 AND t.channel_id = a.CHANNEL_ID
AND t.adviser_id = a.ADVISER_ID
AND a.IS_DELETE = 0
LEFT JOIN book_group t1 ON t.book_id = t1.book_id
AND t1.is_delete = 0 AND t1.is_delete = 0
WHERE WHERE
t.channel_id >= 1 t.channel_id >= 1
AND t.adviser_id >= 1 AND t.adviser_id >= 1
AND t.wechat_user_id = #{wechatUserId} AND t.wechat_user_id = #{wechatUserId}
AND (
a.is_open_robot_process = 1
OR t1.join_group_type = 4
)
ORDER BY ORDER BY
t.create_time DESC, t1.id desc t.create_time DESC,
t1.id DESC
LIMIT 1 LIMIT 1
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment