32 lines
905 B
XML
32 lines
905 B
XML
<?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.runner.dao.RunnerDao">
|
|
|
|
<select id="queryList" resultType="net.geedge.asw.module.runner.entity.RunnerEntity">
|
|
SELECT
|
|
*
|
|
FROM
|
|
runner
|
|
<where>
|
|
<if test="params.workspaceId != null and params.workspaceId != ''">
|
|
workspace_id = #{params.workspaceId}
|
|
</if>
|
|
|
|
<if test="params.q != null and params.q != ''">
|
|
AND locate(#{params.q}, description)
|
|
</if>
|
|
|
|
<if test="params.tags != null and params.tags != ''">
|
|
AND <foreach item="item" collection="params.tags.split(',')" separator="OR" index="" open="(" close=")">
|
|
locate(#{item}, tags)
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
|
|
<if test="params.orderBy == null or params.orderBy == ''">
|
|
ORDER BY id
|
|
</if>
|
|
</select>
|
|
|
|
</mapper> |