bug
This commit is contained in:
50
src/main/resources/mapper/master/CourseCatalogueDao.xml
Normal file
50
src/main/resources/mapper/master/CourseCatalogueDao.xml
Normal file
@@ -0,0 +1,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.peanut.modules.common.dao.CourseCatalogueDao">
|
||||
<select id="getCanBindProductAndCourse" resultType="com.peanut.modules.common.vo.CourseCatalogueVo">
|
||||
select
|
||||
t1.id as courseId,
|
||||
t2.id as courseCatalogueId,
|
||||
t1.title as courseTitle,
|
||||
t2.title as CourseCatalogueTitle,
|
||||
t2.image
|
||||
from course_catalogue t1
|
||||
left join course t2 on t1.course_id = t2.id
|
||||
where
|
||||
t1.del_flag = 0
|
||||
and t2.del_flag = 0
|
||||
<if test="keywords !=null and keywords != ''">
|
||||
and t2.title like concat('%', #{keywords} , '%')
|
||||
</if>
|
||||
<if test="ids.size() > 0">
|
||||
and t1.id not in
|
||||
<foreach collection="ids" item="menu_id" separator="," open="(" close=")">
|
||||
#{menu_id}
|
||||
</foreach>
|
||||
</if>
|
||||
limit #{page},#{limit}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getCanBindProductAndCourseCount" resultType="java.lang.Integer">
|
||||
select
|
||||
count(*)
|
||||
from course_catalogue t1
|
||||
left join course t2 on t1.course_id = t2.id
|
||||
where
|
||||
t1.del_flag = 0
|
||||
and t2.del_flag = 0
|
||||
<if test="keywords !=null and keywords != ''">
|
||||
and t2.title like concat('%', #{keywords} , '%')
|
||||
</if>
|
||||
<if test="ids.size() > 0">
|
||||
and t1.id not in
|
||||
<foreach collection="ids" item="menu_id" separator="," open="(" close=")">
|
||||
#{menu_id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user