Commit 0c0fc52f by 朱亚洁

bug:[1027961]小睿书判断

parent 331f1777
......@@ -133,7 +133,7 @@
</delete>
<select id="getUserLastGroupBookRe" parameterType="long" resultType="com.pcloud.book.applet.dto.UserLastBookReDTO">
SELECT
SELECT
t.book_id bookId,
t.adviser_id adviserId,
t.channel_id channelId,
......@@ -141,15 +141,23 @@
1 bookGroup
FROM
applet_user_bookcase t
INNER JOIN book_group t1 ON t.book_id = t1.book_id
AND t1.join_group_type = 4
INNER JOIN book_adviser a ON t.book_id = a.BOOK_ID
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
WHERE
t.channel_id >= 1
AND t.adviser_id >= 1
AND t.wechat_user_id = #{wechatUserId}
AND (
a.is_open_robot_process = 1
OR t1.join_group_type = 4
)
ORDER BY
t.create_time DESC, t1.id desc
t.create_time DESC,
t1.id DESC
LIMIT 1
</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