feat: ASW-18 application 接口开发
This commit is contained in:
35
src/main/resources/db/mapper/app/ApplicationMapper.xml
Normal file
35
src/main/resources/db/mapper/app/ApplicationMapper.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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.ApplicationDao">
|
||||
|
||||
|
||||
<select id="queryList" resultType="net.geedge.asw.module.app.entity.ApplicationEntity">
|
||||
SELECT
|
||||
app.*
|
||||
FROM
|
||||
application app
|
||||
<where>
|
||||
<if test="params.ids != null and params.ids != ''">
|
||||
app.id in
|
||||
<foreach item="id" collection="params.ids.split(',')" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="params.q != null and params.q != ''">
|
||||
AND ( locate(#{params.q}, app.name) OR locate(#{params.q}, app.description) )
|
||||
</if>
|
||||
<if test="params.workspaceId != null and params.workspaceId != ''">
|
||||
AND app.workspace_id = #{params.workspaceId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
GROUP BY
|
||||
app.id
|
||||
<if test="params.orderBy == null or params.orderBy == ''">
|
||||
ORDER BY app.id
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user