refactor: 优化项目模块命名(简化、分类、统一)

This commit is contained in:
2024-10-30 23:01:54 +08:00
parent 9ecdeb52f6
commit c276e53a8e
346 changed files with 160 additions and 162 deletions

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.DeptDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 部门 Mapper
*
* @author Charles7c
* @since 2023/1/22 17:56
*/
public interface DeptMapper extends BaseMapper<DeptDO> {
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.DictItemDO;
import top.continew.starter.data.mp.base.BaseMapper;
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
import java.util.List;
/**
* 字典项 Mapper
*
* @author Charles7c
* @since 2023/9/11 21:29
*/
public interface DictItemMapper extends BaseMapper<DictItemDO> {
/**
* 根据字典编码查询
*
* @param dictCode 字典编码
* @return 字典项列表
*/
List<LabelValueResp> listByDictCode(@Param("dictCode") String dictCode);
}

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.DictDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 字典 Mapper
*
* @author Charles7c
* @since 2023/9/11 21:29
*/
public interface DictMapper extends BaseMapper<DictDO> {
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.system.model.entity.FileDO;
import top.continew.admin.system.model.resp.FileStatisticsResp;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
/**
* 文件 Mapper
*
* @author Charles7c
* @since 2023/12/23 10:38
*/
public interface FileMapper extends BaseMapper<FileDO> {
/**
* 查询文件资源统计信息
*
* @return 文件资源统计信息
*/
@Select("SELECT type, COUNT(1) number, SUM(size) size FROM sys_file GROUP BY type")
List<FileStatisticsResp> statistics();
}

View File

@@ -0,0 +1,150 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import com.alicp.jetcache.anno.Cached;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.common.constant.CacheConstants;
import top.continew.admin.system.model.entity.LogDO;
import top.continew.admin.system.model.resp.dashboard.DashboardAccessTrendResp;
import top.continew.admin.system.model.resp.dashboard.DashboardChartCommonResp;
import top.continew.admin.system.model.resp.dashboard.DashboardOverviewCommonResp;
import top.continew.admin.system.model.resp.log.LogResp;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.Date;
import java.util.List;
/**
* 系统日志 Mapper
*
* @author Charles7c
* @since 2022/12/22 21:47
*/
public interface LogMapper extends BaseMapper<LogDO> {
/**
* 分页查询列表
*
* @param page 分页条件
* @param queryWrapper 查询条件
* @return 分页列表信息
*/
IPage<LogResp> selectLogPage(@Param("page") IPage<LogDO> page,
@Param(Constants.WRAPPER) QueryWrapper<LogDO> queryWrapper);
/**
* 查询列表
*
* @param queryWrapper 查询条件
* @return 列表信息
*/
List<LogResp> selectLogList(@Param(Constants.WRAPPER) QueryWrapper<LogDO> queryWrapper);
/**
* 查询总数量
*
* @return 总数量
*/
@Select("SELECT COUNT(*) FROM sys_log")
Long selectTotalCount();
/**
* 查询仪表盘 PV 总览
*
* @return 仪表盘 PV 总览
*/
DashboardOverviewCommonResp selectDashboardOverviewPv();
/**
* 查询仪表盘 IP 总览
*
* @return 仪表盘 IP 总览
*/
DashboardOverviewCommonResp selectDashboardOverviewIp();
/**
* 查询仪表盘 PV 近 N 月各月份信息
*
* @param months 近 N 月月份列表
* @return 仪表盘 PV 近 N 月各月份信息
*/
@Cached(key = "#months[0]", name = CacheConstants.DASHBOARD_KEY_PREFIX + "PV:")
List<DashboardChartCommonResp> selectListDashboardAnalysisPv(@Param("months") List<String> months);
/**
* 查询仪表盘 IP 近 N 月各月份信息
*
* @param months 近 N 月月份列表
* @return 仪表盘 IP 近 N 月各月份信息
*/
@Cached(key = "#months[0]", name = CacheConstants.DASHBOARD_KEY_PREFIX + "IP:")
List<DashboardChartCommonResp> selectListDashboardAnalysisIp(@Param("months") List<String> months);
/**
* 查询仪表盘访问趋势信息
*
* @param startTime 开始时间
* @param endTime 结束时间
* @return 仪表盘访问趋势信息
*/
List<DashboardAccessTrendResp> selectListDashboardAccessTrend(@Param("startTime") Date startTime,
@Param("endTime") Date endTime);
/**
* 查询仪表盘访问时段分析信息
*
* @return 仪表盘访问时段分析信息
*/
List<DashboardChartCommonResp> selectListDashboardAnalysisTimeslot();
/**
* 查询仪表盘地域分析信息
*
* @param top 显示数量
* @return 仪表盘地域分析信息
*/
List<DashboardChartCommonResp> selectListDashboardAnalysisGeo(@Param("top") Integer top);
/**
* 查询仪表盘模块分析信息
*
* @param top 显示数量
* @return 仪表盘模块分析信息
*/
List<DashboardChartCommonResp> selectListDashboardAnalysisModule(@Param("top") Integer top);
/**
* 查询仪表盘终端分析信息
*
* @param top 显示数量
* @return 仪表盘终端分析信息
*/
List<DashboardChartCommonResp> selectListDashboardAnalysisOs(@Param("top") Integer top);
/**
* 查询仪表盘浏览器分析信息
*
* @param top 显示数量
* @return 仪表盘浏览器分析信息
*/
List<DashboardChartCommonResp> selectListDashboardAnalysisBrowser(@Param("top") Integer top);
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.MenuDO;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
import java.util.Set;
/**
* 菜单 Mapper
*
* @author Charles7c
* @since 2023/2/15 20:30
*/
public interface MenuMapper extends BaseMapper<MenuDO> {
/**
* 根据用户 ID 查询权限码
*
* @param userId 用户 ID
* @return 权限码集合
*/
Set<String> selectPermissionByUserId(@Param("userId") Long userId);
/**
* 根据角色编码查询
*
* @param roleCode 角色编码
* @return 菜单列表
*/
List<MenuDO> selectListByRoleCode(@Param("roleCode") String roleCode);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.MessageDO;
import top.continew.admin.system.model.resp.MessageResp;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 消息 Mapper
*
* @author Bull-BCLS
* @since 2023/10/15 19:05
*/
public interface MessageMapper extends BaseMapper<MessageDO> {
/**
* 分页查询列表
*
* @param page 分页查询条件
* @param queryWrapper 查询条件
* @return 分页信息
*/
IPage<MessageResp> selectPageByUserId(@Param("page") IPage<Object> page,
@Param(Constants.WRAPPER) QueryWrapper<MessageDO> queryWrapper);
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.MessageUserDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 消息和用户 Mapper
*
* @author Bull-BCLS
* @since 2023/10/15 20:25
*/
public interface MessageUserMapper extends BaseMapper<MessageUserDO> {
/**
* 根据用户 ID 和消息类型查询未读消息数量
*
* @param userId 用户 ID
* @param type 消息类型
* @return 未读消息信息
*/
Long selectUnreadCountByUserIdAndType(@Param("userId") Long userId, @Param("type") Integer type);
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.NoticeDO;
import top.continew.admin.system.model.resp.dashboard.DashboardNoticeResp;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
/**
* 公告 Mapper
*
* @author Charles7c
* @since 2023/8/20 10:55
*/
public interface NoticeMapper extends BaseMapper<NoticeDO> {
/**
* 查询仪表盘公告列表
*
* @return 仪表盘公告列表
*/
List<DashboardNoticeResp> selectDashboardList(@Param("userId") Long userId);
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.system.model.entity.OptionDO;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
/**
* 参数 Mapper
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
public interface OptionMapper extends BaseMapper<OptionDO> {
/**
* 根据类别查询
*
* @param category 类别
* @return 列表
*/
@Select("SELECT code, value, default_value FROM sys_option WHERE category = #{category}")
List<OptionDO> selectByCategory(@Param("category") String category);
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.system.model.entity.RoleDeptDO;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
/**
* 角色和部门 Mapper
*
* @author Charles7c
* @since 2023/2/18 21:57
*/
public interface RoleDeptMapper extends BaseMapper<RoleDeptDO> {
/**
* 根据角色 ID 查询
*
* @param roleId 角色 ID
* @return 部门 ID 列表
*/
@Select("SELECT dept_id FROM sys_role_dept WHERE role_id = #{roleId}")
List<Long> selectDeptIdByRoleId(@Param("roleId") Long roleId);
}

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.RoleDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 角色 Mapper
*
* @author Charles7c
* @since 2023/2/8 23:17
*/
public interface RoleMapper extends BaseMapper<RoleDO> {
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.RoleMenuDO;
import top.continew.starter.data.mp.base.BaseMapper;
import java.util.List;
/**
* 角色和菜单 Mapper
*
* @author Charles7c
* @since 2023/2/15 20:30
*/
public interface RoleMenuMapper extends BaseMapper<RoleMenuDO> {
/**
* 根据角色 ID 列表查询
*
* @param roleIds 角色 ID 列表
* @return 菜单 ID 列表
*/
List<Long> selectMenuIdByRoleIds(List<Long> roleIds);
}

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.StorageDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 存储 Mapper
*
* @author Charles7c
* @since 2023/12/26 22:09
*/
public interface StorageMapper extends BaseMapper<StorageDO> {
}

View File

@@ -0,0 +1,113 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.admin.common.config.mybatis.DataPermissionMapper;
import top.continew.admin.system.model.entity.UserDO;
import top.continew.admin.system.model.resp.user.UserDetailResp;
import top.continew.starter.extension.datapermission.annotation.DataPermission;
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
import java.util.List;
/**
* 用户 Mapper
*
* @author Charles7c
* @since 2022/12/22 21:47
*/
public interface UserMapper extends DataPermissionMapper<UserDO> {
/**
* 分页查询列表
*
* @param page 分页条件
* @param queryWrapper 查询条件
* @return 分页列表信息
*/
@DataPermission(tableAlias = "t1")
IPage<UserDetailResp> selectUserPage(@Param("page") IPage<UserDO> page,
@Param(Constants.WRAPPER) QueryWrapper<UserDO> queryWrapper);
/**
* 查询列表
*
* @param queryWrapper 查询条件
* @return 列表信息
*/
@DataPermission(tableAlias = "t1")
List<UserDetailResp> selectUserList(@Param(Constants.WRAPPER) QueryWrapper<UserDO> queryWrapper);
/**
* 根据用户名查询
*
* @param username 用户名
* @return 用户信息
*/
@Select("SELECT * FROM sys_user WHERE username = #{username}")
UserDO selectByUsername(@Param("username") String username);
/**
* 根据手机号查询
*
* @param phone 手机号
* @return 用户信息
*/
@Select("SELECT * FROM sys_user WHERE phone = #{phone}")
UserDO selectByPhone(@FieldEncrypt @Param("phone") String phone);
/**
* 根据邮箱查询
*
* @param email 邮箱
* @return 用户信息
*/
@Select("SELECT * FROM sys_user WHERE email = #{email}")
UserDO selectByEmail(@FieldEncrypt @Param("email") String email);
/**
* 根据 ID 查询昵称
*
* @param id ID
* @return 昵称
*/
@Select("SELECT nickname FROM sys_user WHERE id = #{id}")
String selectNicknameById(@Param("id") Long id);
/**
* 根据邮箱查询数量
*
* @param email 邮箱
* @param id ID
* @return 用户数量
*/
Long selectCountByEmail(@FieldEncrypt @Param("email") String email, @Param("id") Long id);
/**
* 根据手机号查询数量
*
* @param phone 手机号
* @param id ID
* @return 用户数量
*/
Long selectCountByPhone(@FieldEncrypt @Param("phone") String phone, @Param("id") Long id);
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.starter.data.mp.base.BaseMapper;
import top.continew.admin.system.model.entity.UserPasswordHistoryDO;
/**
* 用户历史密码 Mapper
*
* @author Charles7c
* @since 2024/5/16 21:58
*/
public interface UserPasswordHistoryMapper extends BaseMapper<UserPasswordHistoryDO> {
/**
* 删除过期历史密码
*
* @param userId 用户 ID
* @param count 保留 N 个历史
*/
void deleteExpired(@Param("userId") Long userId, @Param("count") int count);
}

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import top.continew.admin.system.model.entity.UserRoleDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 用户和角色 Mapper
*
* @author Charles7c
* @since 2023/2/13 23:13
*/
public interface UserRoleMapper extends BaseMapper<UserRoleDO> {
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.admin.system.mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.system.model.entity.UserSocialDO;
import top.continew.starter.data.mp.base.BaseMapper;
/**
* 用户社会化关联 Mapper
*
* @author Charles7c
* @since 2023/10/11 22:10
*/
public interface UserSocialMapper extends BaseMapper<UserSocialDO> {
/**
* 根据来源和开放 ID 查询
*
* @param source 来源
* @param openId 开放 ID
* @return 用户社会化关联信息
*/
UserSocialDO selectBySourceAndOpenId(@Param("source") String source, @Param("openId") String openId);
}