<?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.TestScenarioMapper"> <resultMap type="com.ruoyi.domain.TestScenario" id="TestScenarioResult"> <result property="id" column="id" /> <result property="standardClassification" column="standard_classification" /> <result property="testScenario" column="test_scenario" /> <result property="storageTime" column="storage_time" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> </resultMap> <sql id="selectTTestScenarioVo"> select id, standard_classification, test_scenario, storage_time, create_by, create_time, update_by, update_time from t_test_scenario </sql> <select id="selectTestScenarioList" parameterType="com.ruoyi.domain.TestScenario" resultMap="TestScenarioResult"> <include refid="selectTTestScenarioVo"/> <where> <if test="standardClassification != null and standardClassification != ''"> and standard_classification = #{standardClassification}</if> <if test="testScenario != null and testScenario != ''"> and test_scenario like concat('%', #{testScenario}, '%')</if> </where> </select> <select id="selectAll" resultType="com.ruoyi.domain.TestScenario"> select id, standard_classification, test_scenario, storage_time, create_by, create_time, update_by, update_time from t_test_scenario </select> </mapper>