|  | @@ -24,6 +24,9 @@
 | 
											
												
													
														|  |  		<result column="open_" property="open"/>
 |  |  		<result column="open_" property="open"/>
 | 
											
												
													
														|  |  		<result column="open_" property="openFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 |  |  		<result column="open_" property="openFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 | 
											
												
													
														|  |  		<result column="use_in_course_" property="useInCourse"/>
 |  |  		<result column="use_in_course_" property="useInCourse"/>
 | 
											
												
													
														|  | 
 |  | +		<result column="responsible_user_id_" property="responsibleUserId"/>
 | 
											
												
													
														|  | 
 |  | +		<result column="responsible_record_" property="responsibleRecord"/>
 | 
											
												
													
														|  | 
 |  | +		<result column="responsible_username_" property="responsible.username"/>
 | 
											
												
													
														|  |  		<association property="sysUser" javaType="com.ym.mec.auth.api.entity.SysUser">
 |  |  		<association property="sysUser" javaType="com.ym.mec.auth.api.entity.SysUser">
 | 
											
												
													
														|  |  			<result column="username_" property="username" />
 |  |  			<result column="username_" property="username" />
 | 
											
												
													
														|  |  			<result column="phone_" property="phone" />
 |  |  			<result column="phone_" property="phone" />
 | 
											
										
											
												
													
														|  | @@ -50,21 +53,21 @@
 | 
											
												
													
														|  |  		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 |  |  		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 | 
											
												
													
														|  |  		INSERT INTO music_group_payment_calender_detail
 |  |  		INSERT INTO music_group_payment_calender_detail
 | 
											
												
													
														|  |  		(id_,music_group_payment_calender_id_,user_id_,expect_amount_,actual_amount_,payment_status_,
 |  |  		(id_,music_group_payment_calender_id_,user_id_,expect_amount_,actual_amount_,payment_status_,
 | 
											
												
													
														|  | -		user_status_,pay_time_,update_time_,create_time_,start_payment_date_,deadline_payment_date_,payment_order_id_,use_in_course_)
 |  | 
 | 
											
												
													
														|  | 
 |  | +		user_status_,pay_time_,update_time_,create_time_,start_payment_date_,deadline_payment_date_,payment_order_id_,use_in_course_,responsible_user_id_,responsible_record_)
 | 
											
												
													
														|  |  		VALUES(#{id},#{musicGroupPaymentCalenderId},#{userId},#{expectAmount},#{actualAmount},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 |  |  		VALUES(#{id},#{musicGroupPaymentCalenderId},#{userId},#{expectAmount},#{actualAmount},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 | 
											
												
													
														|  | -		#{userStatus},#{payTime},#{updateTime},#{createTime},#{startPaymentDate},#{deadlinePaymentDate},#{paymentOrderId},#{useInCourse})
 |  | 
 | 
											
												
													
														|  | 
 |  | +		#{userStatus},#{payTime},#{updateTime},#{createTime},#{startPaymentDate},#{deadlinePaymentDate},#{paymentOrderId},#{useInCourse},#{responsibleUserId},#{responsibleRecord})
 | 
											
												
													
														|  |  	</insert>
 |  |  	</insert>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id"
 |  |      <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id"
 | 
											
												
													
														|  |              keyProperty="id">
 |  |              keyProperty="id">
 | 
											
												
													
														|  |          INSERT INTO music_group_payment_calender_detail
 |  |          INSERT INTO music_group_payment_calender_detail
 | 
											
												
													
														|  |  		(id_,music_group_payment_calender_id_,user_id_,expect_amount_,actual_amount_,
 |  |  		(id_,music_group_payment_calender_id_,user_id_,expect_amount_,actual_amount_,
 | 
											
												
													
														|  | -		payment_status_,user_status_,pay_time_,update_time_,create_time_,start_payment_date_,deadline_payment_date_,payment_order_id_,use_in_course_)
 |  | 
 | 
											
												
													
														|  | 
 |  | +		payment_status_,user_status_,pay_time_,update_time_,create_time_,start_payment_date_,deadline_payment_date_,payment_order_id_,use_in_course_,responsible_user_id_,responsible_record_)
 | 
											
												
													
														|  |  		VALUES
 |  |  		VALUES
 | 
											
												
													
														|  |  		<foreach collection="list" item="item" separator=",">
 |  |  		<foreach collection="list" item="item" separator=",">
 | 
											
												
													
														|  |              (#{item.id},#{item.musicGroupPaymentCalenderId},#{item.userId},#{item.expectAmount},
 |  |              (#{item.id},#{item.musicGroupPaymentCalenderId},#{item.userId},#{item.expectAmount},
 | 
											
												
													
														|  |              #{item.actualAmount},#{item.paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.userStatus},#{item.payTime},
 |  |              #{item.actualAmount},#{item.paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.userStatus},#{item.payTime},
 | 
											
												
													
														|  | -            #{item.updateTime},#{item.createTime},#{item.startPaymentDate},#{item.deadlinePaymentDate},#{item.paymentOrderId},#{item.useInCourse})
 |  | 
 | 
											
												
													
														|  | 
 |  | +            #{item.updateTime},#{item.createTime},#{item.startPaymentDate},#{item.deadlinePaymentDate},#{item.paymentOrderId},#{item.useInCourse},#{item.responsibleUserId},#{item.responsibleRecord})
 | 
											
												
													
														|  |          </foreach>
 |  |          </foreach>
 | 
											
												
													
														|  |      </insert>
 |  |      </insert>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -112,6 +115,12 @@
 | 
											
												
													
														|  |  			<if test="useInCourse != null">
 |  |  			<if test="useInCourse != null">
 | 
											
												
													
														|  |  				use_in_course_ = #{useInCourse},
 |  |  				use_in_course_ = #{useInCourse},
 | 
											
												
													
														|  |  			</if>
 |  |  			</if>
 | 
											
												
													
														|  | 
 |  | +			<if test="responsibleUserId != null">
 | 
											
												
													
														|  | 
 |  | +				responsible_user_id_ = #{responsibleUserId},
 | 
											
												
													
														|  | 
 |  | +			</if>
 | 
											
												
													
														|  | 
 |  | +			<if test="responsibleRecord != null">
 | 
											
												
													
														|  | 
 |  | +				responsible_record_ = #{responsibleRecord},
 | 
											
												
													
														|  | 
 |  | +			</if>
 | 
											
												
													
														|  |  		</set>
 |  |  		</set>
 | 
											
												
													
														|  |  		WHERE id_ = #{id}
 |  |  		WHERE id_ = #{id}
 | 
											
												
													
														|  |  	</update>
 |  |  	</update>
 | 
											
										
											
												
													
														|  | @@ -158,6 +167,12 @@
 | 
											
												
													
														|  |  				<if test="item.useInCourse != null">
 |  |  				<if test="item.useInCourse != null">
 | 
											
												
													
														|  |  					use_in_course_ = #{item.useInCourse},
 |  |  					use_in_course_ = #{item.useInCourse},
 | 
											
												
													
														|  |  				</if>
 |  |  				</if>
 | 
											
												
													
														|  | 
 |  | +				<if test="item.responsibleUserId != null">
 | 
											
												
													
														|  | 
 |  | +					responsible_user_id_ = #{item.responsibleUserId},
 | 
											
												
													
														|  | 
 |  | +				</if>
 | 
											
												
													
														|  | 
 |  | +				<if test="item.responsibleRecord != null">
 | 
											
												
													
														|  | 
 |  | +					responsible_record_ = #{item.responsibleRecord},
 | 
											
												
													
														|  | 
 |  | +				</if>
 | 
											
												
													
														|  |  			</set>
 |  |  			</set>
 | 
											
												
													
														|  |  			WHERE id_ = #{item.id}
 |  |  			WHERE id_ = #{item.id}
 | 
											
												
													
														|  |  		</foreach>
 |  |  		</foreach>
 | 
											
										
											
												
													
														|  | @@ -187,12 +202,13 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	<!-- 分页查询 -->
 |  |  	<!-- 分页查询 -->
 | 
											
												
													
														|  |  	<select id="queryPage" resultMap="MusicGroupPaymentCalenderDetail" parameterType="map">
 |  |  	<select id="queryPage" resultMap="MusicGroupPaymentCalenderDetail" parameterType="map">
 | 
											
												
													
														|  | -		SELECT su.username_,su.phone_,st.name_ subject_names_,sr.music_group_status_,
 |  | 
 | 
											
												
													
														|  | 
 |  | +		SELECT su.username_,su.phone_,st.name_ subject_names_,sr.music_group_status_,tu.real_name_ responsible_username_,
 | 
											
												
													
														|  |  		CASE WHEN mgpcd.start_payment_date_ IS NULL THEN mgpc.start_payment_date_ ELSE mgpcd.start_payment_date_ END start_payment_date_mgpc_,
 |  |  		CASE WHEN mgpcd.start_payment_date_ IS NULL THEN mgpc.start_payment_date_ ELSE mgpcd.start_payment_date_ END start_payment_date_mgpc_,
 | 
											
												
													
														|  |  		CASE WHEN mgpcd.deadline_payment_date_ IS NULL THEN mgpc.deadline_payment_date_ ELSE mgpcd.deadline_payment_date_ END deadline_payment_date_mgpc_,
 |  |  		CASE WHEN mgpcd.deadline_payment_date_ IS NULL THEN mgpc.deadline_payment_date_ ELSE mgpcd.deadline_payment_date_ END deadline_payment_date_mgpc_,
 | 
											
												
													
														|  |  		CASE WHEN mgpc.status_ = 'OPEN' OR mgpcd.open_ = 1 THEN 1 ELSE 0 END open_,mgpcd.*
 |  |  		CASE WHEN mgpc.status_ = 'OPEN' OR mgpcd.open_ = 1 THEN 1 ELSE 0 END open_,mgpcd.*
 | 
											
												
													
														|  |  		FROM music_group_payment_calender_detail mgpcd
 |  |  		FROM music_group_payment_calender_detail mgpcd
 | 
											
												
													
														|  |  		LEFT JOIN sys_user su ON su.id_ = mgpcd.user_id_
 |  |  		LEFT JOIN sys_user su ON su.id_ = mgpcd.user_id_
 | 
											
												
													
														|  | 
 |  | +		left join sys_user tu on tu.id_ = mgpcd.responsible_user_id_
 | 
											
												
													
														|  |  		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 |  |  		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 | 
											
												
													
														|  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 |  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 | 
											
												
													
														|  |  		LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
 |  |  		LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
 | 
											
										
											
												
													
														|  | @@ -213,6 +229,9 @@
 | 
											
												
													
														|  |  			<if test="subjectId != null">
 |  |  			<if test="subjectId != null">
 | 
											
												
													
														|  |  				AND #{subjectId} = sr.actual_subject_id_
 |  |  				AND #{subjectId} = sr.actual_subject_id_
 | 
											
												
													
														|  |  			</if>
 |  |  			</if>
 | 
											
												
													
														|  | 
 |  | +			<if test="responsibleRealName != null and responsibleRealName != ''">
 | 
											
												
													
														|  | 
 |  | +				AND (mgpcd.responsible_user_id_ = #{responsibleRealName} OR tu.real_name_ LIKE CONCAT('%',#{responsibleRealName},'%') OR tu.phone_ LIKE CONCAT('%',#{responsibleRealName},'%'))
 | 
											
												
													
														|  | 
 |  | +			</if>
 | 
											
												
													
														|  |  		</where>
 |  |  		</where>
 | 
											
												
													
														|  |  		ORDER BY mgpc.update_time_ DESC
 |  |  		ORDER BY mgpc.update_time_ DESC
 | 
											
												
													
														|  |  		<include refid="global.limit" />
 |  |  		<include refid="global.limit" />
 | 
											
										
											
												
													
														|  | @@ -224,6 +243,7 @@
 | 
											
												
													
														|  |  		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 |  |  		LEFT JOIN student_registration sr ON sr.user_id_ = mgpcd.user_id_
 | 
											
												
													
														|  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 |  |  		LEFT JOIN `subject` st ON st.id_ = sr.actual_subject_id_
 | 
											
												
													
														|  |  		LEFT JOIN sys_user su ON su.id_ = mgpcd.user_id_
 |  |  		LEFT JOIN sys_user su ON su.id_ = mgpcd.user_id_
 | 
											
												
													
														|  | 
 |  | +		left join sys_user tu on tu.id_ = mgpcd.responsible_user_id_
 | 
											
												
													
														|  |  		LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
 |  |  		LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
 | 
											
												
													
														|  |  		<where>
 |  |  		<where>
 | 
											
												
													
														|  |  			mgpc.music_group_id_ = sr.music_group_id_
 |  |  			mgpc.music_group_id_ = sr.music_group_id_
 | 
											
										
											
												
													
														|  | @@ -242,6 +262,9 @@
 | 
											
												
													
														|  |  			<if test="musicGroupStatus != null and musicGroupStatus != ''">
 |  |  			<if test="musicGroupStatus != null and musicGroupStatus != ''">
 | 
											
												
													
														|  |  				AND sr.music_group_status_ = #{musicGroupStatus}
 |  |  				AND sr.music_group_status_ = #{musicGroupStatus}
 | 
											
												
													
														|  |  			</if>
 |  |  			</if>
 | 
											
												
													
														|  | 
 |  | +			<if test="responsibleRealName != null and responsibleRealName != ''">
 | 
											
												
													
														|  | 
 |  | +				AND (mgpcd.responsible_user_id_ = #{responsibleRealName} OR tu.real_name_ LIKE CONCAT('%',#{responsibleRealName},'%') OR tu.phone_ LIKE CONCAT('%',#{responsibleRealName},'%'))
 | 
											
												
													
														|  | 
 |  | +			</if>
 | 
											
												
													
														|  |  		</where>
 |  |  		</where>
 | 
											
												
													
														|  |  	</select>
 |  |  	</select>
 | 
											
												
													
														|  |  	<select id="queryListByIds" resultMap="MusicGroupPaymentCalenderDetail">
 |  |  	<select id="queryListByIds" resultMap="MusicGroupPaymentCalenderDetail">
 |