Przeglądaj źródła

查询状态,报名截止时间取缴费项目上的截止时间

周箭河 4 lat temu
rodzic
commit
4ab6ec7b1f

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDao.java

@@ -201,4 +201,11 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
      * @return
      */
     MusicGroupPaymentCalender findByMusicGroupRegCalender(@Param("musicGroupId") String musicGroupId);
+
+    /**
+     * 获取乐团报名缴费日历
+     * @param musicGroupId
+     * @return
+     */
+    MusicGroupPaymentCalender getMusicGroupRegCalender(@Param("musicGroupId") String musicGroupId);
 }

+ 8 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupSubjectGoodsAndInfoDto.java

@@ -1,9 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
-import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
+import com.ym.mec.biz.dal.entity.*;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.List;
@@ -29,8 +26,9 @@ public class MusicGroupSubjectGoodsAndInfoDto {
     //其他商品(教材、琴谱)
     private List<Goods> otherGoods;
 
-    @ApiModelProperty(value = "课程组成形态",required = false)
-    private List<MusicGroupPaymentCalenderCourseSettings> courseSettings;
+    @ApiModelProperty(value = "乐团报名缴费日历",required = false)
+    private MusicGroupPaymentCalender musicGroupPaymentCalender;
+
 
     public Map getCourseScheduleInfo() {
         return CourseScheduleInfo;
@@ -72,11 +70,11 @@ public class MusicGroupSubjectGoodsAndInfoDto {
         this.studentGoods = studentGoods;
     }
 
-    public List<MusicGroupPaymentCalenderCourseSettings> getCourseSettings() {
-        return courseSettings;
+    public MusicGroupPaymentCalender getMusicGroupPaymentCalender() {
+        return musicGroupPaymentCalender;
     }
 
-    public void setCourseSettings(List<MusicGroupPaymentCalenderCourseSettings> courseSettings) {
-        this.courseSettings = courseSettings;
+    public void setMusicGroupPaymentCalender(MusicGroupPaymentCalender musicGroupPaymentCalender) {
+        this.musicGroupPaymentCalender = musicGroupPaymentCalender;
     }
 }

+ 8 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java

@@ -57,6 +57,8 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     private ChargeTypeSubjectMapperDao chargeTypeSubjectMapperDao;
     @Autowired
     private MusicGroupPaymentCalenderCourseSettingsDao musicGroupPaymentCalenderCourseSettingsDao;
+    @Autowired
+    private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
 
     @Override
     public BaseDAO<Integer, MusicGroupSubjectPlan> getDAO() {
@@ -93,8 +95,11 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
         Map<String, Object> courseForm = JSON.parseObject(musicGroup.getCourseForm(), Map.class);
 
         //新的课程形态10.27
-        List<MusicGroupPaymentCalenderCourseSettings> courseSettings = musicGroupPaymentCalenderCourseSettingsDao.getMusicGroupRegCalenderCourseSettings(musicGroupId);
-
+        MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.getMusicGroupRegCalender(musicGroupId);
+        if (musicGroupRegCalender != null) {
+            List<MusicGroupPaymentCalenderCourseSettings> courseSettings = musicGroupPaymentCalenderCourseSettingsDao.getMusicGroupRegCalenderCourseSettings(musicGroupId);
+            musicGroupRegCalender.setMusicGroupPaymentCalenderCourseSettingsList(courseSettings);
+        }
 
         //乐团计划及收费信息
         MusicGroupSubjectPlan musicOneSubjectClassPlan = this.getMusicOneSubjectClassPlan(musicGroupId, subjectId);
@@ -117,7 +122,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
         MusicGroupSubjectGoodsAndInfoDto musicGroupSubjectGoodsAndInfo = new MusicGroupSubjectGoodsAndInfoDto();
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectPlan(musicOneSubjectClassPlan);
         musicGroupSubjectGoodsAndInfo.setCourseScheduleInfo(courseForm);
-        musicGroupSubjectGoodsAndInfo.setCourseSettings(courseSettings);
+        musicGroupSubjectGoodsAndInfo.setMusicGroupPaymentCalender(musicGroupRegCalender);
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectGoodsGroupList(goodsGroups);
         musicGroupSubjectGoodsAndInfo.setOtherGoods(otherGoods);
         return musicGroupSubjectGoodsAndInfo;

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderCourseSettingsMapper.xml

@@ -121,6 +121,7 @@
 		WHERE mgpc.music_group_id_ = #{musicGroupId}
 		AND mgpc.payment_type_ = 'MUSIC_APPLY'
 		AND mgpc.pay_user_type_='STUDENT'
+		AND mgpc.status_='OPEN'
 	</select>
 
     <select id="getCalenderCourseSettings" resultMap="MusicGroupPaymentCalenderCourseSettings">

+ 16 - 8
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -32,7 +32,7 @@
 
     <!-- 根据主键查询一条记录 -->
     <select id="get" resultMap="MusicGroupPaymentCalender">
-		SELECT * FROM music_group_payment_calender WHERE id_ = #{id} 
+		SELECT * FROM music_group_payment_calender WHERE id_ = #{id}
 	</select>
 
     <!-- 全查询 -->
@@ -129,7 +129,7 @@
         </set>
         WHERE id_ = #{id}
     </update>
-    
+
     <update id="batchUpdate" parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender">
 	    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
 	        UPDATE music_group_payment_calender
@@ -189,7 +189,7 @@
 
     <!-- 根据主键删除一条记录 -->
     <delete id="delete">
-		DELETE FROM music_group_payment_calender WHERE id_ = #{id} 
+		DELETE FROM music_group_payment_calender WHERE id_ = #{id}
 	</delete>
 
     <delete id="delByGroupId">
@@ -229,13 +229,13 @@
         	</if>
         </where>
 	</select>
-	
+
     <select id="findByMusicGroupId" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender mgpc
         WHERE music_group_id_ = #{musicGroupId}
         ORDER BY id_
     </select>
-	
+
     <select id="queryByPaymentStatus" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender mgpc
         <where>
@@ -251,17 +251,17 @@
     <select id="getForLock" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender WHERE id_ = #{id} FOR UPDATE
     </select>
-	
+
     <select id="queryIntersectionByPaymentDate" resultType="int" parameterType="map">
         SELECT count(*) FROM music_group_payment_calender mgpc
-        WHERE music_group_id_ = #{musicGroupId} 
+        WHERE music_group_id_ = #{musicGroupId}
         and (start_payment_date_ between #{startPaymentDate} and #{deadlinePaymentDate}
         or deadline_payment_date_ between #{startPaymentDate} and #{deadlinePaymentDate})
         <if test="calenderId != null">
             AND mgpc.id_ != #{calenderId}
         </if>
     </select>
-    
+
     <select id="getLastStartOne" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender WHERE music_group_id_ = #{musicGroupId} ORDER BY start_payment_date_ DESC LIMIT 1
     </select>
@@ -440,4 +440,12 @@
     <select id="findByMusicGroupRegCalender" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender WHERE music_group_id_=#{musicGroupId} AND payment_type_='MUSIC_APPLY'
     </select>
+
+    <select id="getMusicGroupRegCalender" resultMap="MusicGroupPaymentCalender">
+        SELECT * FROM music_group_payment_calender
+        WHERE music_group_id_ = #{musicGroupId}
+        AND payment_type_ = 'MUSIC_APPLY'
+        AND pay_user_type_='STUDENT'
+        AND status_='OPEN'
+    </select>
 </mapper>