Browse Source

增加乐团课程费用的设置接口

周箭河 5 years ago
parent
commit
6484062285

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseSettingQueryInfo.java

@@ -8,6 +8,8 @@ public class CourseSettingQueryInfo extends QueryInfo {
     @ApiModelProperty(value="分部id")
     private Integer organId;
 
+    @ApiModelProperty(value="收费模式id")
+    private Integer chargeTypeId;
 
     public Integer getOrganId() {
         return organId;
@@ -16,4 +18,12 @@ public class CourseSettingQueryInfo extends QueryInfo {
     public void setOrganId(Integer organId) {
         this.organId = organId;
     }
+
+    public Integer getChargeTypeId() {
+        return chargeTypeId;
+    }
+
+    public void setChargeTypeId(Integer chargeTypeId) {
+        this.chargeTypeId = chargeTypeId;
+    }
 }

+ 17 - 3
mec-biz/src/main/resources/config/mybatis/MusicGroupOrganizationCourseSettingsMapper.xml

@@ -16,7 +16,8 @@
         <collection property="details" ofType="com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettingsDetail"
                     columnPrefix="detail_">
             <result column="id_" property="id"/>
-            <result column="course_type_" property="courseType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+            <result column="course_type_" property="courseType"
+                    typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
             <result column="is_student_optional_" property="isStudentOptional"/>
             <result column="course_total_minuties_" property="courseTotalMinuties"/>
             <result column="unit_price_" property="unitPrice"/>
@@ -89,6 +90,7 @@
         FROM music_group_organization_course_settings mgocs
         LEFT JOIN music_group_organization_course_settings_detail mgocsd ON mgocs.id_ =
         mgocsd.music_group_organization_course_settings_id_
+        <include refid="queryCondition"/>
         <include refid="global.limit"/>
     </select>
 
@@ -96,7 +98,19 @@
     <select id="queryCount" resultType="int">
         SELECT COUNT(*)
         FROM music_group_organization_course_settings mgocs
-                 LEFT JOIN music_group_organization_course_settings_detail mgocsd
-                           ON mgocs.id_ = mgocsd.music_group_organization_course_settings_id_
+        LEFT JOIN music_group_organization_course_settings_detail mgocsd
+        ON mgocs.id_ = mgocsd.music_group_organization_course_settings_id_
+        <include refid="queryCondition"/>
     </select>
+
+    <sql id="queryCondition">
+        <where>
+            <if test="organId != null">
+                AND mgocs.organ_id_=#{organId}
+            </if>
+            <if test="chargeTypeId != null">
+                AND mgocs.charge_type_id_ = #{chargeTypeId}
+            </if>
+        </where>
+    </sql>
 </mapper>