93e13653ab
Phase 1: apes-commons 内联 - 反推并实现 7 个核心类(Res/AuthContext/Login/LoginUser/LoginCustomer/UserSession/DbEntity) - 新增 LoginAspect AOP 切面(从 Redis 读取会话写入 AuthContext) - 移除外部 JAR 依赖,项目自包含可独立编译 Phase 2: 包名重构 - cn.apes.cloud → cn.apes.authon 全局包名重构 - @MapperScan 路径更新 - 零 cn.apes.cloud 残留 Phase 3: 编译验证 - maven-compiler-plugin 升级至 3.13.0(兼容 Java 24) - Lombok 升级至 1.18.40(兼容 Java 24) - 移除 syncAllTenantsToHuoban(伙伴云同步,非账权核心) - 新增 IpLocationService 接口 + 桩实现 - 124 个源文件编译通过(BUILD SUCCESS)
36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
package cn.apes.authon.mapper;
|
|
|
|
import cn.apes.authon.domain.entity.UserPreference;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
|
/**
|
|
* 用户个性化配置 Mapper接口
|
|
*
|
|
* @author OpenClaw
|
|
* @since 2026-08-06
|
|
*/
|
|
public interface UserPreferenceMapper extends BaseMapper<UserPreference> {
|
|
|
|
/**
|
|
* 更新指定用户的配置(包含已逻辑删除的行,同时恢复 is_del=0)
|
|
*
|
|
* @param userId 用户ID
|
|
* @param uiSize UI尺寸 1-最大 2-中等 3-最小
|
|
* @return int 影响行数,0表示该用户不存在任何记录(含已删除)
|
|
*/
|
|
@Update("update user_preference set ui_size = #{uiSize}, is_del = 0 where user_id = #{userId}")
|
|
int updateIncludeDeleted(@Param("userId") Long userId, @Param("uiSize") Integer uiSize);
|
|
|
|
/**
|
|
* 统计指定用户的记录数(包含已逻辑删除的行)
|
|
*
|
|
* @param userId 用户ID
|
|
* @return int 记录数(含已删除)
|
|
*/
|
|
@Select("select count(1) from user_preference where user_id = #{userId}")
|
|
int countIncludeDeleted(@Param("userId") Long userId);
|
|
}
|