mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-27 04:01:56 +08:00
若依 2.0
This commit is contained in:
@@ -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.system.mapper.SysClientDetailsMapper">
|
||||
|
||||
<resultMap type="SysClientDetails" id="SysClientDetailsResult">
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="resourceIds" column="resource_ids" />
|
||||
<result property="clientSecret" column="client_secret" />
|
||||
<result property="scope" column="scope" />
|
||||
<result property="authorizedGrantTypes" column="authorized_grant_types" />
|
||||
<result property="webServerRedirectUri" column="web_server_redirect_uri" />
|
||||
<result property="authorities" column="authorities" />
|
||||
<result property="accessTokenValidity" column="access_token_validity" />
|
||||
<result property="refreshTokenValidity" column="refresh_token_validity" />
|
||||
<result property="additionalInformation" column="additional_information" />
|
||||
<result property="autoapprove" column="autoapprove" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysClientDetailsVo">
|
||||
select client_id, resource_ids, client_secret, scope, authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove from sys_oauth_client_details
|
||||
</sql>
|
||||
|
||||
<select id="selectSysClientDetailsList" parameterType="SysClientDetails" resultMap="SysClientDetailsResult">
|
||||
<include refid="selectSysClientDetailsVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysClientDetailsById" parameterType="String" resultMap="SysClientDetailsResult">
|
||||
<include refid="selectSysClientDetailsVo"/>
|
||||
where client_id = #{clientId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysClientDetails" parameterType="SysClientDetails">
|
||||
insert into sys_oauth_client_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="resourceIds != null">resource_ids,</if>
|
||||
<if test="clientSecret != null">client_secret,</if>
|
||||
<if test="scope != null">scope,</if>
|
||||
<if test="authorizedGrantTypes != null">authorized_grant_types,</if>
|
||||
<if test="webServerRedirectUri != null">web_server_redirect_uri,</if>
|
||||
<if test="authorities != null">authorities,</if>
|
||||
<if test="accessTokenValidity != null">access_token_validity,</if>
|
||||
<if test="refreshTokenValidity != null">refresh_token_validity,</if>
|
||||
<if test="additionalInformation != null">additional_information,</if>
|
||||
<if test="autoapprove != null">autoapprove,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
<if test="resourceIds != null">#{resourceIds},</if>
|
||||
<if test="clientSecret != null">#{clientSecret},</if>
|
||||
<if test="scope != null">#{scope},</if>
|
||||
<if test="authorizedGrantTypes != null">#{authorizedGrantTypes},</if>
|
||||
<if test="webServerRedirectUri != null">#{webServerRedirectUri},</if>
|
||||
<if test="authorities != null">#{authorities},</if>
|
||||
<if test="accessTokenValidity != null">#{accessTokenValidity},</if>
|
||||
<if test="refreshTokenValidity != null">#{refreshTokenValidity},</if>
|
||||
<if test="additionalInformation != null">#{additionalInformation},</if>
|
||||
<if test="autoapprove != null ">#{autoapprove},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysClientDetails" parameterType="SysClientDetails">
|
||||
update sys_oauth_client_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="resourceIds != null">resource_ids = #{resourceIds},</if>
|
||||
<if test="clientSecret != null">client_secret = #{clientSecret},</if>
|
||||
<if test="scope != null">scope = #{scope},</if>
|
||||
<if test="authorizedGrantTypes != null">authorized_grant_types = #{authorizedGrantTypes},</if>
|
||||
<if test="webServerRedirectUri != null">web_server_redirect_uri = #{webServerRedirectUri},</if>
|
||||
<if test="authorities != null">authorities = #{authorities},</if>
|
||||
<if test="accessTokenValidity != null">access_token_validity = #{accessTokenValidity},</if>
|
||||
<if test="refreshTokenValidity != null">refresh_token_validity = #{refreshTokenValidity},</if>
|
||||
<if test="additionalInformation != null">additional_information = #{additionalInformation},</if>
|
||||
<if test="autoapprove != null">autoapprove = #{autoapprove},</if>
|
||||
</trim>
|
||||
where client_id = #{clientId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysClientDetailsById" parameterType="String">
|
||||
delete from sys_oauth_client_details where client_id = #{clientId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysClientDetailsByIds" parameterType="String">
|
||||
delete from sys_oauth_client_details where client_id in
|
||||
<foreach item="clientId" collection="array" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -9,20 +9,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="ipaddr" column="ipaddr" />
|
||||
<result property="loginLocation" column="login_location" />
|
||||
<result property="browser" column="browser" />
|
||||
<result property="os" column="os" />
|
||||
<result property="msg" column="msg" />
|
||||
<result property="loginTime" column="login_time" />
|
||||
<result property="accessTime" column="access_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
|
||||
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
@@ -34,10 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(login_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
and date_format(access_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(login_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
and date_format(access_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by info_id desc
|
||||
|
||||
@@ -15,7 +15,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="operUrl" column="oper_url" />
|
||||
<result property="operIp" column="oper_ip" />
|
||||
<result property="operLocation" column="oper_location" />
|
||||
<result property="operParam" column="oper_param" />
|
||||
<result property="jsonResult" column="json_result" />
|
||||
<result property="status" column="status" />
|
||||
@@ -24,13 +23,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOperLogVo">
|
||||
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
|
||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time
|
||||
from sys_oper_log
|
||||
</sql>
|
||||
|
||||
<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())
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
||||
|
||||
Reference in New Issue
Block a user