Parcourir la source

feat:VIP活动学员购买次数限制

Joburgess il y a 4 ans
Parent
commit
26715217c3

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupActivity.java

@@ -86,6 +86,9 @@ public class VipGroupActivity {
 	@ApiModelProperty(value = "最多可排课数量")
 	private Integer maxCourseNum;
 
+	@ApiModelProperty(value = "每位学员最大使用次数")
+	private Integer studentMaxUsedTimes;
+
 	public Integer getMinCourseNum() {
 		return minCourseNum;
 	}
@@ -294,6 +297,14 @@ public class VipGroupActivity {
 		this.delFlag = delFlag;
 	}
 
+	public Integer getStudentMaxUsedTimes() {
+		return studentMaxUsedTimes;
+	}
+
+	public void setStudentMaxUsedTimes(Integer studentMaxUsedTimes) {
+		this.studentMaxUsedTimes = studentMaxUsedTimes;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 7 - 2
mec-biz/src/main/resources/config/mybatis/VipGroupActivityMapper.xml

@@ -33,6 +33,7 @@
 		<result property="offlineClassJoinGradientRewards" column="offline_class_join_gradient_rewards_"/>
 		<result property="minCourseNum" column="min_course_num_"/>
 		<result property="maxCourseNum" column="max_course_num_"/>
+		<result property="studentMaxUsedTimes" column="student_max_used_times_"/>
 	</resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -54,10 +55,11 @@
 		-->
 		INSERT INTO vip_group_activity (id_,name_,description_,vip_group_category_id_list_,start_time_,end_time_,organ_id_,courses_start_time_,courses_end_time_,type_,
 		                                attribute1_,attribute2_,attribute3_,salary_readonly_flag_,give_class_pay_salary_flag_,create_time_,update_time_,salary_settlement_json_,del_flag_,
-		                                payment_readonly_flag_,online_class_join_gradient_rewards_,offline_class_join_gradient_rewards_,min_course_num_,max_course_num_)
+		                                payment_readonly_flag_,online_class_join_gradient_rewards_,offline_class_join_gradient_rewards_,min_course_num_,max_course_num_,
+										student_max_used_times_)
 		VALUES(#{id},#{name},#{description},#{vipGroupCategoryIdList},#{startTime},#{endTime},#{organId},#{coursesStartTime},#{coursesEndTime},#{type},#{attribute1},#{attribute2},#{attribute3},
 		       #{salaryReadonlyFlag},#{giveClassPaySalaryFlag},now(),now(),#{salarySettlementJson},#{delFlag},#{paymentReadonlyFlag},#{onlineClassJoinGradientRewards},
-		       #{offlineClassJoinGradientRewards},#{minCourseNum},#{maxCourseNum})
+		       #{offlineClassJoinGradientRewards},#{minCourseNum},#{maxCourseNum},#{studentMaxUsedTimes})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -133,6 +135,9 @@
 			<if test="maxCourseNum!=null">
 				max_course_num_=#{maxCourseNum},
 			</if>
+			<if test="studentMaxUsedTimes!=null">
+				student_max_used_times_=#{studentMaxUsedTimes},
+			</if>
 			update_time_ = NOW(),
 		</set>WHERE id_ = #{id}
 	</update>