feat:修复已知问题,提升系统稳定性
This commit is contained in:
50
remi-sys/remi-sys-infra/pom.xml
Normal file
50
remi-sys/remi-sys-infra/pom.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-sys-infra</artifactId>
|
||||
<name>remi-sys-infra</name>
|
||||
<description>remi-sys-infra</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-comm-jdbc-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-jdbc</artifactId>
|
||||
</dependency>
|
||||
<!--remi-sys-domain-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-domain</artifactId>
|
||||
</dependency>
|
||||
<!--slf4j-->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-nop</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.AccessToken;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 鉴权令牌表(AccessToken)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AccessTokenMapper extends BaseMapper<AccessToken> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.AppGroup;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 应用组织(AppGroup)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppGroupMapper extends BaseMapper<AppGroup> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.App;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 应用表Application(App)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppMapper extends BaseMapper<App> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.AppMenu;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 应用菜单表(AppMenu)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppMenuMapper extends BaseMapper<AppMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.AppPublish;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 应用发布表(AppPublish)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppPublishMapper extends BaseMapper<AppPublish> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Area;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 省市县表(Area)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface AreaMapper extends BaseMapper<Area> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Bucket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 存储桶管理(Bucket)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface BucketMapper extends BaseMapper<Bucket> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.CompanyDept;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 公司部门表(CompanyDept)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface CompanyDeptMapper extends BaseMapper<CompanyDept> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Company;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 公司表(Company)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface CompanyMapper extends BaseMapper<Company> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Config;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 全局配置(Config)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigMapper extends BaseMapper<Config> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.CordRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 组织角色表(CordRole)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface CordRoleMapper extends BaseMapper<CordRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Dept;
|
||||
import ai.remi.sys.domain.tree.DeptTree;
|
||||
import ai.remi.sys.domain.vo.DeptVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 部门表(Dept)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeptMapper extends BaseMapper<Dept> {
|
||||
|
||||
@Select("SELECT " +
|
||||
" d.*, " +
|
||||
" cd.company_id, " +
|
||||
" cd.company_code " +
|
||||
"FROM " +
|
||||
" sys_dept d, " +
|
||||
" sys_company_dept cd " +
|
||||
"WHERE " +
|
||||
" d.dept_code = cd.dept_code " +
|
||||
" AND d.id = cd.dept_id " +
|
||||
" AND cd.dept_id = #{id}")
|
||||
DeptVO selectOneById(String id);
|
||||
|
||||
@Select("<script> " +
|
||||
"select " +
|
||||
" d.*, " +
|
||||
" cd.company_id, " +
|
||||
" cd.company_code " +
|
||||
"from " +
|
||||
" sys_dept d, " +
|
||||
" sys_company_dept cd " +
|
||||
"where " +
|
||||
" d.dept_code = cd.dept_code " +
|
||||
" and d.id = cd.dept_id " +
|
||||
" and cd.company_id = #{id}"+
|
||||
" <if test=\"status != null and status != '' \" >" +
|
||||
" and d.status = #{status} " +
|
||||
" </if>" +
|
||||
" ORDER BY ISNULL( sort ) ASC,sort ASC" +
|
||||
"</script>")
|
||||
List<DeptTree> selectDeptByCompanyId(@Param("id")String id,@Param("status")Integer status);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.DeptUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 部门用户表(DeptUser)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeptUserMapper extends BaseMapper<DeptUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.DictItem;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 字典项表(DictItem)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface DictItemMapper extends BaseMapper<DictItem> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Dict;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 字典主表(Dict)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface DictMapper extends BaseMapper<Dict> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.File;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 文件管理(File)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface FileMapper extends BaseMapper<File> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Grade;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 职系表(Grade)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface GradeMapper extends BaseMapper<Grade> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Group;
|
||||
import ai.remi.sys.domain.tree.GroupTree;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 业务组织(Group)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface GroupMapper extends BaseMapper<Group> {
|
||||
|
||||
@Select("<script> " +
|
||||
"select " +
|
||||
" g.*, " +
|
||||
" ag.app_id, " +
|
||||
" ag.app_code " +
|
||||
"from " +
|
||||
" sys_group g, " +
|
||||
" sys_app_group ag " +
|
||||
"where " +
|
||||
" g.group_code = ag.group_code " +
|
||||
" AND g.id = ag.group_id " +
|
||||
" and ag.app_id = #{id}" +
|
||||
" <if test=\"status != null and status != '' \" >" +
|
||||
" and g.status = #{status} " +
|
||||
" </if>" +
|
||||
" ORDER BY ISNULL( sort ) ASC,sort ASC" +
|
||||
"</script>")
|
||||
List<GroupTree> selectGroupByAppId(@Param("id") String id, @Param("status") Integer status);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.GroupRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 用户组角色表(GroupRole)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface GroupRoleMapper extends BaseMapper<GroupRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.GroupUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 组织用户(GroupUser)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface GroupUserMapper extends BaseMapper<GroupUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.LogRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 日志记录表(LogRecord)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface LogRecordMapper extends BaseMapper<LogRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Menu;
|
||||
import ai.remi.sys.domain.tree.MenuTree;
|
||||
import ai.remi.sys.domain.vo.MenuVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 菜单表(Menu)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface MenuMapper extends BaseMapper<Menu> {
|
||||
|
||||
@Select("SELECT " +
|
||||
" m.*, " +
|
||||
" am.app_id, " +
|
||||
" am.app_code " +
|
||||
"FROM " +
|
||||
" sys_menu m, " +
|
||||
" sys_app_menu am " +
|
||||
"WHERE " +
|
||||
" m.menu_code = am.menu_code " +
|
||||
" AND m.id = am.menu_id " +
|
||||
" AND am.menu_id = #{id}")
|
||||
MenuVO selectOneById(String id);
|
||||
|
||||
@Select("<script> " +
|
||||
"select " +
|
||||
" m.*, " +
|
||||
" am.app_id, " +
|
||||
" am.app_code " +
|
||||
"from " +
|
||||
" sys_menu m, " +
|
||||
" sys_app_menu am " +
|
||||
"where " +
|
||||
" m.menu_code = am.menu_code " +
|
||||
" AND m.id = am.menu_id " +
|
||||
" and am.app_id = #{id}" +
|
||||
" <if test=\"status != null and status != '' \" >" +
|
||||
" and m.status = #{status} " +
|
||||
" </if>" +
|
||||
" ORDER BY ISNULL( sort ) ASC,sort ASC" +
|
||||
"</script>")
|
||||
List<MenuTree> selectMenuByAppId(@Param("id") String id, @Param("status") Integer status);
|
||||
|
||||
@Select("<script> " +
|
||||
"select " +
|
||||
" m.*, " +
|
||||
" am.app_id, " +
|
||||
" am.app_code " +
|
||||
"from " +
|
||||
" sys_menu m, " +
|
||||
" sys_app_menu am " +
|
||||
"where " +
|
||||
" m.menu_code = am.menu_code " +
|
||||
" AND m.id = am.menu_id " +
|
||||
" AND m.id IN" +
|
||||
" <foreach collection='ids' item='id' index='index' open='(' separator=',' close=')'>" +
|
||||
" #{id}" +
|
||||
" </foreach>"+
|
||||
" <if test=\"status != null and status != '' \" >"+
|
||||
" AND m.status = #{status} " +
|
||||
" </if>" +
|
||||
" ORDER BY ISNULL( sort ) ASC,sort ASC" +
|
||||
"</script>")
|
||||
List<MenuTree> selectMenuInIds(@Param("ids") List<String> ids, @Param("status") Integer status);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.OauthCode;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 授权码表(OauthCode)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface OauthCodeMapper extends BaseMapper<OauthCode> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Position;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 职位表(Position)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface PositionMapper extends BaseMapper<Position> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.PostRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 职位角色表(PostRole)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface PostRoleMapper extends BaseMapper<PostRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Rank;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 职级表(Rank)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface RankMapper extends BaseMapper<Rank> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.RefreshToken;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 刷新令牌表(RefreshToken)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface RefreshTokenMapper extends BaseMapper<RefreshToken> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.RestrictIp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 黑白名单表(RestrictIp)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface RestrictIpMapper extends BaseMapper<RestrictIp> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.Role;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 角色表(Role)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoleMapper extends BaseMapper<Role> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.RoleMenu;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 角色菜单表(RoleMenu)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.User;
|
||||
import ai.remi.sys.domain.query.UserQuery;
|
||||
import ai.remi.sys.domain.vo.UserVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 用户表(User)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
|
||||
@Select("SELECT " +
|
||||
" u.*, " +
|
||||
" up.position_id, " +
|
||||
" up.position_code, " +
|
||||
" up.rank_id, " +
|
||||
" up.rank_code, " +
|
||||
" du.dept_id, " +
|
||||
" du.dept_code, " +
|
||||
" cd.company_id, " +
|
||||
" cd.company_code " +
|
||||
"FROM " +
|
||||
" sys_user u, " +
|
||||
" sys_user_post up, " +
|
||||
" sys_dept_user du, " +
|
||||
" sys_company_dept cd " +
|
||||
"WHERE " +
|
||||
" u.id = du.user_id " +
|
||||
" and u.user_code = du.user_code " +
|
||||
" and u.id = up.user_id " +
|
||||
" and u.user_code = up.user_code " +
|
||||
" and du.dept_id = cd.dept_id " +
|
||||
" and du.dept_code = cd.dept_code " +
|
||||
" and u.id = #{id}")
|
||||
UserVO selectOneById(String id);
|
||||
|
||||
@Select("<script>" +
|
||||
"select " +
|
||||
" u.*, " +
|
||||
" du.dept_id, " +
|
||||
" du.dept_code, " +
|
||||
" cd.company_id, " +
|
||||
" cd.company_code " +
|
||||
"from " +
|
||||
" sys_user u, " +
|
||||
" sys_dept_user du, " +
|
||||
" sys_company_dept cd " +
|
||||
"where " +
|
||||
" u.id = du.user_id " +
|
||||
" and u.user_code = du.user_code " +
|
||||
" and du.dept_id = cd.dept_id " +
|
||||
" and du.dept_code = cd.dept_code " +
|
||||
" <if test=\"userQuery.companyId != null and userQuery.companyId != '' \" >" +
|
||||
" and cd.company_id = #{userQuery.companyId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.companyCode != null and userQuery.companyCode != '' \" >" +
|
||||
" and cd.company_code = #{userQuery.companyCode} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptId != null and userQuery.deptId != '' \" >" +
|
||||
" and cd.dept_id = #{userQuery.deptId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptCode != null and userQuery.deptCode != '' \" >" +
|
||||
" and cd.dept_code = #{userQuery.deptCode} " +
|
||||
" </if>" +
|
||||
"</script>")
|
||||
List<UserVO> selectListByUser(@Param("userQuery") UserQuery userQuery);
|
||||
|
||||
@Select("<script>" +
|
||||
"select " +
|
||||
" u.*, " +
|
||||
" up.position_id, " +
|
||||
" up.position_code, " +
|
||||
" up.rank_id, " +
|
||||
" up.rank_code, " +
|
||||
" du.dept_id, " +
|
||||
" du.dept_code, " +
|
||||
" cd.company_id, " +
|
||||
" cd.company_code " +
|
||||
"from " +
|
||||
" sys_user u, " +
|
||||
" sys_user_post up, " +
|
||||
" sys_dept_user du, " +
|
||||
" sys_company_dept cd " +
|
||||
"where " +
|
||||
" u.id = du.user_id " +
|
||||
" and u.user_code = du.user_code " +
|
||||
" and u.id = up.user_id " +
|
||||
" and u.user_code = up.user_code " +
|
||||
" and du.dept_id = cd.dept_id " +
|
||||
" and du.dept_code = cd.dept_code " +
|
||||
" <if test=\"userQuery.companyId != null and userQuery.companyId != '' \" >" +
|
||||
" and cd.company_id = #{userQuery.companyId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.companyCode != null and userQuery.companyCode != '' \" >" +
|
||||
" and cd.company_code = #{userQuery.companyCode} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptId != null and userQuery.deptId != '' \" >" +
|
||||
" and cd.dept_id = #{userQuery.deptId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptCode != null and userQuery.deptCode != '' \" >" +
|
||||
" and cd.dept_code = #{userQuery.deptCode} " +
|
||||
" </if>" +
|
||||
" limit #{pageNum},#{pageSize}" +
|
||||
"</script>")
|
||||
List<UserVO> selectPageByUser(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("userQuery") UserQuery userQuery);
|
||||
|
||||
@Select("<script>" +
|
||||
"select " +
|
||||
" count(u.id) as total " +
|
||||
"from " +
|
||||
" sys_user u, " +
|
||||
" sys_dept_user du, " +
|
||||
" sys_company_dept cd " +
|
||||
"where " +
|
||||
" u.id = du.user_id " +
|
||||
" and u.user_code = du.user_code " +
|
||||
" and du.dept_id = cd.dept_id " +
|
||||
" and du.dept_code = cd.dept_code " +
|
||||
" <if test=\"userQuery.companyId != null and userQuery.companyId != '' \" >" +
|
||||
" and cd.company_id = #{userQuery.companyId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.companyCode != null and userQuery.companyCode != '' \" >" +
|
||||
" and cd.company_code = #{userQuery.companyCode} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptId != null and userQuery.deptId != '' \" >" +
|
||||
" and cd.dept_id = #{userQuery.deptId} " +
|
||||
" </if>" +
|
||||
" <if test=\"userQuery.deptCode != null and userQuery.deptCode != '' \" >" +
|
||||
" and cd.dept_code = #{userQuery.deptCode} " +
|
||||
" </if>" +
|
||||
"</script>")
|
||||
Long selectCountByUser(@Param("userQuery") UserQuery userQuery);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.UserPost;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 用户岗位表(UserPost)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserPostMapper extends BaseMapper<UserPost> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package ai.remi.sys.infra.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ai.remi.sys.domain.entity.UserRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author DianJiu
|
||||
* @email dianjiuxyz@gmail.com
|
||||
* @desc 用户角色表(UserRole)数据层
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserRoleMapper extends BaseMapper<UserRole> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user