From 93b5762d929faa44ccde90f2191a968d91b28da1 Mon Sep 17 00:00:00 2001 From: Mlxa0324 Date: Wed, 9 Nov 2022 14:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E6=98=AF?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/TeacherOpenCourseScheduleSession.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScheduleSession.java b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScheduleSession.java index 99e0ad1a..3429b8e2 100644 --- a/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScheduleSession.java +++ b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScheduleSession.java @@ -1,6 +1,7 @@ package com.ibeetl.jlw.entity; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; import com.ibeetl.admin.core.annotation.Dict; import com.ibeetl.admin.core.annotation.DictDeep; import com.ibeetl.admin.core.entity.BaseEntity; @@ -100,6 +101,13 @@ public class TeacherOpenCourseScheduleSession extends BaseEntity{ private String teacherOpenCourseScheduleSessionClassList; + + // 判断是否是多个教室 + @UpdateIgnore + @InsertIgnore + + private boolean teacherOpenCourseScheduleSessionClassIsMultiple; + //组织ID private Long orgId ; @@ -155,4 +163,12 @@ public class TeacherOpenCourseScheduleSession extends BaseEntity{ } } + + public void setTeacherOpenCourseScheduleSessionClassList(String teacherOpenCourseScheduleSessionClassList) { + this.teacherOpenCourseScheduleSessionClassList = teacherOpenCourseScheduleSessionClassList; + // 不为空,且字符串是JSON数组 + if(ObjectUtil.isNotEmpty(teacherOpenCourseScheduleSessionClassList) && JSONUtil.isTypeJSONArray(teacherOpenCourseScheduleSessionClassList)) { + this.setTeacherOpenCourseScheduleSessionClassIsMultiple(JSONUtil.parseArray(teacherOpenCourseScheduleSessionClassList).size() > 1); + } + } }