From c55c28dffbd9c4ec2d83be992658d3716e6fce12 Mon Sep 17 00:00:00 2001
From: maLix <mlx950324@163.com>
Date: Sun, 9 Jul 2023 01:34:25 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=A1=88=E4=BE=8B=E5=A2=9E?=
 =?UTF-8?q?=E5=8A=A0=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 doc/sql/mysql/2.tianze-pro-update.sql         |  2 +-
 .../sql/jlw/teacherOpenCourseHandsOn.md       | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/doc/sql/mysql/2.tianze-pro-update.sql b/doc/sql/mysql/2.tianze-pro-update.sql
index 2504d7aa..ce8a22f3 100644
--- a/doc/sql/mysql/2.tianze-pro-update.sql
+++ b/doc/sql/mysql/2.tianze-pro-update.sql
@@ -586,4 +586,4 @@ CREATE TABLE `student_teacher_system_use_log_analysis` (
 
 alter table teacher_open_course_merge_course_info add column system_course_info_id bigint(20) comment '关联系统课程ID' after teacher_open_course_id;
 
-alter table teacher_open_course_hands_on add column hands_on_status int comment '案例状态 (1上架 2下架 0删除)' after user_id;
+alter table teacher_open_course_hands_on add column hands_on_status int comment '案例状态 (1上架 2下架 0删除)' default 1 after user_id;
diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseHandsOn.md b/web/src/main/resources/sql/jlw/teacherOpenCourseHandsOn.md
index 3fb366c3..300b953a 100644
--- a/web/src/main/resources/sql/jlw/teacherOpenCourseHandsOn.md
+++ b/web/src/main/resources/sql/jlw/teacherOpenCourseHandsOn.md
@@ -49,6 +49,10 @@ queryByCondition
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
 
 
 queryByConditionQuery
@@ -100,6 +104,9 @@ queryByConditionQuery
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
 
 
 
@@ -235,6 +242,10 @@ getTeacherOpenCourseHandsOnValues
   @if(!isEmpty(startTime) && !isEmpty(endTime)){
   and t.add_time BETWEEN #startTime# AND date_add(#endTime#,interval 1 day)
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
 
 
 getValuesByQuery
@@ -284,6 +295,10 @@ getValuesByQuery
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
 
 
 getValuesByQueryNotWithPermission
@@ -333,6 +348,10 @@ getValuesByQueryNotWithPermission
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
 
 
 getHandsOnList
@@ -410,6 +429,10 @@ getExcelValues
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
   )
   UNION ALL
   (
@@ -462,6 +485,10 @@ getExcelValues
   @if(!isEmpty(trainingData)){
   and t.training_data =#trainingData#
   @}
+  @if(!isEmpty(handsOnStatus)){
+  and t.hands_on_status =#handsOnStatus#
+  @}
+
   )
   )t