上下架状态

beetlsql3-dev
Mlxa0324 2 years ago
parent 82cbfaa0e6
commit 62a3c6dfef

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1669378943" Name="cjks" Objects="1324" Symbols="102" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1669384084" Name="cjks" Objects="1313" Symbols="102" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -8125,9 +8125,9 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>question_status</a:Code>
<a:CreationDate>1662454965</a:CreationDate>
<a:Creator>87966</a:Creator>
<a:ModificationDate>1662455009</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<a:Comment>题目状态 1上架 0下架)</a:Comment>
<a:ModificationDate>1669384084</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>题目状态 1上架 2下架)</a:Comment>
<a:DataType>int(2)</a:DataType>
<a:Length>2</a:Length>
</o:Column>
@ -15239,23 +15239,23 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
<o:Column Id="o842">
<a:ObjectID>60663C2F-F168-474B-ADF3-E7B33A2F988D</a:ObjectID>
<a:Name>teacher_open_coursel_question_log_finish_time</a:Name>
<a:Code>teacher_open_coursel_question_log_finish_time</a:Code>
<a:Name>teacher_open_course_question_log_finish_time</a:Name>
<a:Code>teacher_open_course_question_log_finish_time</a:Code>
<a:CreationDate>1669368627</a:CreationDate>
<a:Creator>87966</a:Creator>
<a:ModificationDate>1669368815</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<a:ModificationDate>1669379179</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>总用时(分钟)</a:Comment>
<a:DataType>int(10)</a:DataType>
<a:Length>10</a:Length>
</o:Column>
<o:Column Id="o843">
<a:ObjectID>4BC2D7D7-7857-44E5-BAE6-8A0BFDC40F52</a:ObjectID>
<a:Name>teacher_open_coursel_question_log_reply</a:Name>
<a:Code>teacher_open_coursel_question_log_reply</a:Code>
<a:Name>teacher_open_course_question_log_reply</a:Name>
<a:Code>teacher_open_course_question_log_reply</a:Code>
<a:CreationDate>1669377940</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1669378943</a:ModificationDate>
<a:ModificationDate>1669379179</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>评语</a:Comment>
<a:DataType>varchar(300)</a:DataType>
@ -18798,9 +18798,9 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>question_status</a:Code>
<a:CreationDate>1662454965</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1666665914</a:ModificationDate>
<a:ModificationDate>1669384002</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>题目状态 1上架 0下架)</a:Comment>
<a:Comment>题目状态 1上架 2下架)</a:Comment>
<a:DataType>int(2)</a:DataType>
<a:Length>2</a:Length>
</o:Column>
@ -20319,8 +20319,8 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>general_question_log</a:Code>
<a:CreationDate>1661850632</a:CreationDate>
<a:Creator>87966</a:Creator>
<a:ModificationDate>1669368784</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<a:ModificationDate>1669379147</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>题库-通用做题日志</a:Comment>
<a:PhysicalOptions>auto_increment = 1
ENGINE = InnoDB
@ -20599,6 +20599,18 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Length>10</a:Length>
</o:Column>
<o:Column Id="o1247">
<a:ObjectID>395C42AB-21B4-4976-8D53-87DF5239A093</a:ObjectID>
<a:Name>general_question_log_reply</a:Name>
<a:Code>general_question_log_reply</a:Code>
<a:CreationDate>1669377940</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1669379147</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>评语</a:Comment>
<a:DataType>varchar(300)</a:DataType>
<a:Length>300</a:Length>
</o:Column>
<o:Column Id="o1248">
<a:ObjectID>11D6D866-4DA8-4809-B745-7AA3BF3EADAE</a:ObjectID>
<a:Name>org_id</a:Name>
<a:Code>org_id</a:Code>
@ -20609,7 +20621,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>组织ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o1248">
<o:Column Id="o1249">
<a:ObjectID>B38AFA20-818B-4CD0-848F-A59321046966</a:ObjectID>
<a:Name>user_id</a:Name>
<a:Code>user_id</a:Code>
@ -20622,7 +20634,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o1249">
<o:Key Id="o1250">
<a:ObjectID>386DB55A-A062-48CB-B4CC-ADD85A91F9AC</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
@ -20636,7 +20648,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o1249"/>
<o:Key Ref="o1250"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o214">
@ -20654,7 +20666,7 @@ DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o1250">
<o:Column Id="o1251">
<a:ObjectID>39A6804B-6E7A-4D91-8F1F-6B5EFDE21FF5</a:ObjectID>
<a:Name>resources_question_snapshot_id</a:Name>
<a:Code>resources_question_snapshot_id</a:Code>
@ -20666,7 +20678,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>bigint</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o1251">
<o:Column Id="o1252">
<a:ObjectID>02A49D77-FD2B-4794-A48B-0300B45DCB40</a:ObjectID>
<a:Name>teacher_open_course_question_setting_id</a:Name>
<a:Code>teacher_open_course_question_setting_id</a:Code>
@ -20683,7 +20695,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</a:ExtendedAttributesText>
</o:Column>
<o:Column Id="o1252">
<o:Column Id="o1253">
<a:ObjectID>69104412-A8D5-4DD1-B8CF-E2C9A83E136D</a:ObjectID>
<a:Name>teacher_open_course_merge_course_info_id</a:Name>
<a:Code>teacher_open_course_merge_course_info_id</a:Code>
@ -20694,7 +20706,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>开课课程ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o1253">
<o:Column Id="o1254">
<a:ObjectID>5BCDFAD9-4FD0-4107-A53B-01E6531DCFA1</a:ObjectID>
<a:Name>teacher_open_course_merge_resources_question_id</a:Name>
<a:Code>teacher_open_course_merge_resources_question_id</a:Code>
@ -20705,7 +20717,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>开课题目ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o1254">
<o:Column Id="o1255">
<a:ObjectID>0A87201F-FAD9-402E-B8DC-FAF6EB1765D0</a:ObjectID>
<a:Name>question_type</a:Name>
<a:Code>question_type</a:Code>
@ -20717,7 +20729,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>int(2)</a:DataType>
<a:Length>2</a:Length>
</o:Column>
<o:Column Id="o1255">
<o:Column Id="o1256">
<a:ObjectID>677C9DAC-C722-4904-A2C9-1EB399D5218C</a:ObjectID>
<a:Name>question_score</a:Name>
<a:Code>question_score</a:Code>
@ -20730,7 +20742,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Length>3</a:Length>
<a:Precision>1</a:Precision>
</o:Column>
<o:Column Id="o1256">
<o:Column Id="o1257">
<a:ObjectID>DD9E5A9D-7BDB-4D44-B8A5-8B0AC314D34D</a:ObjectID>
<a:Name>question_stem</a:Name>
<a:Code>question_stem</a:Code>
@ -20742,7 +20754,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(3000)</a:DataType>
<a:Length>3000</a:Length>
</o:Column>
<o:Column Id="o1257">
<o:Column Id="o1258">
<a:ObjectID>D20793CA-7DD3-47B7-A1D7-E2B1F7021DCE</a:ObjectID>
<a:Name>question_option_a</a:Name>
<a:Code>question_option_a</a:Code>
@ -20754,7 +20766,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(1000)</a:DataType>
<a:Length>1000</a:Length>
</o:Column>
<o:Column Id="o1258">
<o:Column Id="o1259">
<a:ObjectID>DAD2CDC4-7174-44A1-A529-5B4A004252E4</a:ObjectID>
<a:Name>question_option_b</a:Name>
<a:Code>question_option_b</a:Code>
@ -20766,7 +20778,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(1000)</a:DataType>
<a:Length>1000</a:Length>
</o:Column>
<o:Column Id="o1259">
<o:Column Id="o1260">
<a:ObjectID>68EED31B-EC20-4CDD-A96F-B6CF1D178EB8</a:ObjectID>
<a:Name>question_option_c</a:Name>
<a:Code>question_option_c</a:Code>
@ -20778,7 +20790,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(1000)</a:DataType>
<a:Length>1000</a:Length>
</o:Column>
<o:Column Id="o1260">
<o:Column Id="o1261">
<a:ObjectID>4A69D888-725C-4CC0-8373-9521D5CC4E49</a:ObjectID>
<a:Name>question_option_d</a:Name>
<a:Code>question_option_d</a:Code>
@ -20790,7 +20802,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(1000)</a:DataType>
<a:Length>1000</a:Length>
</o:Column>
<o:Column Id="o1261">
<o:Column Id="o1262">
<a:ObjectID>C09DA36C-A8FC-43E0-8E5D-8E8C8BE1D743</a:ObjectID>
<a:Name>question_option_e</a:Name>
<a:Code>question_option_e</a:Code>
@ -20802,7 +20814,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(1000)</a:DataType>
<a:Length>1000</a:Length>
</o:Column>
<o:Column Id="o1262">
<o:Column Id="o1263">
<a:ObjectID>49BB11AB-A2BC-4085-83DF-644BBC6C0C2F</a:ObjectID>
<a:Name>question_answer</a:Name>
<a:Code>question_answer</a:Code>
@ -20814,7 +20826,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(255)</a:DataType>
<a:Length>255</a:Length>
</o:Column>
<o:Column Id="o1263">
<o:Column Id="o1264">
<a:ObjectID>FAA952B2-8E5A-4B5F-94B6-CFE9342FF907</a:ObjectID>
<a:Name>question_analysis</a:Name>
<a:Code>question_analysis</a:Code>
@ -20826,7 +20838,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>varchar(3000)</a:DataType>
<a:Length>3000</a:Length>
</o:Column>
<o:Column Id="o1264">
<o:Column Id="o1265">
<a:ObjectID>39B138ED-302A-4E85-B5EA-FCA4D9F9419B</a:ObjectID>
<a:Name>question_status</a:Name>
<a:Code>question_status</a:Code>
@ -20838,7 +20850,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:DataType>int(2)</a:DataType>
<a:Length>2</a:Length>
</o:Column>
<o:Column Id="o1265">
<o:Column Id="o1266">
<a:ObjectID>64349822-0B1C-4724-8A2B-AE5C00EAA1B7</a:ObjectID>
<a:Name>user_id</a:Name>
<a:Code>user_id</a:Code>
@ -20849,7 +20861,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Comment>后台用户ID</a:Comment>
<a:DataType>bigint</a:DataType>
</o:Column>
<o:Column Id="o1266">
<o:Column Id="o1267">
<a:ObjectID>7288340A-31D4-41EE-A50B-3D6222788DAE</a:ObjectID>
<a:Name>org_id</a:Name>
<a:Code>org_id</a:Code>
@ -20862,7 +20874,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o1267">
<o:Key Id="o1268">
<a:ObjectID>82785AC1-607C-4D7F-94A4-FE2830EF2280</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
@ -20871,17 +20883,17 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:ModificationDate>1669344473</a:ModificationDate>
<a:Modifier>87966</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o1250"/>
<o:Column Ref="o1251"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o1267"/>
<o:Key Ref="o1268"/>
</c:PrimaryKey>
</o:Table>
</c:Tables>
<c:DefaultGroups>
<o:Group Id="o1268">
<o:Group Id="o1269">
<a:ObjectID>BFEA4109-96F9-4074-AF58-B84D6574A7FC</a:ObjectID>
<a:Name>PUBLIC</a:Name>
<a:Code>PUBLIC</a:Code>
@ -20892,7 +20904,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Group>
</c:DefaultGroups>
<c:ChildTraceabilityLinks>
<o:ExtendedDependency Id="o1269">
<o:ExtendedDependency Id="o1270">
<a:ObjectID>ABEFC813-1056-4507-A9A7-809C149B4ABE</a:ObjectID>
<a:CreationDate>1661954753</a:CreationDate>
<a:Creator>lx</a:Creator>
@ -21180,7 +21192,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:ExtendedDependency>
</c:ChildTraceabilityLinks>
<c:TargetModels>
<o:TargetModel Id="o1270">
<o:TargetModel Id="o1271">
<a:ObjectID>5963E417-B2CE-431D-988A-B3493AAE5EE4</a:ObjectID>
<a:Name>MySQL 5.0</a:Name>
<a:Code>MYSQL50</a:Code>

