lisy
2023-08-04 e88d8861137a816a0ce8b79c390f319c46c6242d
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
<?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.dsh.course.mapper.TCourseMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.dsh.course.entity.TCourse">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="type" property="type" />
        <result column="introduce" property="introduce" />
        <result column="coverDrawing" property="coverDrawing" />
        <result column="introductionDrawing" property="introductionDrawing" />
        <result column="courseVideo" property="courseVideo" />
        <result column="state" property="state" />
        <result column="insertTime" property="insertTime" />
    </resultMap>
 
 
 
    <select id="queryCourseList" resultType="map">
        select id, type, name, introduce, coverDrawing, state from t_course where state != 3
        <if test="null != item.name and '' != item.name">
            and name like CONCAT('%', #{item.name}, '%')
        </if>
        <if test="null != item.courseType">
            and type = #{item.courseType}
        </if>
        order by insertTime desc
    </select>
</mapper>