Compare commits

...

2 Commits

Author SHA1 Message Date
qimingjin ce43159e1d 钉钉图标 2021-06-09 20:19:26 +08:00
qimingjin 417a00ffd9 新1.6版本 2021-06-05 22:54:09 +08:00
17 changed files with 90 additions and 60 deletions

View File

@ -66,12 +66,6 @@
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.snow</groupId>

View File

@ -2,13 +2,13 @@
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/snow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
password: root
url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=snow
username: sa
password: Aa123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
@ -31,7 +31,7 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false

View File

@ -91,7 +91,7 @@ mybatis:
# PageHelper分页插件
pagehelper:
helperDialect: mysql
helperDialect: sqlserver
reasonable: true
supportMethodsArguments: true
params: count=countSql
@ -154,7 +154,7 @@ flowable:
#关闭定时任务JOB
async-executor-activate: false
# 将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时会自动将数据库表结构升级至新版本。
database-schema-update: true
database-schema-update: false
common:
app:
idm-url: http://localhost:80
@ -169,7 +169,7 @@ sys:
minidao:
base-package: org.jeecg.modules.jmreport.desreport.dao*
db-type: mysql
db-type: sqlserver
show-sql: true
#JimuReport[上传配置]
jeecg :
@ -180,4 +180,11 @@ jeecg :
#文件路径
upload: /opt/upload
quartz:
properties:
org:
quartz:
jobStore:
selectWithLockSQL: SELECT* FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?

View File

@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status !=null">status = #{status},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where job_id = #{jobId}
</update>
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -27,6 +27,13 @@
<artifactId>lombok</artifactId>
<version>1.18.10</version>
</dependency>
<!-- SqlServer驱动包 -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1.jre8</version>
</dependency>
</dependencies>
</project>

View File

@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="configType != null and configType != ''">#{configType},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
sysdate()
GETDATE()
)
</insert>
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="configType != null and configType != ''">config_type = #{configType},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where config_id = #{configId}
</update>

View File

@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
GETDATE()
)
</insert>
@ -128,7 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where dept_id = #{deptId}
</update>
@ -155,7 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<set>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where dept_id in (${ancestors})
</update>

View File

@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where dict_code = #{dictCode}
</update>
@ -116,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where dict_id = #{dictId}
</update>
@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertLogininfor" parameterType="SysLogininfor">
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())
</insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">

View File

@ -25,12 +25,12 @@
</resultMap>
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible,is_refresh, ifnull(perms,'') as perms, icon, create_by, create_time
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible,is_refresh, isnull(perms,'') as perms, icon, create_by, create_time
from sys_menu
</sql>
<select id="selectMenusByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.is_refresh,m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.is_refresh,m.parent_id, m.menu_name, m.url, m.visible, isnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
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
@ -40,7 +40,7 @@
</select>
<select id="selectMenuNormalAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.is_refresh,m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.is_refresh,m.menu_name, m.url, m.visible, isnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
where m.menu_type in ('M', 'C') and m.visible = 0
order by m.parent_id, m.order_num
@ -52,7 +52,7 @@
</select>
<select id="selectMenuAllByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name,m.is_refresh, m.is_refresh,m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name,m.is_refresh, m.is_refresh,m.url, m.visible, isnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
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
@ -71,7 +71,7 @@
</select>
<select id="selectMenuTree" parameterType="Long" resultType="String">
select concat(m.menu_id, ifnull(m.perms,'')) as perms
select concat(m.menu_id, isnull(m.perms,'')) as perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
@ -92,7 +92,7 @@
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.is_refresh,m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.is_refresh,m.visible, isnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
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
@ -142,7 +142,7 @@
<if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where menu_id = #{menuId}
</update>
@ -177,7 +177,7 @@
<if test="icon != null and icon != ''">#{icon},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -30,11 +30,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectNewNoticeByNoticeType" parameterType="String" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
select top 1 *
from sys_notice
where status =0 and notice_type = #{noticeType}
order by create_time desc
limit 0,1
</select>
@ -75,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="blackboardId != null and blackboardId != ''">#{blackboardId},</if>
sysdate()
GETDATE()
)
</insert>
@ -88,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status}, </if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="blackboardId != null and blackboardId != ''">blackboard_id=#{blackboardId},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where notice_id = #{noticeId}
</update>

View File

@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertOperlog" parameterType="SysOperLog">
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())
</insert>
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">

View File

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where role_id = #{roleId}
</update>
@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleType != null and roleType != ''">
#{roleType},
</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -90,16 +90,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND u.status = #{status}
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
AND u.phonenumber like ('%' + #{phonenumber} + '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
AND datediff(dd,#{params.beginTime},u.create_time)>=0
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
AND datediff(dd,u.create_time,#{params.endTime})>=0
</if>
<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE CHARINDEX(cast(#{deptId} as nvarchar),ancestors)>0))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
@ -112,14 +112,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
where u.del_flag = '0' and r.role_id = #{roleId}
<if test="loginName != null and loginName != ''">
AND u.login_name like concat('%', #{loginName}, '%')
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
AND u.user_name like ('%'+ #{userName}+ '%')
</if>
<if test="loginName != null and loginName != ''">
AND u.login_name like ('%' + #{loginName} + '%')
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
AND u.phonenumber like ('%' + #{phonenumber} + '%')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
@ -242,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pwdUpdateDate != null">pwd_update_date = #{pwdUpdateDate},</if>
<if test="orgEmail != null">org_email = #{orgEmail},</if>
<if test="dingUserId != null">ding_user_id = #{dingUserId},</if>
update_time = sysdate()
update_time = GETDATE()
</set>
where user_id = #{userId}
</update>
@ -295,7 +296,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hiredDate != null">#{hiredDate},</if>
<if test="orgEmail != null and orgEmail !=''"> #{orgEmail},</if>
<if test="dingUserId != null">#{dingUserId},</if>
sysdate()
GETDATE()
)
</insert>
@ -332,7 +333,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="source != null and source != ''">#{source},</if>
sysdate()
GETDATE()
)
</insert>

View File

@ -29,11 +29,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="saveOnline" parameterType="SysUserOnline">
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 <![CDATA[ <> ]]> 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});
</insert>
<delete id="deleteOnlineById" parameterType="String">
<delete id="deleteOnlineById" parameterType="String">
delete from sys_user_online where sessionId = #{sessionId}
</delete>
@ -41,10 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectOnlineVo"/>
<where>
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
AND ipaddr like ('%' + #{ipaddr} + '%')
</if>
<if test="loginName != null and loginName != ''">
AND login_name like concat('%', #{loginName}, '%')
AND login_name like ('%' + #{loginName} + '%')
</if>
</where>
</select>