فهرست منبع

考核答题端,增加关键字搜索

dzx 1 سال پیش
والد
کامیت
86949af870

+ 9 - 0
src/main/resources/mapper/assessment/AssessmentTemplatePlanMapper.xml

@@ -14,6 +14,9 @@
         <if test="dto.assessmentTemplateName != null and dto.assessmentTemplateName != ''">
             and t2.name like concat('%', #{dto.assessmentTemplateName}, '%')
         </if>
+        <if test="dto.keyword != null and dto.keyword != ''">
+            and (t2.name like concat('%', #{dto.keyword}, '%') or t1.name like concat('%', #{dto.keyword}, '%'))
+        </if>
         <if test="dto.assessmentTemplateId != null">
             and t2.id = #{dto.assessmentTemplateId}
         </if>
@@ -35,6 +38,9 @@
         <if test="dto.assessmentTemplateName != null and dto.assessmentTemplateName != ''">
             and t2.name like concat('%', #{dto.assessmentTemplateName}, '%')
         </if>
+        <if test="dto.keyword != null and dto.keyword != ''">
+            and (t2.name like concat('%', #{dto.keyword}, '%') or t1.name like concat('%', #{dto.keyword}, '%'))
+        </if>
         <if test="dto.assessmentTemplateId != null">
             and t2.id = #{dto.assessmentTemplateId}
         </if>
@@ -65,6 +71,9 @@
         <if test="dto.assessmentTemplateName != null and dto.assessmentTemplateName != ''">
             and t2.name like concat('%', #{dto.assessmentTemplateName}, '%')
         </if>
+        <if test="dto.keyword != null and dto.keyword != ''">
+            and (t2.name like concat('%', #{dto.keyword}, '%') or t1.name like concat('%', #{dto.keyword}, '%'))
+        </if>
         <if test="dto.assessmentTemplateId != null">
             and t2.id = #{dto.assessmentTemplateId}
         </if>

+ 5 - 1
src/main/resources/sqlScript/20210328_sql.sql

@@ -235,10 +235,14 @@ CREATE TABLE `assessment_plan_answer_result` (
   `enabled_mark` INT DEFAULT NULL,
   `student_user_id` BIGINT DEFAULT NULL COMMENT '学生id',
   `question_id` BIGINT DEFAULT NULL COMMENT '选项id(assessment_plan_question[category=2的id])',
-  `answer_id` varchar(40) DEFAULT NULL COMMENT '选项id(assessment_plan_question[category=3的id])',
+  `answer_id` VARCHAR(40) DEFAULT NULL COMMENT '选项id(assessment_plan_question[category=3的id])',
   `assessment_template_plan_id` BIGINT DEFAULT NULL COMMENT '考核计划id(assessment_template_plan)',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='考核答题结果';
 
+DROP TABLE IF EXISTS day_time_select;
+CREATE TABLE `day_time_select` (
+  `time` DOUBLE DEFAULT NULL
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;