zouxuan 5 سال پیش
والد
کامیت
1ecb9c258e

+ 8 - 8
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalenderDetail.java

@@ -51,6 +51,10 @@ public class MusicGroupPaymentCalenderDetail {
 	/**  */
 	private java.util.Date createTime;
 
+	private SysUser sysUser = new SysUser();
+
+	private StudentRegistration studentRegistration = new StudentRegistration();
+
 	public Date getStartPaymentDate() {
 		return startPaymentDate;
 	}
@@ -75,16 +79,12 @@ public class MusicGroupPaymentCalenderDetail {
 		this.open = open;
 	}
 
-	private SysUser sysUser = new SysUser();
-
-	private Student student = new Student();
-
-	public Student getStudent() {
-		return student;
+	public StudentRegistration getStudentRegistration() {
+		return studentRegistration;
 	}
 
-	public void setStudent(Student student) {
-		this.student = student;
+	public void setStudentRegistration(StudentRegistration studentRegistration) {
+		this.studentRegistration = studentRegistration;
 	}
 
 	public SysUser getSysUser() {

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

@@ -21,8 +21,8 @@
 		<association property="sysUser" javaType="com.ym.mec.auth.api.entity.SysUser">
 			<result column="username_" property="username" />
 		</association>
-		<association property="student" javaType="com.ym.mec.biz.dal.entity.Student">
-			<result column="subject_names_" property="subjectNames" />
+		<association property="studentRegistration" javaType="com.ym.mec.biz.dal.entity.StudentRegistration">
+			<result column="subject_names_" property="subjectName" />
 		</association>
 	</resultMap>
 
@@ -147,8 +147,8 @@
 		SELECT mgpc.*,su.username_,st.name_ subject_names_
 		FROM music_group_payment_calender_detail mgpc
 		LEFT JOIN sys_user su ON su.id_ = mgpc.user_id_
-		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_)
+		LEFT JOIN student_registration sr ON sr.user_id_ = mgpc.user_id_
+		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 		<where>
 			<if test="userId != null">
 				AND mgpc.user_id_ = #{userId}
@@ -160,7 +160,7 @@
 				AND mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
 			<if test="subjectId != null">
-				AND FIND_IN_SET(#{subjectId},s.subject_id_list_)
+				AND #{subjectId} = sr.actual_subject_id_
 			</if>
 		</where>
 		ORDER BY mgpc.create_time_
@@ -170,8 +170,8 @@
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
 		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_)
+		LEFT JOIN student_registration sr ON sr.user_id_ = mgpc.user_id_
+		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 		<where>
 			<if test="userId != null">
 				AND mgpc.user_id_ = #{userId}
@@ -180,7 +180,7 @@
 				AND mgpc.music_group_payment_calender_id_ = #{id}
 			</if>
 			<if test="subjectId != null">
-				AND FIND_IN_SET(#{subjectId},s.subject_id_list_)
+				AND #{subjectId} = sr.actual_subject_id_
 			</if>
 			<if test="paymentStatus != null">
 				AND mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}