【优化】统一名称
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?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.corewing.app.mapper.CourseMapper">
|
||||
<mapper namespace="com.corewing.app.mapper.TutorialMapper">
|
||||
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="VOResultMap" type="com.corewing.app.vo.CourseVO">
|
||||
<resultMap id="VOResultMap" type="com.corewing.app.vo.TutorialVO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="course_title" property="courseTitle"/>
|
||||
<result column="tutorial_title" property="tutorialTitle"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="content" property="content"/>
|
||||
<result column="view_count" property="viewCount"/>
|
||||
@@ -19,9 +19,9 @@
|
||||
<!-- 基础查询SQL片段 -->
|
||||
<sql id="selectVOSql">
|
||||
select c.*, cc.category_title
|
||||
from app_course c
|
||||
left join app_course_category_relation ccr on c.id = ccr.course_id
|
||||
left join app_course_category cc on cc.id = ccr.category_id
|
||||
from app_tutorial c
|
||||
left join app_tutorial_category_relation ccr on c.id = ccr.tutorial_id
|
||||
left join app_tutorial_category cc on cc.id = ccr.category_id
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
@@ -33,8 +33,8 @@
|
||||
<if test="categoryId != null and categoryId != 0">
|
||||
AND cc.id = #{categoryId}
|
||||
</if>
|
||||
<if test="courseTitle != null and courseTitle != ''">
|
||||
AND c.course_title like CONCAT('%', #{courseTitle}, '%')
|
||||
<if test="tutorialTitle != null and tutorialTitle != ''">
|
||||
AND c.tutorial_title like CONCAT('%', #{tutorialTitle}, '%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
Reference in New Issue
Block a user