@ -196,7 +196,7 @@ create table teacher_open_course_merge_resources_question
question_option_e varchar(1000) comment '选项E',
question_answer varchar(255) comment '答案(单选是一个 多选是多个 判断是对错)',
question_analysis varchar(3000) comment '解析',
question_status int(2) comment '题目状态 1上架 0下架)',
question_status int(2) comment '题目状态 1上架 2下架)',
user_id bigint comment '后台用户ID',
org_id bigint comment '组织机构ID',
primary key (teacher_open_course_merge_resources_question_id)

@ -27445,7 +27445,7 @@ CREATE TABLE `resources_question` (
`question_option_e` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项E',
`question_answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '答案(单选是一个 多选是多个 判断是对错)',
`question_analysis` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解析',
`question_status` int(11) NULL DEFAULT NULL COMMENT '题目状态 1上架 0下架)',
`question_status` int(11) NULL DEFAULT NULL COMMENT '题目状态 1上架 2下架)',
`org_id` bigint(20) NULL DEFAULT NULL COMMENT '组织机构ID',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '后台用户ID',
PRIMARY KEY (`resources_question_id`) USING BTREE

@ -71,7 +71,7 @@ public class TeacherOpenCourseMergeResourcesQuestion extends BaseEntity{
private String questionAnalysis ;
//题目状态 1上架 0下架)
//题目状态 1上架 2下架)
@Dict(type="up_status")
private Integer questionStatus ;
@ -243,13 +243,13 @@ public class TeacherOpenCourseMergeResourcesQuestion extends BaseEntity{
this.questionAnalysis = questionAnalysis;
}
/** 1 0
/** 1 2
*@return
*/
public Integer getQuestionStatus(){
return questionStatus;
}
/** 1 0
/** 1 2
*@param questionStatus
*/
public void setQuestionStatus(Integer questionStatus){

@ -39,7 +39,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.*;
import java.math.BigDecimal;
import java.util.*;
@ -96,6 +98,21 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
}
}
/**
*
* @param ids
*/
public void batchEditUpDownStatus(@NotEmpty(message = "题目IDs不能为空") String ids, @Pattern(regexp = "[12]") Integer questionStatus){
try {
TeacherOpenCourseMergeResourcesQuestionQuery query = new TeacherOpenCourseMergeResourcesQuestionQuery();
query.setTeacherOpenCourseMergeResourcesQuestionIdPlural(ids);
query.setQuestionStatus(questionStatus);
teacherOpenCourseMergeResourcesQuestionDao.updateGivenByIds(query);
} catch (Exception e) {
throw new PlatformException("批量删除开课题目拉取失败", e);
}
}
public String addAll(TeacherOpenCourseMergeResourcesQuestionQuery teacherOpenCourseMergeResourcesQuestionQuery){
String msg = "";
List<TeacherOpenCourseMergeResourcesQuestion> teacherOpenCourseMergeResourcesQuestionList = new ArrayList<>();

@ -35,6 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.Pattern;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
@ -209,6 +210,15 @@ public class TeacherOpenCourseMergeResourcesQuestionController{
}
@PostMapping(MODEL + "/editStatus.json")
@Function("teacherOpenCourseMergeResourcesQuestion.edit")
@ResponseBody
public JsonResult batchEditUpDownStatus(String ids, @Pattern(regexp = "[12]") Integer status) {
teacherOpenCourseMergeResourcesQuestionService.batchEditUpDownStatus(ids, status);
return JsonResult.success();
}
//下载模板信息
@GetMapping(MODEL + "/downloadTemplate.json")
public void download(HttpServletRequest request,HttpServletResponse response,@SCoreUser CoreUser coreUser) {

@ -37,7 +37,7 @@ public class ResourcesQuestionQuery extends PageParam {
private String questionAnswer;
@Query(name = "解析", display = false)
private String questionAnalysis;
@Query(name = "题目状态1上架0下架)", display = false, type = TYPE_DICT,dict= CoreDictType.UP_STATUS)
@Query(name = "题目状态1上架2下架)", display = false, type = TYPE_DICT,dict= CoreDictType.UP_STATUS)
private Integer questionStatus;
@Query(name = "组织机构ID", display = false)
private Long orgId;

@ -39,7 +39,7 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
private String questionAnswer;
@Query(name = "解析", display = false)
private String questionAnalysis;
@Query(name = "题目状态 1上架 0下架)", display = true,type=Query.TYPE_DICT,dict="up_status")
@Query(name = "题目状态 1上架 2下架)", display = true,type=Query.TYPE_DICT,dict="up_status")
private Integer questionStatus;
@Query(name = "后台用户ID", display = false)
private Long userId;

@ -171,8 +171,6 @@ deleteTeacherOpenCourseMergeResourcesQuestionByIds
delete from teacher_open_course_merge_resources_question where find_in_set(teacher_open_course_merge_resources_question_id,#ids#)
getByIds
===

@ -127,7 +127,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
},
{
field : 'questionStatusText', //数据字典类型为 up_status
title : '题目状态 1上架 0下架)',
title : '题目状态 1上架 2下架)',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['questionStatusText'])?false:sx_['questionStatusText'],

@ -102,7 +102,7 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">题目状态 1上架 0下架)</label>
<label class="layui-form-label">题目状态 1上架 2下架)</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="up_status"
id="questionStatus" name="questionStatus" value="${teacherOpenCourseMergeResourcesQuestion.questionStatus}" layVerify="" />

@ -102,7 +102,7 @@
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">题目状态 1上架 0下架)</label>
<label class="layui-form-label">题目状态 1上架 2下架)</label>
<div class="layui-input-inline">
<layui:simpleDictSelect style='layui-input-inline' type="up_status"
id="questionStatus" name="questionStatus" value="${teacherOpenCourseMergeResourcesQuestion.questionStatus}" layVerify="" />

Loading…
Cancel
Save