| 
					
				 | 
			
			
				@@ -8,7 +8,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<resultMap type="com.keao.edu.user.entity.ExamOrganizationRelation" id="ExamOrganizationRelation"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="id_" property="id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="examination_basic_id_" property="examinationBasicId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="organ_id_" property="organId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="settlement_type_" property="settlementType" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -17,6 +16,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="total_payment_amount_" property="totalPaymentAmount"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="url_" property="url" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="send_url_flag_" property="sendUrlFlag" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result column="is_allow_arrange_exam_" property="isAllowArrangeExam" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="create_time_" property="createTime" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="update_time_" property="updateTime" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="tenant_id_" property="tenantId" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,15 +38,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 向数据库增加一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamOrganizationRelation" useGeneratedKeys="true" keyColumn="id" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		INSERT INTO exam_organization_relation (examination_basic_id_,organ_id_,settlement_type_,share_profit_amount_,total_registration_student_num_,total_payment_amount_,url_,send_url_flag_,create_time_,update_time_,tenant_id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		VALUES(#{examinationBasicId},#{organId},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{shareProfitAmount},#{totalRegistrationStudentNum},#{totalPaymentAmount},#{url},#{sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		INSERT INTO exam_organization_relation (examination_basic_id_,organ_id_,settlement_type_,share_profit_amount_,total_registration_student_num_,total_payment_amount_,url_,send_url_flag_,is_allow_arrange_exam_,create_time_,update_time_,tenant_id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		VALUES(#{examinationBasicId},#{organId},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{shareProfitAmount},#{totalRegistrationStudentNum},#{totalPaymentAmount},#{url},#{sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{isAllowArrangeExam,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <insert id="batchInsert" parameterType="com.keao.edu.user.entity.ExamOrganizationRelation" useGeneratedKeys="true" keyColumn="id" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		INSERT INTO exam_organization_relation (examination_basic_id_,organ_id_,settlement_type_,share_profit_amount_,total_registration_student_num_,total_payment_amount_,url_,send_url_flag_,create_time_,update_time_,tenant_id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		INSERT INTO exam_organization_relation (examination_basic_id_,organ_id_,settlement_type_,share_profit_amount_,total_registration_student_num_,total_payment_amount_,url_,send_url_flag_,is_allow_arrange_exam_,create_time_,update_time_,tenant_id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		VALUES 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<foreach collection="examOrganizationRelations" item="examOrganizationRelation" separator=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			(#{examOrganizationRelation.examinationBasicId},#{examOrganizationRelation.organId},#{examOrganizationRelation.settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examOrganizationRelation.shareProfitAmount},#{examOrganizationRelation.totalRegistrationStudentNum},#{examOrganizationRelation.totalPaymentAmount},#{examOrganizationRelation.url},#{examOrganizationRelation.sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{examOrganizationRelation.tenantId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			(#{examOrganizationRelation.examinationBasicId},#{examOrganizationRelation.organId},#{examOrganizationRelation.settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examOrganizationRelation.shareProfitAmount},#{examOrganizationRelation.totalRegistrationStudentNum},#{examOrganizationRelation.totalPaymentAmount},#{examOrganizationRelation.url},#{examOrganizationRelation.sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examOrganizationRelation.isAllowArrangeExam,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{examOrganizationRelation.tenantId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -55,25 +55,25 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UPDATE exam_organization_relation 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="examinationBasicId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			examination_basic_id_ = #{examinationBasicId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				examination_basic_id_ = #{examinationBasicId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="id != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			id_ = #{id}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				id_ = #{id}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="sendUrlFlag != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			send_url_flag_ = #{sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				send_url_flag_ = #{sendUrlFlag,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="isAllowArrangeExam != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				is_allow_arrange_exam_ = #{isAllowArrangeExam,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="url != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			url_ = #{url}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				url_ = #{url}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="tenantId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			tenant_id_ = #{tenantId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			<if test="updateTime != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			update_time_ = #{updateTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				tenant_id_ = #{tenantId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="shareProfitAmount != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			share_profit_amount_ = #{shareProfitAmount}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				share_profit_amount_ = #{shareProfitAmount}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="totalRegistrationStudentNum != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				total_registration_student_num_ = #{totalRegistrationStudentNum}, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -82,14 +82,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				total_payment_amount_ = #{totalPaymentAmount}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="organId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			organ_id_ = #{organId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				organ_id_ = #{organId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="settlementType != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			settlement_type_ = #{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			<if test="createTime != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			create_time_ = #{createTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				settlement_type_ = #{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				update_time_ = NOW() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</set> WHERE id_ = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<update id="batchUpdateSendUrlFlag"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -108,7 +106,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<sql id="queryCondition"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			ear.tenant_id_=#{tenantId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			AND ear.orga_id_ IN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			AND ear.organ_id_ IN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<foreach collection="organIds" item="organId" separator="," open="(" close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				#{organId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</foreach> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -137,7 +135,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 查询当前表的总记录数 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="queryCount" resultType="int"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		SELECT COUNT(*) FROM organ a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		SELECT COUNT(*) FROM organization a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		LEFT JOIN exam_organization_relation ear ON ear.organ_id_=a.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="examId!=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			AND ear.examination_basic_id_=#{examId} 
			 |