支持PostgreSQL数据库
This commit is contained in:
parent
f546a47c61
commit
9f28779390
@ -159,7 +159,7 @@ management:
|
||||
--- # 监控中心客户端配置
|
||||
spring.boot.admin.client:
|
||||
# 增加客户端开关
|
||||
enabled: false
|
||||
enabled: true
|
||||
url: http://localhost:9090/admin
|
||||
instance:
|
||||
service-host-type: IP
|
||||
@ -170,7 +170,7 @@ spring.boot.admin.client:
|
||||
powerjob:
|
||||
worker:
|
||||
# 如何开启调度中心请查看文档教程
|
||||
enabled: false
|
||||
enabled: true
|
||||
# 需要先在 powerjob 登录页执行应用注册后才能使用
|
||||
app-name: ruoyi-worker
|
||||
# 28080 端口 随着主应用端口飘逸 避免集群冲突
|
||||
|
@ -32,14 +32,14 @@ public class GenConstants
|
||||
public static final String PARENT_MENU_NAME = "parentMenuName";
|
||||
|
||||
/** 数据库字符串类型 */
|
||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
|
||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2","character","character varying" };
|
||||
|
||||
/** 数据库文本类型 */
|
||||
public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext", "binary", "varbinary", "blob",
|
||||
"ntext", "image", "bytea" };
|
||||
|
||||
/** 数据库时间类型 */
|
||||
public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp", "year", "interval",
|
||||
public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp","timestamp without time zone","year", "interval",
|
||||
"smalldatetime", "datetime2", "datetimeoffset" };
|
||||
|
||||
/** 数据库数字类型 */
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.common.orm.helper;
|
||||
|
||||
import com.mybatisflex.core.FlexGlobalConfig;
|
||||
import com.mybatisflex.core.dialect.DbType;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 数据库助手:判断数据库类型
|
||||
*
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class DataBaseHelper {
|
||||
|
||||
public static boolean isMySql() {
|
||||
return DbType.MYSQL == FlexGlobalConfig.getDefaultConfig().getDbType();
|
||||
}
|
||||
|
||||
public static boolean isPostgreSql() {
|
||||
return DbType.POSTGRE_SQL == FlexGlobalConfig.getDefaultConfig().getDbType();
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package com.ruoyi.mf.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.ruoyi.mf.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -102,9 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<insert id="batchDemoGoods">
|
||||
insert into demo_goods( goods_id, customer_id, name, weight, price, date, type) values
|
||||
insert into demo_goods( customer_id, name, weight, price, date, type) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.goodsId}, #{item.customerId}, #{item.name}, #{item.weight}, #{item.price}, #{item.date}, #{item.type})
|
||||
( #{item.customerId}, #{item.name}, #{item.weight}, #{item.price}, #{item.date}, #{item.type})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -7,6 +7,8 @@ import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import com.mybatisflex.core.FlexGlobalConfig;
|
||||
import com.mybatisflex.core.dialect.DbType;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryMethods;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
@ -205,7 +207,6 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
{
|
||||
String tableName = table.getTableName();
|
||||
GenUtils.initTable(table);
|
||||
//int row = genTableMapper.insertGenTable(table);
|
||||
boolean saved = this.save(table);
|
||||
if (saved)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ import java.util.Set;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.mybatisflex.core.datasource.FlexDataSource;
|
||||
import com.mybatisflex.core.dialect.DbTypeUtil;
|
||||
import com.ruoyi.common.orm.helper.DataBaseHelper;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
@ -145,8 +146,11 @@ public class VelocityUtils
|
||||
templates.add("vm/java/serviceImpl.java.vm");
|
||||
templates.add("vm/java/controller.java.vm");
|
||||
templates.add("vm/xml/mapper.xml.vm");
|
||||
|
||||
templates.add("vm/sql/sql.vm");
|
||||
if (DataBaseHelper.isPostgreSql()) {
|
||||
templates.add("vm/sql/postgresql/sql.vm");
|
||||
} else {
|
||||
templates.add("vm/sql/mysql/sql.vm");
|
||||
}
|
||||
templates.add("vm/js/api.js.vm");
|
||||
if (GenConstants.TPL_CRUD.equals(tplCategory))
|
||||
{
|
||||
@ -199,7 +203,8 @@ public class VelocityUtils
|
||||
case "vm/java/controller.java.vm" -> fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className);
|
||||
case "vm/xml/mapper.xml.vm" -> fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className);
|
||||
case "vm/xml/sub-mapper.xml.vm" -> fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, genTable.getSubTable().getClassName());
|
||||
case "vm/sql/sql.vm" -> fileName = businessName + "Menu.sql";
|
||||
case "vm/sql/postgresql/sql.vm" -> fileName = businessName + "Menu(postgresql).sql";
|
||||
case "vm/sql/mysql/sql.vm" -> fileName = businessName + "Menu(mysql).sql";
|
||||
case "vm/js/api.js.vm" -> fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName);
|
||||
case "vm/vue/index.vue.vm" -> fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
|
||||
case "vm/vue/index-tree.vue.vm" -> fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
|
||||
|
@ -34,9 +34,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
|
||||
select column_name, (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else '0' end) as is_required, (case when column_key = 'PRI' then '1' else '0' end) as is_pk, ordinal_position as sort, column_comment, (case when extra = 'auto_increment' then '1' else '0' end) as is_increment, column_type
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isMySql()">
|
||||
select column_name,
|
||||
(case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else '0' end) as is_required,
|
||||
(case when column_key = 'PRI' then '1' else '0' end) as is_pk,
|
||||
ordinal_position as sort,
|
||||
column_comment,
|
||||
(case when extra = 'auto_increment' then '1' else '0' end) as is_increment,
|
||||
column_type
|
||||
from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName})
|
||||
order by ordinal_position
|
||||
</if>
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isPostgreSql()">
|
||||
SELECT column_name, is_required, is_pk, sort, column_comment, is_increment, column_type
|
||||
FROM (
|
||||
SELECT c.relname AS table_name,
|
||||
a.attname AS column_name,
|
||||
d.description AS column_comment,
|
||||
CASE WHEN a.attnotnull AND con.conname IS NULL THEN 1 ELSE 0
|
||||
END AS is_required,
|
||||
CASE WHEN con.conname IS NOT NULL THEN 1 ELSE 0
|
||||
END AS is_pk,
|
||||
a.attnum AS sort,
|
||||
CASE WHEN "position"(pg_get_expr(ad.adbin, ad.adrelid),
|
||||
((c.relname::text || '_'::text) || a.attname::text) || '_seq'::text) > 0 THEN 1 ELSE 0
|
||||
END AS is_increment,
|
||||
btrim(
|
||||
CASE WHEN t.typelem <![CDATA[ <> ]]> 0::oid AND t.typlen = '-1'::integer THEN 'ARRAY'::text ELSE
|
||||
CASE WHEN t.typtype = 'd'::"char" THEN format_type(t.typbasetype, NULL::integer)
|
||||
ELSE format_type(a.atttypid, NULL::integer) END
|
||||
END, '"'::text
|
||||
) AS column_type
|
||||
FROM pg_attribute a
|
||||
JOIN (pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid) ON a.attrelid = c.oid
|
||||
LEFT JOIN pg_description d ON d.objoid = c.oid AND a.attnum = d.objsubid
|
||||
LEFT JOIN pg_constraint con ON con.conrelid = c.oid AND (a.attnum = ANY (con.conkey))
|
||||
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
|
||||
LEFT JOIN pg_type t ON a.atttypid = t.oid
|
||||
WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"]))
|
||||
AND a.attnum > 0
|
||||
AND n.nspname = 'public'::name
|
||||
ORDER BY c.relname, a.attnum
|
||||
) temp
|
||||
WHERE table_name = (#{tableName})
|
||||
AND column_type <![CDATA[ <> ]]> '-'
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="deleteGenTableColumnByIds" parameterType="Long">
|
||||
|
@ -58,7 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isMySql()">
|
||||
select table_name, table_comment, create_time, update_time
|
||||
from information_schema.tables
|
||||
where table_schema = (select database())
|
||||
AND table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT IN (select table_name from gen_table)
|
||||
@ -68,22 +70,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="tableComment != null and tableComment != ''">
|
||||
AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
order by create_time desc
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isPostgreSql()">
|
||||
select table_name, table_comment, create_time, update_time
|
||||
from (
|
||||
SELECT c.relname AS table_name,
|
||||
obj_description(c.oid) AS table_comment,
|
||||
CURRENT_TIMESTAMP AS create_time,
|
||||
CURRENT_TIMESTAMP AS update_time
|
||||
FROM pg_class c
|
||||
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
|
||||
WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"]))
|
||||
AND c.relname != 'spatial_%'::text
|
||||
AND n.nspname = 'public'::name
|
||||
AND n.nspname <![CDATA[ <> ]]> ''::name
|
||||
) list_table
|
||||
where table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT IN (select table_name from gen_table)
|
||||
<if test="tableName != null and tableName != ''">
|
||||
AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
|
||||
</if>
|
||||
<if test="tableComment != null and tableComment != ''">
|
||||
AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
|
||||
</if>
|
||||
order by create_time desc
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableListByNames" resultMap="GenTableResult">
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isMySql()">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
|
||||
and table_name in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="@com.ruoyi.common.orm.helper.DataBaseHelper@isPostgreSql()">
|
||||
select table_name, table_comment, create_time, update_time
|
||||
from (
|
||||
SELECT c.relname AS table_name,
|
||||
obj_description(c.oid) AS table_comment,
|
||||
CURRENT_TIMESTAMP AS create_time,
|
||||
CURRENT_TIMESTAMP AS update_time
|
||||
FROM pg_class c
|
||||
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
|
||||
WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"]))
|
||||
AND c.relname != 'spatial_%'::text
|
||||
AND n.nspname = 'public'::name
|
||||
AND n.nspname <![CDATA[ <> ]]> ''::name
|
||||
) list_table
|
||||
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), 1, null, '${functionName}菜单');
|
||||
values(${table.menuIds[0]}, '${functionName}', ${parentMenuId}, '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), 1, null, '${functionName}菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[0]}, '${functionName}', ${parentMenuId}, '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, now(), 1, null, '${functionName}菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[1]}, '${functionName}查询', ${table.menuIds[0]}, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 1, now(), 1, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[2]}, '${functionName}新增', ${table.menuIds[0]}, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 1, now(), 1, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[3]}, '${functionName}修改', ${table.menuIds[0]}, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 1, now(), 1, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[4]}, '${functionName}删除', ${table.menuIds[0]}, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 1, now(), 1, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(${table.menuIds[5]}, '${functionName}导出', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 1, now(), 1, null, '');
|
@ -10,8 +10,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
/**
|
||||
* 系统授权表 服务层实现。
|
||||
*
|
||||
* @author mybatis-flex-helper automatic generation
|
||||
* @since 1.0
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysClientServiceImpl extends ServiceImpl<SysClientMapper, SysClient> implements ISysClientService {
|
||||
|
@ -11,7 +11,6 @@ import com.ruoyi.system.domain.vo.SysRoleVo;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysDataScopeService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -26,7 +26,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.annotation.DataScope;
|
||||
import com.ruoyi.common.core.constant.UserConstants;
|
||||
import com.ruoyi.common.core.core.text.Convert;
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
@ -44,6 +43,7 @@ import static com.ruoyi.system.domain.table.SysRoleDeptTableDef.SYS_ROLE_DEPT;
|
||||
* 部门管理 服务实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
|
@ -8,8 +8,6 @@ import com.mybatisflex.core.query.QueryMethods;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.ruoyi.common.core.constant.CacheNames;
|
||||
import com.ruoyi.common.core.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.core.page.TableSupport;
|
||||
import com.ruoyi.common.core.utils.MapstructUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.orm.core.page.PageQuery;
|
||||
@ -34,6 +32,7 @@ import static com.ruoyi.system.domain.table.SysDictDataTableDef.SYS_DICT_DATA;
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
|
@ -12,8 +12,6 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.ruoyi.common.core.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.constant.CacheNames;
|
||||
import com.ruoyi.common.core.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.core.page.TableSupport;
|
||||
import com.ruoyi.common.core.service.DictService;
|
||||
import com.ruoyi.common.core.utils.MapstructUtils;
|
||||
import com.ruoyi.common.core.utils.SpringUtils;
|
||||
@ -44,6 +42,7 @@ import static com.ruoyi.system.domain.table.SysDictTypeTableDef.SYS_DICT_TYPE;
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeMapper, SysDictType> implements ISysDictTypeService, DictService
|
||||
|
@ -39,6 +39,7 @@ import static com.ruoyi.system.domain.table.SysLogininforTableDef.SYS_LOGININFOR
|
||||
* 系统访问日志情况信息 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
|
@ -44,6 +44,7 @@ import static com.ruoyi.system.domain.table.SysUserTableDef.SYS_USER;
|
||||
* 菜单 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysMenuServiceImpl extends BaseServiceImpl<SysMenuMapper,SysMenu> implements ISysMenuService {
|
||||
|
@ -25,7 +25,8 @@ import static com.ruoyi.system.domain.table.SysNoticeTableDef.SYS_NOTICE;
|
||||
/**
|
||||
* 公告 服务层实现
|
||||
*
|
||||
* @author 数据小王子
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysNoticeServiceImpl extends BaseServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService {
|
||||
|
@ -31,6 +31,7 @@ import static com.ruoyi.system.domain.table.SysOperLogTableDef.SYS_OPER_LOG;
|
||||
* 操作日志 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysOperLogServiceImpl extends BaseServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService
|
||||
|
@ -15,6 +15,7 @@ import java.util.Set;
|
||||
* 用户权限处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
|
@ -5,10 +5,7 @@ import java.util.List;
|
||||
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.ruoyi.common.core.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.core.page.TableSupport;
|
||||
import com.ruoyi.common.core.utils.MapstructUtils;
|
||||
import com.ruoyi.common.core.utils.sql.SqlUtil;
|
||||
import com.ruoyi.common.orm.core.page.PageQuery;
|
||||
import com.ruoyi.common.orm.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.orm.core.service.impl.BaseServiceImpl;
|
||||
@ -22,7 +19,6 @@ import com.ruoyi.common.core.exception.ServiceException;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
import com.ruoyi.system.mapper.SysPostMapper;
|
||||
import com.ruoyi.system.mapper.SysUserPostMapper;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -34,6 +30,7 @@ import static com.ruoyi.system.domain.table.SysUserTableDef.SYS_USER;
|
||||
* 岗位信息 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysPostServiceImpl extends BaseServiceImpl<SysPostMapper, SysPost> implements ISysPostService
|
||||
|
@ -16,6 +16,7 @@ import static com.ruoyi.system.domain.table.SysRoleMenuTableDef.SYS_ROLE_MENU;
|
||||
/**
|
||||
* SysRoleMenu服务实现类
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
|
@ -26,14 +26,12 @@ import com.ruoyi.system.service.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.common.core.annotation.DataScope;
|
||||
import com.ruoyi.common.core.constant.UserConstants;
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.core.utils.SpringUtils;
|
||||
|
||||
import static com.ruoyi.system.domain.table.SysDeptTableDef.SYS_DEPT;
|
||||
import static com.ruoyi.system.domain.table.SysRoleMenuTableDef.SYS_ROLE_MENU;
|
||||
import static com.ruoyi.system.domain.table.SysRoleTableDef.SYS_ROLE;
|
||||
import static com.ruoyi.system.domain.table.SysUserRoleTableDef.SYS_USER_ROLE;
|
||||
import static com.ruoyi.system.domain.table.SysUserTableDef.SYS_USER;
|
||||
@ -42,6 +40,7 @@ import static com.ruoyi.system.domain.table.SysUserTableDef.SYS_USER;
|
||||
* 角色 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {
|
||||
|
@ -16,6 +16,7 @@ import static com.ruoyi.system.domain.table.SysUserPostTableDef.SYS_USER_POST;
|
||||
/**
|
||||
* ruoyi-flex
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
|
@ -18,6 +18,7 @@ import static com.ruoyi.system.domain.table.SysUserRoleTableDef.SYS_USER_ROLE;
|
||||
/**
|
||||
* SysUserRoleService实现类
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
|
@ -50,6 +50,7 @@ import static com.ruoyi.system.domain.table.SysUserTableDef.SYS_USER;
|
||||
* 用户 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser> implements ISysUserService, UserService {
|
||||
|
1657
sql/mysql/mysql-ruoyiflex-V4.2.0.sql
Normal file
1657
sql/mysql/mysql-ruoyiflex-V4.2.0.sql
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
--V4.1.8升级到V4.2.0:
|
||||
-- sys_menu菜单表结构修改、去掉主键自增
|
||||
ALTER TABLE `sys_menu`
|
||||
CHANGE COLUMN `menu_id` `menu_id` BIGINT(19) NOT NULL COMMENT '菜单ID' FIRST,
|
||||
|
1886
sql/postgresql/postgresql-ruoyiflex-V4.2.0.sql
Normal file
1886
sql/postgresql/postgresql-ruoyiflex-V4.2.0.sql
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user