|
@@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="com.zhongzheng.modules.course.vo.CourseBusinessVo" id="CourseBusinessVoResult">
|
|
|
<result property="id" column="id"/>
|
|
|
<result property="businessName" column="business_name"/>
|
|
|
+ <result property="businessId" column="business_id"/>
|
|
|
<result property="remark" column="remark"/>
|
|
|
<result property="projectId" column="project_id"/>
|
|
|
<result property="schoolYear" column="school_year"/>
|
|
@@ -99,6 +100,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
b.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryFullId" parameterType="com.zhongzheng.modules.course.bo.CourseBusinessQueryBo" resultMap="CourseBusinessVoResult">
|
|
|
+ SELECT
|
|
|
+ e.id as education_id,
|
|
|
+ p.id AS project_id,
|
|
|
+ b.id AS business_id
|
|
|
+ FROM
|
|
|
+ course_business b
|
|
|
+ LEFT JOIN course_project_type p ON b.project_id = p.id
|
|
|
+ LEFT JOIN course_education_type e ON p.education_id = e.id
|
|
|
+ WHERE
|
|
|
+ b.business_name = #{businessName}
|
|
|
+ AND e.education_name = #{educationName}
|
|
|
+ AND p.project_name = #{projectName}
|
|
|
+ limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getBusinessByTenant" parameterType="map" resultType="com.zhongzheng.modules.course.domain.CourseBusiness">
|
|
|
SELECT * FROM course_business WHERE encoder = #{encoder} and tenant_id = #{newTenantId}
|
|
|
</select>
|