若依开源1.1.1发布
This commit is contained in:
73
src/main/resources/mybatis/monitor/JobLogMapper.xml
Normal file
73
src/main/resources/mybatis/monitor/JobLogMapper.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.monitor.job.dao.IJobLogDao">
|
||||
|
||||
<resultMap type="JobLog" id="JobLogResult">
|
||||
<id property="jobLogId" column="job_log_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
<result property="methodName" column="method_name" />
|
||||
<result property="params" column="params" />
|
||||
<result property="jobMessage" column="job_message" />
|
||||
<result property="isException" column="is_exception" />
|
||||
<result property="exceptionInfo" column="exception_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectJobLogList" parameterType="JobLog" resultMap="JobLogResult">
|
||||
select * from sys_job_log
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND job_name = #{searchValue} OR method_name = #{searchValue}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectJobAll" resultMap="JobLogResult">
|
||||
SELECT * FROM sys_job_log
|
||||
</select>
|
||||
|
||||
<select id="selectJobLogById" parameterType="Long" resultMap="JobLogResult">
|
||||
select *
|
||||
from sys_job_log u
|
||||
where u.job_log_id = #{jobLogId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteJobLogById" parameterType="Long">
|
||||
delete from sys_job_log where job_log_id = #{jobLogId}
|
||||
</delete>
|
||||
|
||||
<delete id="batchDeleteJobLog" parameterType="String">
|
||||
delete from sys_job_log where job_log_id in
|
||||
<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
|
||||
#{jobLogId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertJobLog" parameterType="JobLog">
|
||||
insert into sys_job_log(
|
||||
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
||||
<if test="methodName != null and methodName != ''">method_name,</if>
|
||||
<if test="params != null and params != ''">params,</if>
|
||||
<if test="jobMessage != null and jobMessage != ''">job_message,</if>
|
||||
<if test="isException != null and isException != ''">is_exception,</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if>
|
||||
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
||||
<if test="methodName != null and methodName != ''">#{methodName},</if>
|
||||
<if test="params != null and params != ''">#{params},</if>
|
||||
<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
|
||||
<if test="isException != null and isException != ''">#{isException},</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
95
src/main/resources/mybatis/monitor/JobMapper.xml
Normal file
95
src/main/resources/mybatis/monitor/JobMapper.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.monitor.job.dao.IJobDao">
|
||||
|
||||
<resultMap type="Job" id="JobResult">
|
||||
<id property="jobId" column="job_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
<result property="methodName" column="method_name" />
|
||||
<result property="params" column="params" />
|
||||
<result property="cronExpression" column="cron_expression" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectJobList" parameterType="Job" resultMap="JobResult">
|
||||
select job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time remark from sys_job
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND job_name = #{searchValue} OR method_name = #{searchValue}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectJobAll" resultMap="JobResult">
|
||||
SELECT job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time FROM sys_job
|
||||
</select>
|
||||
|
||||
<select id="selectJobById" parameterType="Long" resultMap="JobResult">
|
||||
select job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time
|
||||
from sys_job u
|
||||
where u.job_id = #{jobId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteJobById" parameterType="Long">
|
||||
delete from sys_job where job_id = #{jobId}
|
||||
</delete>
|
||||
|
||||
<delete id="batchDeleteJob" parameterType="String">
|
||||
delete from sys_job where job_id in
|
||||
<foreach collection="array" item="jobId" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateJob" parameterType="Job">
|
||||
update sys_job
|
||||
<set>
|
||||
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
|
||||
<if test="methodName != null and methodName != ''">method_name = #{methodName},</if>
|
||||
<if test="params != null and params != ''">params = #{params},</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
|
||||
<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()
|
||||
</set>
|
||||
where 1=1
|
||||
<if test="jobId != null">and job_id = #{jobId}</if>
|
||||
</update>
|
||||
|
||||
<insert id="insertJob" parameterType="Post" useGeneratedKeys="true" keyProperty="jobId">
|
||||
insert into sys_job(
|
||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
||||
<if test="methodName != null and methodName != ''">method_name,</if>
|
||||
<if test="params != null and params != ''">params,</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
|
||||
<if test="status !=null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="jobId != null and jobId != 0">#{jobId},</if>
|
||||
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
||||
<if test="methodName != null and methodName != ''">#{methodName},</if>
|
||||
<if test="params != null and params != ''">#{params},</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
|
||||
<if test="status !=null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
39
src/main/resources/mybatis/monitor/LogininforMapper.xml
Normal file
39
src/main/resources/mybatis/monitor/LogininforMapper.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.monitor.logininfor.dao.ILogininforDao">
|
||||
|
||||
<resultMap type="Logininfor" id="LogininforResult">
|
||||
<id property="infoId" column="info_id" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="ipaddr" column="ipaddr" />
|
||||
<result property="browser" column="browser" />
|
||||
<result property="os" column="os" />
|
||||
<result property="msg" column="msg" />
|
||||
<result property="loginTime" column="login_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="Logininfor">
|
||||
insert into sys_logininfor (login_name, status, ipaddr, browser, os, msg)
|
||||
values (#{loginName}, #{status}, #{ipaddr}, #{browser}, #{os}, #{msg})
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="Logininfor" resultMap="LogininforResult">
|
||||
select * from sys_logininfor
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND login_name = #{searchValue}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="batchDeleteLogininfor" parameterType="String">
|
||||
delete from sys_logininfor where info_id in
|
||||
<foreach collection="array" item="infoId" open="(" separator="," close=")">
|
||||
#{infoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
57
src/main/resources/mybatis/monitor/OnlineMapper.xml
Normal file
57
src/main/resources/mybatis/monitor/OnlineMapper.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.monitor.online.dao.IUserOnlineDao">
|
||||
|
||||
<resultMap type="UserOnline" id="UserOnlineResult">
|
||||
<id property="sessionId" column="sessionId" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="ipaddr" column="ipaddr" />
|
||||
<result property="browser" column="browser" />
|
||||
<result property="os" column="os" />
|
||||
<result property="status" column="status" />
|
||||
<result property="startTimestamp" column="start_timestsamp" />
|
||||
<result property="lastAccessTime" column="last_access_time" />
|
||||
<result property="expireTime" column="expire_time" />
|
||||
<association property="session" javaType="OnlineSession" resultMap="OnlineSessionResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="OnlineSession" id="OnlineSessionResult">
|
||||
<result property="host" column="ipaddr" />
|
||||
<result property="browser" column="browser" />
|
||||
<result property="os" column="os" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectOnlineById" parameterType="String" resultMap="UserOnlineResult">
|
||||
select *
|
||||
from sys_user_online
|
||||
where sessionid = #{sessionid}
|
||||
</select>
|
||||
|
||||
<insert id="saveOnline" parameterType="UserOnline">
|
||||
replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, browser, os, status, start_timestsamp, last_access_time, expire_time)
|
||||
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteOnlineById" parameterType="String">
|
||||
delete from sys_user_online where sessionId = #{sessionId}
|
||||
</delete>
|
||||
|
||||
<select id="selectUserOnlineList" parameterType="UserOnline" resultMap="UserOnlineResult">
|
||||
select * from sys_user_online
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND login_name = #{searchValue}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOnlineByExpired" parameterType="String" resultMap="UserOnlineResult">
|
||||
SELECT * FROM sys_user_online o
|
||||
WHERE o.last_access_time <![CDATA[ <= ]]> #{lastAccessTime} ORDER BY o.last_access_time ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
50
src/main/resources/mybatis/monitor/OperLogMapper.xml
Normal file
50
src/main/resources/mybatis/monitor/OperLogMapper.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.monitor.operlog.dao.IOperLogDao">
|
||||
|
||||
<resultMap type="OperLog" id="OperLogResult">
|
||||
<id property="operId" column="oper_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="action" column="action" />
|
||||
<result property="method" column="method" />
|
||||
<result property="channel" column="channel" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="operUrl" column="oper_url" />
|
||||
<result property="operIp" column="oper_ip" />
|
||||
<result property="operParam" column="oper_param" />
|
||||
<result property="status" column="status" />
|
||||
<result property="errorMsg" column="error_msg" />
|
||||
<result property="operTime" column="oper_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertOperlog" parameterType="OperLog">
|
||||
insert into sys_oper_log(title, action, method, channel, login_name, dept_name, oper_url, oper_ip, oper_param, status, error_msg)
|
||||
values (#{title}, #{action}, #{method}, #{channel}, #{loginName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{status}, #{errorMsg})
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="OperLog" resultMap="OperLogResult">
|
||||
select * from sys_oper_log
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND login_name = #{searchValue}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="batchDeleteOperLog" parameterType="String">
|
||||
delete from sys_oper_log where oper_id in
|
||||
<foreach collection="array" item="operId" open="(" separator="," close=")">
|
||||
#{operId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOperLogById" parameterType="Long" resultMap="OperLogResult">
|
||||
select *
|
||||
from sys_oper_log
|
||||
where oper_id = #{operId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user