|
@@ -62,6 +62,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
|
|
|
+ SELECT
|
|
|
+ bcg.*,
|
|
|
+ cs.subject_name,
|
|
|
+ obc.config_name
|
|
|
+ FROM
|
|
|
+ order_business_config_goods bcg
|
|
|
+ LEFT JOIN order_business_config obc ON bcg.config_id = obc.id
|
|
|
+ LEFT JOIN course_business cb ON obc.business_id = cb.id
|
|
|
+ LEFT JOIN course_project_type cpt ON cb.project_id = cpt.id
|
|
|
+ LEFT JOIN course_education_type cet ON cet.id = cpt.education_id
|
|
|
+ LEFT JOIN course_subject cs on bcg.subject_id = cs.id
|
|
|
+ WHERE
|
|
|
+ obc.`status` = 1
|
|
|
+ and bcg.`status` = 1
|
|
|
+ <if test="configId != null and configId != ''">
|
|
|
+ and bcg.config_id = #{configId}
|
|
|
+ </if>
|
|
|
+ <if test="gradeType != null and gradeType != ''">
|
|
|
+ and obc.grade_type = #{gradeType}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ and obc.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
+ and cpt.id = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="educationId != null and educationId != ''">
|
|
|
+ and cet.id = #{educationId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null and subjectId != ''">
|
|
|
+ and bcg.subject_id = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="businessName != null and businessName != ''">
|
|
|
+ and cb.business_name = #{businessName}
|
|
|
+ </if>
|
|
|
+ <if test="projectName != null and projectName != ''">
|
|
|
+ and cpt.project_name = #{projectName}
|
|
|
+ </if>
|
|
|
+ <if test="educationName != null and educationName != ''">
|
|
|
+ and cet.education_name = #{educationName}
|
|
|
+ </if>
|
|
|
+ <if test="subjectName != null and subjectName != ''">
|
|
|
+ and cs.subject_name = #{subjectName}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectMergeList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
|
|
|
SELECT
|
|
|
bcg.config_id,
|
|
|
any_value ( obc.config_name ) config_name,
|
|
@@ -108,5 +156,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
GROUP BY bcg.config_id
|
|
|
</select>
|
|
|
-
|
|
|
</mapper>
|