This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
appsketch-works-asw-controller/src/main/resources/db/mapper/runner/RunnerMapper.xml
2024-07-16 17:38:32 +08:00

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>