update m2pool 客服聊天室列表页面不再展示不存在聊天信息的聊天室
This commit is contained in:
@@ -17,6 +17,7 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -47,6 +48,7 @@ public class ChatTask {
|
|||||||
|
|
||||||
// @Scheduled(cron = "0 0/1 * * * ?")
|
// @Scheduled(cron = "0 0/1 * * * ?")
|
||||||
@Scheduled(cron = "0 15 1 * * ?")
|
@Scheduled(cron = "0 15 1 * * ?")
|
||||||
|
@Transactional
|
||||||
public void chatMessageDataSeparatedForHotAndCold(){
|
public void chatMessageDataSeparatedForHotAndCold(){
|
||||||
if(!enable){
|
if(!enable){
|
||||||
System.out.println("ChatTask 定时任务已关闭,请在nacos修改配置");
|
System.out.println("ChatTask 定时任务已关闭,请在nacos修改配置");
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
select room_id from chat_message where send_email = #{userEmail} group by room_id
|
select room_id from chat_message where send_email = #{userEmail} group by room_id
|
||||||
UNION
|
UNION
|
||||||
select room_id from chat_message_history where send_email = #{userEmail} group by room_id
|
select room_id from chat_message_history where send_email = #{userEmail} group by room_id
|
||||||
UNION
|
-- 不再展示不存在聊天信息的聊天室
|
||||||
select id as room_id from chat_room where user_two_email = #{userEmail}
|
-- UNION
|
||||||
|
-- select id as room_id from chat_room where user_two_email = #{userEmail}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user