feat: ASW-18 application log 查询接口开发

This commit is contained in:
zhangshuai
2024-07-30 17:10:29 +08:00
parent 6b78f8e61a
commit 17328600aa
5 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?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="net.geedge.asw.module.app.dao.ApplicationLogDao">
<select id="queryList" resultType="net.geedge.asw.module.app.entity.ApplicationLogEntity">
SELECT
app.*
FROM
(select * from application union select * from application_log) app
<where>
<if test="params.id != null and params.id != ''">
AND app.id = #{params.id}
</if>
</where>
<if test="params.orderBy == null or params.orderBy == ''">
ORDER BY app.id
</if>
</select>
<select id="compare" resultType="net.geedge.asw.module.app.entity.ApplicationLogEntity">
SELECT
app.*
FROM
(select * from application union select * from application_log ) app
<where>
<if test="params.ids != null and params.ids != ''">
app.id in
<foreach item="id" collection="params.ids" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</where>
<if test="params.orderBy == null or params.orderBy == ''">
ORDER BY app.id
</if>
</select>
</mapper>