Browse Source

2026-01-14

优化
master
fengyuan_yang 2 months ago
parent
commit
3ccf7c60c3
  1. 10
      src/main/resources/mapper/sys/InterfaceLogDao.xml
  2. 10
      src/main/resources/mapper/sys/SystemLogDao.xml

10
src/main/resources/mapper/sys/InterfaceLogDao.xml

@ -34,8 +34,8 @@
FROM api_log as a
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site and a.bu_no = b.bu_no
<where>
a.site in (select site from AccessSite where userID = #{userName})
and a.bu_no in (select bu_no from AccessBu where username = #{userName})
(a.site in (select site from AccessSite where userID = #{userName})
and a.bu_no in (select bu_no from AccessBu where username = #{userName}))
and type = 'Interface'
<if test="interfaceName != null and interfaceName.trim() != ''">
AND a.interface_name LIKE '%' + #{interfaceName} + '%'
@ -85,10 +85,10 @@
<select id="queryTotal" resultType="int">
SELECT COUNT(*)
FROM api_log as a
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site and a.bu_no = b.bu_no
<where>
a.site in (select site from AccessSite where userID = #{userName})
and a.bu_no in (select bu_no from AccessBu where username = #{userName})
(a.site in (select site from AccessSite where userID = #{userName})
and a.bu_no in (select bu_no from AccessBu where username = #{userName}))
and type = 'Interface'
<if test="interfaceName != null and interfaceName.trim() != ''">
AND a.interface_name LIKE '%' + #{interfaceName} + '%'

10
src/main/resources/mapper/sys/SystemLogDao.xml

@ -34,8 +34,8 @@
FROM api_log as a
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site and a.bu_no = b.bu_no
<where>
a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*'
and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*'
(a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*'
and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*')
and a.type <![CDATA[<>]]> 'Interface'
<if test="interfaceName != null and interfaceName.trim() != ''">
AND a.interface_name LIKE '%' + #{interfaceName} + '%'
@ -85,10 +85,10 @@
<select id="queryTotal" resultType="int">
SELECT COUNT(*)
FROM api_log as a
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site
left join api_Interface as b on a.interface_name = b.interface_name AND a.site = b.site and a.bu_no = b.bu_no
<where>
a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*'
and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*'
(a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*'
and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*')
and a.type <![CDATA[<>]]> 'Interface'
<if test="interfaceName != null and interfaceName.trim() != ''">
AND a.interface_name LIKE '%' + #{interfaceName} + '%'

Loading…
Cancel
Save