zouxuan 5 年之前
父节点
当前提交
fa7c0b71c6

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

@@ -9,8 +9,18 @@ public class MusicCalenderDetailQueryInfo extends QueryInfo {
 
 	private PaymentStatusEnum paymentStatus;
 
+	private Integer subjectId;
+
 	private Long id;
 
+	public Integer getSubjectId() {
+		return subjectId;
+	}
+
+	public void setSubjectId(Integer subjectId) {
+		this.subjectId = subjectId;
+	}
+
 	public Integer getUserId() {
 		return userId;
 	}

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -166,6 +166,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			throw new BizException("修改失败,缴费状态不匹配");
 		}
 		calender.setStartPaymentDate(startTime);
+		calender.setDeadlinePaymentDate(DateUtil.addDays(startTime,3));
 		calender.setUpdateTime(new Date());
 		musicGroupPaymentCalenderDao.update(calender);
 	}

+ 10 - 1
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderDetailMapper.xml

@@ -144,6 +144,9 @@
 			<if test="paymentStatus != null">
 				mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
+			<if test="subjectId != null">
+				FIND_IN_SET(#{subjectId},s.subject_id_list_)
+			</if>
 		</where>
 		GROUP BY mgpc.id_
 		ORDER BY mgpc.create_time_
@@ -152,15 +155,21 @@
 
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM music_group_payment_calender_detail
+		SELECT COUNT(mgpc.id_) FROM music_group_payment_calender_detail mgpc
+		LEFT JOIN student s ON s.user_id_ = mgpc.user_id_
+		LEFT JOIN `subject` st ON FIND_IN_SET(st.id_,s.subject_id_list_)
 		<where>
 			<if test="userId != null">
 				user_id_ = #{userId}
 			</if>
+			<if test="subjectId != null">
+				FIND_IN_SET(#{subjectId},s.subject_id_list_)
+			</if>
 			<if test="paymentStatus != null">
 				payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
 		</where>
+		GROUP BY mgpc.id_
 	</select>
 	<select id="queryListByIds" resultMap="MusicGroupPaymentCalenderDetail">
 		SELECT * FROM music_group_payment_calender_detail WHERE FIND_IN_SET(id_,#{ids})