1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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="com.ruoyi.mapper.TestUseCaseMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.TestUseCase">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="testScenarioId" column="test_scenario_id" jdbcType="BIGINT"/>
<result property="testTypeId" column="test_type_id" jdbcType="BIGINT"/>
<result property="usecaseNo" column="usecase_no" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="tools" column="tools" jdbcType="VARCHAR"/>
<result property="input" column="input" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="testType" column="test_type" />
<result property="testScenario" column="test_scenario" />
</resultMap>
<sql id="Base_Column_List">
id,test_scenario_id,test_type_id,
usecase_no,name,tools,
input,description
</sql>
<select id="selectseCaseList" parameterType="com.ruoyi.web.request.TestUserCaseRequest" resultMap="BaseResultMap">
select tu.id,
tu.test_scenario_id,
tu.test_type_id,
tu.usecase_no,
tu.name,
tu.tools,
tu.input,
tu.description,
tu.update_by,
tu.update_time,
ty.test_type,
ts.test_scenario
from t_test_usecase tu
left join t_test_type ty on ty.id = tu.test_type_id
left join t_test_scenario ts on ts.id = tu.test_scenario_id
<where>
<if test="testScenarioId != null and testScenarioId != ''"> and tu.test_scenario_id = #{testScenarioId}</if>
<if test="testTypeId != null and testTypeId != ''"> and tu.test_type_id = #{testTypeId}</if>
<if test="searchKeywords != null and searchKeywords != ''"> and tu.usecase_no like concat('%', #{searchKeywords}, '%') or tu.name like concat('%', #{searchKeywords}, '%')</if>
</where>
</select>
</mapper>