c77352877d
主要更新: 1. 统一所有微服务端口配置(19000-19008) 2. 为所有服务创建本地/测试/生产三套环境配置 3. 配置Nacos认证密码(本地:Peanut2817*#, 测试/生产:EmotionMuseum2025) 4. 优化网关路由配置,支持负载均衡和WebSocket 5. 新增emotion-websocket模块,支持实时聊天 6. 前端集成WebSocket,替代HTTP轮询 7. 添加配置验证和管理工具脚本 技术特性: - 完整的环境隔离和服务发现 - WebSocket实时通信支持 - 负载均衡路由配置 - 跨域和安全配置 - 自动重连和心跳检测
37 lines
1.3 KiB
XML
37 lines
1.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.emotionmuseum.auth.mapper.UserMapper">
|
|
|
|
<!-- 根据账号查询用户 -->
|
|
<select id="selectByAccount" resultType="com.emotionmuseum.auth.entity.User">
|
|
SELECT * FROM user
|
|
WHERE account = #{account} AND is_deleted = 0
|
|
</select>
|
|
|
|
<!-- 根据邮箱查询用户 -->
|
|
<select id="selectByEmail" resultType="com.emotionmuseum.auth.entity.User">
|
|
SELECT * FROM user
|
|
WHERE email = #{email} AND is_deleted = 0
|
|
</select>
|
|
|
|
<!-- 根据手机号查询用户 -->
|
|
<select id="selectByPhone" resultType="com.emotionmuseum.auth.entity.User">
|
|
SELECT * FROM user
|
|
WHERE phone = #{phone} AND is_deleted = 0
|
|
</select>
|
|
|
|
<!-- 根据第三方登录信息查询用户 -->
|
|
<select id="selectByOAuth" resultType="com.emotionmuseum.auth.entity.User">
|
|
SELECT * FROM user
|
|
WHERE oauth_platform = #{platform} AND oauth_id = #{oauthId} AND is_deleted = 0
|
|
</select>
|
|
|
|
<!-- 更新最后活跃时间 -->
|
|
<update id="updateLastActiveTime">
|
|
UPDATE user
|
|
SET last_active_time = NOW(), update_time = NOW()
|
|
WHERE id = #{userId} AND is_deleted = 0
|
|
</update>
|
|
|
|
</mapper>
|