opengauss改造
This commit is contained in:
parent
3d313b5695
commit
1d116ccf15
13
pom.xml
13
pom.xml
@ -5,19 +5,19 @@
|
|||||||
|
|
||||||
<groupId>com.jg</groupId>
|
<groupId>com.jg</groupId>
|
||||||
<artifactId>jg-boot</artifactId>
|
<artifactId>jg-boot</artifactId>
|
||||||
<!-- <version>3.8.7</version>-->
|
<!-- <version>3.8.7</version>-->
|
||||||
<version>4.0.0</version>
|
<version>4.0.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>jg</name>
|
<name>jg</name>
|
||||||
<!-- <url>http://www.jg.vip</url>-->
|
<!-- <url>http://www.jg.vip</url>-->
|
||||||
<description>JG管理系统</description>
|
<description>JG管理系统</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.5.15</version>
|
<version>2.5.15</version>
|
||||||
<relativePath />
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -110,6 +110,13 @@
|
|||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- openGauss驱动包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.huaweicloud.gaussdb</groupId>
|
||||||
|
<artifactId>opengaussjdbc</artifactId>
|
||||||
|
<version>503.2.T35</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- pagehelper 分页插件 -->
|
<!-- pagehelper 分页插件 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
@ -2,13 +2,16 @@
|
|||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.huawei.opengauss.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/jgwebsite?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://localhost:3306/jgwebsite?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
# username: root
|
||||||
password: 123456
|
# password: 123456
|
||||||
|
url: jdbc:opengauss://IP:端口/数据库?searchpath=模式
|
||||||
|
username: 用户名
|
||||||
|
password: 密码
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
@ -35,7 +38,7 @@ spring:
|
|||||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
maxEvictableIdleTimeMillis: 900000
|
maxEvictableIdleTimeMillis: 900000
|
||||||
# 配置检测连接是否有效
|
# 配置检测连接是否有效
|
||||||
validationQuery: SELECT 1 FROM DUAL
|
validationQuery: SELECT 1
|
||||||
testWhileIdle: true
|
testWhileIdle: true
|
||||||
testOnBorrow: false
|
testOnBorrow: false
|
||||||
testOnReturn: false
|
testOnReturn: false
|
||||||
|
@ -17,8 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg)
|
||||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectMenuVo">
|
<sql id="selectMenuVo">
|
||||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms as perms, icon, create_time
|
||||||
from sys_menu
|
from sys_menu
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -49,13 +49,13 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, m.perms as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||||
order by m.parent_id, m.order_num
|
order by m.parent_id, m.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, m.perms as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||||
@ -74,7 +74,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, m.perms as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||||
<if test="path != null and path != ''">path = #{path},</if>
|
<if test="path != null and path != ''">path = #{path},</if>
|
||||||
<if test="component != null">component = #{component},</if>
|
<if test="component != null">component = #{component},</if>
|
||||||
<if test="query != null">`query` = #{query},</if>
|
<if test="query != null">query = #{query},</if>
|
||||||
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
|
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
|
||||||
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
|
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
|
||||||
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
|
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<if test="orderNum != null">order_num,</if>
|
<if test="orderNum != null">order_num,</if>
|
||||||
<if test="path != null and path != ''">path,</if>
|
<if test="path != null and path != ''">path,</if>
|
||||||
<if test="component != null and component != ''">component,</if>
|
<if test="component != null and component != ''">component,</if>
|
||||||
<if test="query != null and query != ''">`query`,</if>
|
<if test="query != null and query != ''">query,</if>
|
||||||
<if test="isFrame != null and isFrame != ''">is_frame,</if>
|
<if test="isFrame != null and isFrame != ''">is_frame,</if>
|
||||||
<if test="isCache != null and isCache != ''">is_cache,</if>
|
<if test="isCache != null and isCache != ''">is_cache,</if>
|
||||||
<if test="menuType != null and menuType != ''">menu_type,</if>
|
<if test="menuType != null and menuType != ''">menu_type,</if>
|
||||||
|
@ -190,7 +190,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
update_time = sysdate()
|
|
||||||
</set>
|
</set>
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
Loading…
Reference in New Issue
Block a user