diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index d69c66d2..b743d984 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -2,20 +2,20 @@
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
+ driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
druid:
# 主库数据源
master:
- url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
- username: root
+ url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=RuoYi_SqlServer
+ username: RuoYi_SqlServer
password: password
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
- url:
- username:
- password:
+ url:
+ username:
+ password:
# 初始连接数
initialSize: 5
# 最小连接池数量
@@ -31,27 +31,27 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
- validationQuery: SELECT 1 FROM DUAL
+ validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
- webStatFilter:
- enabled: true
+ # webStatFilter:
+ # enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
- login-username:
- login-password:
+ login-username:
+ login-password:
filter:
stat:
- enabled: true
+ # enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
- multi-statement-allow: true
\ No newline at end of file
+ multi-statement-allow: true
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index ffa7945c..0045f876 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -10,6 +10,7 @@ ruoyi:
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile: D:/ruoyi/uploadPath
+# profile: /Users/sxile/MyWorkSpase/WorkSpase/uploadPath/RuoYi-SqlServer
# 获取ip地址开关
addressEnabled: false
@@ -27,7 +28,7 @@ server:
max-threads: 800
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
-
+
# 日志配置
logging:
level:
@@ -55,7 +56,7 @@ spring:
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
- profiles:
+ profiles:
active: druid
# 文件上传
servlet:
@@ -80,11 +81,11 @@ mybatis:
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
-pagehelper:
- helperDialect: mysql
+pagehelper:
+ helperDialect: sqlserver
reasonable: true
supportMethodsArguments: true
- params: count=countSql
+ params: count=countSql
# Shiro
shiro:
@@ -101,7 +102,7 @@ shiro:
captchaType: math
cookie:
# 设置Cookie的域名 默认空,即当前访问的域名
- domain:
+ domain:
# 设置cookie的有效访问路径
path: /
# 设置HttpOnly属性
@@ -123,7 +124,7 @@ shiro:
kickoutAfter: false
# 防止XSS攻击
-xss:
+xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml
index d69a5720..a0d1f1d6 100644
--- a/ruoyi-admin/src/main/resources/logback.xml
+++ b/ruoyi-admin/src/main/resources/logback.xml
@@ -2,6 +2,7 @@
+
@@ -11,7 +12,7 @@
${log.pattern}
-
+
${log.path}/sys-info.log
@@ -34,7 +35,7 @@
DENY
-
+
${log.path}/sys-error.log
@@ -56,7 +57,7 @@
DENY
-
+
${log.path}/sys-user.log
@@ -70,7 +71,7 @@
${log.pattern}
-
+
@@ -79,15 +80,15 @@
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
index acfaebcf..49dc8b5f 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -28,23 +28,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
-
+
-
+
-
+
insert into gen_table_column (
table_id,
@@ -85,10 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{dictType},
#{sort},
#{createBy},
- sysdate()
+ GETDATE()
)
-
+
update gen_table_column
@@ -105,16 +115,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dict_type = #{dictType},
sort = #{sort},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where column_id = #{columnId}
- delete from gen_table_column where table_id in
+ delete from gen_table_column where table_id in
#{tableId}
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
index a58cc429..4fe5b24a 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -52,51 +52,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
-
+
-
+
-
+
-
+
-
+
-
+
-
+
insert into gen_table (
table_name,
@@ -151,10 +154,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{genPath},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
+
update gen_table
@@ -174,16 +177,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
options = #{options},
update_by = #{updateBy},
remark = #{remark},
- update_time = sysdate()
+ update_time = GETDATE()
where table_id = #{tableId}
-
+
- delete from gen_table where table_id in
+ delete from gen_table where table_id in
#{tableId}
-
\ No newline at end of file
+
diff --git a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
index 1b918e21..582e2fbd 100644
--- a/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
+++ b/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
#foreach ($column in $columns)
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
-
+
insert into ${tableName}
@@ -118,15 +118,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from ${tableName} where ${pkColumn.columnName} in
+ delete from ${tableName} where ${pkColumn.columnName} in
#{${pkColumn.javaField}}
#if($table.sub)
-
+
- delete from ${subTableName} where ${subTableFkName} in
+ delete from ${subTableName} where ${subTableFkName} in
#{${subTableFkclassName}}
@@ -144,4 +144,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#end
-
\ No newline at end of file
+
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
index e466ed05..a05178f0 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
@@ -8,7 +8,7 @@ import java.util.Properties;
/**
* 定时任务配置
- *
+ *
* @author ruoyi
*/
@Configuration
@@ -37,7 +37,7 @@ public class ScheduleConfig
prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
// sqlserver 启用
- // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
+ prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
prop.put("org.quartz.jobStore.misfireThreshold", "12000");
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
factory.setQuartzProperties(prop);
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
index 745bed36..140c2d09 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
@@ -14,17 +14,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
+ select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
from sys_job_log
-
+
-
+
-
+
-
+
delete from sys_job_log where job_log_id = #{jobLogId}
-
+
delete from sys_job_log where job_log_id in
#{jobLogId}
-
+
-
+
truncate table sys_job_log
-
+
insert into sys_job_log(
job_log_id,
@@ -86,8 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{jobMessage},
#{status},
#{exceptionInfo},
- sysdate()
+ GETDATE()
)
-
\ No newline at end of file
+
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
index 69233bdf..4f9c6104 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
@@ -19,17 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
+ select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
from sys_job
-
+
-
+
-
+
-
+
delete from sys_job where job_id = #{jobId}
-
+
delete from sys_job where job_id in
#{jobId}
-
+
-
+
update sys_job
@@ -75,11 +75,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
status = #{status},
remark = #{remark},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where job_id = #{jobId}
-
+
insert into sys_job(
job_id,
@@ -104,8 +104,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
\ No newline at end of file
+
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index 6ad915fb..661f52b3 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -17,6 +17,12 @@
+
+
+ com.microsoft.sqlserver
+ mssql-jdbc
+ 7.4.1.jre8
+
com.ruoyi
@@ -25,4 +31,4 @@
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
index 4756c1f1..e0ef3f5a 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -15,12 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
+ select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
from sys_config
-
+
@@ -32,38 +32,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
-
+
-
+
-
+
insert into sys_config (
config_name,
@@ -80,12 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{configType},
#{createBy},
#{remark},
- sysdate()
+ GETDATE()
)
-
+
- update sys_config
+ update sys_config
config_name = #{configName},
config_key = #{configKey},
@@ -93,16 +93,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
config_type = #{configType},
update_by = #{updateBy},
remark = #{remark},
- update_time = sysdate()
+ update_time = GETDATE()
where config_id = #{configId}
-
+
- delete from sys_config where config_id in
+ delete from sys_config where config_id in
#{configId}
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index bb018a73..658568b1 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -21,20 +21,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
+ select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d
-
+
-
+
-
+
-
+
-
+
-
+
-
+
insert into sys_dept(
dept_id,
@@ -107,10 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{email},
#{status},
#{createBy},
- sysdate()
+ GETDATE()
)
-
+
update sys_dept
@@ -123,11 +124,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
email = #{email},
status = #{status},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where dept_id = #{deptId}
-
+
update sys_dept set ancestors =
update sys_dept set del_flag = '2' where dept_id = #{deptId}
-
+
update sys_dept
status = #{status},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where dept_id in (${ancestors})
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
index aebd9b4f..0d7201f4 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -19,9 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
+ select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
from sys_dict_data
@@ -32,44 +32,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND dict_type = #{dictType}
- AND dict_label like concat('%', #{dictLabel}, '%')
+ AND dict_label like ('%' + #{dictLabel} + '%')
AND status = #{status}
-
+
-
+
-
+
-
+
-
+
delete from sys_dict_data where dict_code = #{dictCode}
-
+
delete from sys_dict_data where dict_code in
#{dictCode}
-
+
-
+
update sys_dict_data
@@ -83,15 +83,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
status = #{status},
remark = #{remark},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where dict_code = #{dictCode}
-
+
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
-
+
insert into sys_dict_data(
dict_sort,
@@ -116,8 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
index 1ddabe6e..13bc9157 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
@@ -14,9 +14,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select dict_id, dict_name, dict_type, status, create_by, create_time, remark
+ select dict_id, dict_name, dict_type, status, create_by, create_time, remark
from sys_dict_type
@@ -24,51 +24,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- AND dict_name like concat('%', #{dictName}, '%')
+ AND dict_name like ('%' + #{dictName} + '%')
AND status = #{status}
- AND dict_type like concat('%', #{dictType}, '%')
+ AND dict_type like ('%' + #{dictType} + '%')
- and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
+ and datediff(dd,#{params.beginTime},create_time)>= 0
- and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
+ and datediff(dd,create_time,#{params.endTime})>= 0
-
+
-
+
-
+
-
+
-
+
delete from sys_dict_type where dict_id = #{dictId}
-
+
delete from sys_dict_type where dict_id in
#{dictId}
-
+
@@ -79,11 +79,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
status = #{status},
remark = #{remark},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where dict_id = #{dictId}
-
+
insert into sys_dict_type(
dict_name,
@@ -98,8 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
index a2ac5b4e..0d97acb7 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
@@ -18,39 +18,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into sys_logininfor (login_name, status, ipaddr, login_location, browser, os, msg, login_time)
- values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
+ values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, GETDATE())
-
+
-
+
delete from sys_logininfor where info_id in
#{infoId}
-
+
-
+
truncate table sys_logininfor
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
index 9a06fde1..a5f90a1e 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -24,12 +24,12 @@
@@ -173,8 +173,8 @@
#{icon},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index dfca13c0..09220348 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -16,32 +16,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark
+ select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark
from sys_notice
-
+
-
+
-
+
insert into sys_notice (
notice_title,
@@ -58,28 +58,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
+
- update sys_notice
+ update sys_notice
notice_title = #{noticeTitle},
notice_type = #{noticeType},
notice_content = #{noticeContent},
status = #{status},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where notice_id = #{noticeId}
-
+
- delete from sys_notice where notice_id in
+ delete from sys_notice where notice_id in
#{noticeId}
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
index 9658e873..742e0c71 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -27,17 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time
from sys_oper_log
-
+
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time)
- values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
+ values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, GETDATE())
-
+
-
+
delete from sys_oper_log where oper_id in
#{operId}
-
+
-
+
-
+
truncate table sys_oper_log
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
index 8b0c0292..7ebd26bc 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -16,31 +16,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
+ select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
from sys_post
-
+
-
+
-
+
-
+
-
+
-
+
-
+
delete from sys_post where post_id in
#{postId}
-
+
-
+
update sys_post
@@ -80,11 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
status = #{status},
remark = #{remark},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where post_id = #{postId}
-
+
insert into sys_post(
post_id,
@@ -103,8 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 8d810c39..eaa801f9 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -18,41 +18,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,
- r.status, r.del_flag, r.create_time, r.remark
+ r.status, r.del_flag, r.create_time, r.remark
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
left join sys_dept d on u.dept_id = d.dept_id
-
+
- select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark
+ select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark
from sys_role r
-
+
-
+
-
+
-
+
-
+
delete from sys_role where role_id = #{roleId}
-
+
update sys_role set del_flag = '2' where role_id in
#{roleId}
-
+
-
+
update sys_role
@@ -99,11 +99,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
status = #{status},
remark = #{remark},
update_by = #{updateBy},
- update_time = sysdate()
+ update_time = GETDATE()
where role_id = #{roleId}
-
+
insert into sys_role(
role_id,
@@ -124,8 +124,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{remark},
#{createBy},
- sysdate()
+ GETDATE()
)
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index b02bd3fd..8c095fb9 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -46,121 +46,121 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
- left join sys_dept d on u.dept_id = d.dept_id
+ left join ( SELECT dept_id,parent_id,dept_name,order_num,leader,status FROM sys_dept ) d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
- left join sys_role r on r.role_id = ur.role_id
+ left join ( SELECT role_id,role_name,role_key,role_sort,data_scope,status FROM sys_role ) r on r.role_id = ur.role_id
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
update sys_user set del_flag = '2' where user_id = #{userId}
-
+
update sys_user set del_flag = '2' where user_id in
#{userId}
-
+
-
+
update sys_user
@@ -179,11 +179,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
login_date = #{loginDate},
update_by = #{updateBy},
remark = #{remark},
- update_time = sysdate()
+ update_time = GETDATE()
where user_id = #{userId}
-
+
insert into sys_user(
user_id,
@@ -216,8 +216,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status},
#{createBy},
#{remark},
- sysdate()
+ GETDATE()
)
-
-
\ No newline at end of file
+
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml
index 56adfd32..00591c94 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml
@@ -17,41 +17,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
- select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
+ select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
from sys_user_online
-
+
- replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
- values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
+ merge into sys_user_online a
+ using (select count(*) co
+ from sys_user_online
+ where sessionid = #{sessionId}) b
+ on (b.co ]]> 0)
+ when matched then
+ update
+ set login_name = #{loginName},
+ dept_name = #{deptName},
+ ipaddr = #{ipaddr},
+ login_location = #{loginLocation},
+ browser = #{browser},
+ os = #{os},
+ status = #{status},
+ start_timestamp = #{startTimestamp},
+ last_access_time = #{lastAccessTime},
+ expire_time = #{expireTime}
+ when not matched then
+ insert
+ values
+ (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime});
-
+
delete from sys_user_online where sessionId = #{sessionId}
-
+
-
+
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
index b091ba75..f1ab2b54 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -16,33 +16,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sys_user_role where user_id = #{userId}
-
+
-
+
delete from sys_user_role where user_id in
#{userId}
-
+
-
+
insert into sys_user_role(user_id, role_id) values
(#{item.userId},#{item.roleId})
-
+
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
-
+
delete from sys_user_role where role_id=#{roleId} and user_id in
#{userId}
-
+
-
\ No newline at end of file
+