导入课程

beetlsql3-dev
Mlxa0324 2 years ago
parent b4076b046a
commit 33dc4c6697

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1667490172" Name="cjks" Objects="1209" Symbols="95" 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="1667530821" Name="cjks" Objects="1198" Symbols="97" 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">
@ -6459,9 +6459,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o192">
<a:CreationDate>1666665914</a:CreationDate>
<a:ModificationDate>1667489911</a:ModificationDate>
<a:ModificationDate>1667490922</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((437116,35095), (460780,50843))</a:Rect>
<a:Rect>((416389,31906), (440053,47654))</a:Rect>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
<a:ShadowColor>12632256</a:ShadowColor>
@ -6484,9 +6484,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o194">
<a:CreationDate>1666667664</a:CreationDate>
<a:ModificationDate>1667489911</a:ModificationDate>
<a:ModificationDate>1667490922</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((436750,16029), (458868,33427))</a:Rect>
<a:Rect>((416023,12840), (438141,30238))</a:Rect>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
<a:ShadowColor>12632256</a:ShadowColor>
@ -6563,9 +6563,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o200">
<a:CreationDate>1667489810</a:CreationDate>
<a:ModificationDate>1667489812</a:ModificationDate>
<a:ModificationDate>1667490922</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((270783,-11844), (294061,-2698))</a:Rect>
<a:Rect>((415742,2904), (439020,12050))</a:Rect>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
<a:ShadowColor>12632256</a:ShadowColor>
@ -18642,7 +18642,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_open_course_merge_course_info_id</a:Code>
<a:CreationDate>1623836619</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1666667754</a:ModificationDate>
<a:ModificationDate>1667530821</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>课程ID</a:Comment>
<a:DataType>bigint</a:DataType>
@ -19330,7 +19330,7 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_open_course_merge_course_info_id</a:Code>
<a:CreationDate>1623836619</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1667490172</a:ModificationDate>
<a:ModificationDate>1667530809</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>开课课程ID</a:Comment>
<a:DataType>bigint</a:DataType>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{BA33ABB7-B246-4DB0-85DE-396EDDB46458}" Label="" LastModificationDate="1667490962" Name="cjks" Objects="1209" Symbols="95" 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="1667530830" Name="cjks" Objects="1198" Symbols="97" 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">
@ -18638,11 +18638,11 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
<o:Column Id="o1095">
<a:ObjectID>0DD959C7-FA19-44D6-BC67-F640AF0BA2D6</a:ObjectID>
<a:Name>course_info_id</a:Name>
<a:Code>course_info_id</a:Code>
<a:Name>teacher_open_course_merge_course_info_id</a:Name>
<a:Code>teacher_open_course_merge_course_info_id</a:Code>
<a:CreationDate>1623836619</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1667490940</a:ModificationDate>
<a:ModificationDate>1667530821</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>课程ID</a:Comment>
<a:DataType>bigint</a:DataType>
@ -19299,9 +19299,9 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
<a:Code>teacher_open_course_merge_resources_info</a:Code>
<a:CreationDate>1563157584</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1667489911</a:ModificationDate>
<a:ModificationDate>1667530830</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>开课关联- 资源管理</a:Comment>
<a:Comment>开课关联- 资源管理-离线</a:Comment>
<a:PhysicalOptions>auto_increment = 1
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
@ -19326,11 +19326,11 @@ COLLATE = utf8_general_ci</a:PhysicalOptions>
</o:Column>
<o:Column Id="o1146">
<a:ObjectID>5AAF2FCF-A045-49C3-961F-9F8886D7DAD4</a:ObjectID>
<a:Name>course_info_id</a:Name>
<a:Code>course_info_id</a:Code>
<a:Name>teacher_open_course_merge_course_info_id</a:Name>
<a:Code>teacher_open_course_merge_course_info_id</a:Code>
<a:CreationDate>1623836619</a:CreationDate>
<a:Creator>lx</a:Creator>
<a:ModificationDate>1667490962</a:ModificationDate>
<a:ModificationDate>1667530809</a:ModificationDate>
<a:Modifier>lx</a:Modifier>
<a:Comment>开课课程ID</a:Comment>
<a:DataType>bigint</a:DataType>

@ -185,7 +185,7 @@ create table teacher_open_course_merge_resources_question
(
teacher_open_course_merge_resources_question_id bigint unsigned not null comment 'ID',
teacher_open_course_id bigint comment '开课ID',
course_info_id bigint comment '课程ID',
teacher_open_course_merge_course_info_id bigint comment '开课课程ID',
question_type int(2) comment '题型(1单选 2多选 3判断)',
question_score decimal(3,1) comment '分值',
question_stem varchar(3000) comment '题干',
@ -335,7 +335,7 @@ drop table if exists teacher_open_course_merge_resources_info;
create table teacher_open_course_merge_resources_info
(
teacher_open_course_merge_resources_info_id bigint unsigned not null auto_increment comment 'ID',
course_info_id bigint comment '开课课程ID',
teacher_open_course_merge_course_info_id bigint comment '开课课程ID',
teacher_open_course_id bigint comment '教师开课ID',
resources_info_name varchar(255) comment '资源名称',
resources_info_type int(2) comment '资源类型 数据字典resources_info_type',
@ -349,4 +349,4 @@ create table teacher_open_course_merge_resources_info
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
alter table teacher_open_course_merge_resources_info comment '开课关联- 资源管理';
alter table teacher_open_course_merge_resources_info comment '开课关联- 资源管理-离线';

@ -23,7 +23,7 @@ public class TeacherOpenCourseMergeResourcesInfo extends BaseEntity{
//开课课程ID
@Dict(type="TEACHER_OPEN_COURSE_MERGE_COURSE_INFO.course_info_name.course_info_status=1")
private Long courseInfoId ;
private Long teacherOpenCourseMergeCourseInfoId ;
//教师开课ID
@Dict(type="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
@ -67,19 +67,6 @@ public class TeacherOpenCourseMergeResourcesInfo extends BaseEntity{
this.teacherOpenCourseMergeResourcesInfoId = teacherOpenCourseMergeResourcesInfoId;
}
/**ID
*@return
*/
public Long getCourseInfoId(){
return courseInfoId;
}
/**ID
*@param courseInfoId
*/
public void setCourseInfoId(Long courseInfoId){
this.courseInfoId = courseInfoId;
}
/**ID
*@return
*/
@ -159,4 +146,11 @@ public class TeacherOpenCourseMergeResourcesInfo extends BaseEntity{
}
public Long getTeacherOpenCourseMergeCourseInfoId() {
return teacherOpenCourseMergeCourseInfoId;
}
public void setTeacherOpenCourseMergeCourseInfoId(Long teacherOpenCourseMergeCourseInfoId) {
this.teacherOpenCourseMergeCourseInfoId = teacherOpenCourseMergeCourseInfoId;
}
}

@ -29,7 +29,7 @@ public class TeacherOpenCourseMergeResourcesQuestion extends BaseEntity{
//课程章节ID
@Dict(type="teacher_open_course_merge_course_info.course_info_name.course_info_status=1")
private Long courseInfoId ;
private Long teacherOpenCourseMergeCourseInfoId ;
//题型(1单选 2多选 3判断 4填空 5分析)
@ -282,12 +282,11 @@ public class TeacherOpenCourseMergeResourcesQuestion extends BaseEntity{
this.orgId = orgId;
}
public Long getCourseInfoId() {
return courseInfoId;
public Long getTeacherOpenCourseMergeCourseInfoId() {
return teacherOpenCourseMergeCourseInfoId;
}
public void setCourseInfoId(Long courseInfoId) {
this.courseInfoId = courseInfoId;
public void setTeacherOpenCourseMergeCourseInfoId(Long teacherOpenCourseMergeCourseInfoId) {
this.teacherOpenCourseMergeCourseInfoId = teacherOpenCourseMergeCourseInfoId;
}
}

@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.stream.CollectorUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON;
@ -416,7 +417,11 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
// 将课程本身添加进集合
chapterList.add(currentCourseInfo);
// 拷贝
// 先根据ID清楚现有的课程章节小节这个表
String delCourseInfoIds = chapterList.stream().map(CourseInfo::getCourseInfoId).collect(CollectorUtil.joining(","));
deleteTeacherOpenCourseMergeCourseInfo(delCourseInfoIds);
// 拷贝部分字段映射
CopyOptions copyOptions = CopyOptions.create().setFieldMapping(MapUtil.of("courseInfoId", "teacherOpenCourseMergeCourseInfoId"));
List<TeacherOpenCourseMergeCourseInfo> copyToList =
BeanUtil.copyToList(chapterList, TeacherOpenCourseMergeCourseInfo.class, copyOptions);

@ -1,6 +1,8 @@
package com.ibeetl.jlw.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON;
@ -251,13 +253,13 @@ public class TeacherOpenCourseMergeResourcesInfoService extends CoreBaseService<
continue;
}
String courseInfoId = getCellFormatValue(row.getCell(map.get(columns[0])));
String teacherOpenCourseMergeCourseInfoId = getCellFormatValue(row.getCell(map.get(columns[0])));
String teacherOpenCourseId = getCellFormatValue(row.getCell(map.get(columns[1])));
String resourcesInfoName = getCellFormatValue(row.getCell(map.get(columns[2])));
String resourcesInfoType = getCellFormatValue(row.getCell(map.get(columns[3])));
String resourcesInfoContent = getCellFormatValue(row.getCell(map.get(columns[4])));
//TODO 判断(如重复等复杂判断要额外写)
if(StringUtils.isBlank(courseInfoId)){
if(StringUtils.isBlank(teacherOpenCourseMergeCourseInfoId)){
errMsg.add(new String[]{"第"+ToolUtils.numberToLetter(map.get(columns[0])+1)+"列,第"+(i+1)+"行开课课程为空"});
continue;
}else
@ -280,7 +282,7 @@ public class TeacherOpenCourseMergeResourcesInfoService extends CoreBaseService<
{
//TODO 保存
TeacherOpenCourseMergeResourcesInfo teacherOpenCourseMergeResourcesInfo = new TeacherOpenCourseMergeResourcesInfo();
teacherOpenCourseMergeResourcesInfo.setCourseInfoId(Long.parseLong(courseInfoId));
teacherOpenCourseMergeResourcesInfo.setTeacherOpenCourseMergeCourseInfoId(Long.parseLong(teacherOpenCourseMergeCourseInfoId));
teacherOpenCourseMergeResourcesInfo.setTeacherOpenCourseId(Long.parseLong(teacherOpenCourseId));
teacherOpenCourseMergeResourcesInfo.setResourcesInfoName(resourcesInfoName);
teacherOpenCourseMergeResourcesInfo.setResourcesInfoType(Integer.parseInt(resourcesInfoType));
@ -324,7 +326,10 @@ public class TeacherOpenCourseMergeResourcesInfoService extends CoreBaseService<
List<ResourcesInfo> resourcesInfoList = resourcesInfoService.getValuesByQuery(resourcesInfoQuery);
if (ObjectUtil.isEmpty(resourcesInfoList)) { return; }
List<TeacherOpenCourseMergeResourcesInfo> copyToList = BeanUtil.copyToList(resourcesInfoList, TeacherOpenCourseMergeResourcesInfo.class);
// 拷贝部分字段映射
CopyOptions copyOptions = CopyOptions.create().setFieldMapping(MapUtil.of("courseInfoId", "teacherOpenCourseMergeCourseInfoId"));
List<TeacherOpenCourseMergeResourcesInfo> copyToList =
BeanUtil.copyToList(resourcesInfoList, TeacherOpenCourseMergeResourcesInfo.class, copyOptions);
copyToList.forEach(item -> item.setTeacherOpenCourseId(teacherOpenCourseId));
// 批量插入资源和开课关联表

@ -1,6 +1,8 @@
package com.ibeetl.jlw.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON;
@ -15,6 +17,7 @@ import com.ibeetl.jlw.dao.TeacherOpenCourseMergeResourcesQuestionDao;
import com.ibeetl.jlw.entity.FileEntity;
import com.ibeetl.jlw.entity.ResourcesQuestion;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeResourcesQuestion;
import com.ibeetl.jlw.web.query.ResourcesQuestionQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeResourcesQuestionQuery;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -260,7 +263,7 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
}
String teacherOpenCourseId = getCellFormatValue(row.getCell(map.get(columns[0])));
String courseInfoId = getCellFormatValue(row.getCell(map.get(columns[1])));
String teacherOpenCourseMergeCourseInfoId = getCellFormatValue(row.getCell(map.get(columns[1])));
String questionType = getCellFormatValue(row.getCell(map.get(columns[2])));
String questionScore = getCellFormatValue(row.getCell(map.get(columns[3])));
String questionStem = getCellFormatValue(row.getCell(map.get(columns[4])));
@ -277,7 +280,7 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
errMsg.add(new String[]{"第"+ToolUtils.numberToLetter(map.get(columns[0])+1)+"列,第"+(i+1)+"行开课为空"});
continue;
}else
if(StringUtils.isBlank(courseInfoId)){
if(StringUtils.isBlank(teacherOpenCourseMergeCourseInfoId)){
errMsg.add(new String[]{"第"+ToolUtils.numberToLetter(map.get(columns[1])+1)+"列,第"+(i+1)+"行课程为空"});
continue;
}else
@ -329,7 +332,7 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
//TODO 保存
TeacherOpenCourseMergeResourcesQuestion teacherOpenCourseMergeResourcesQuestion = new TeacherOpenCourseMergeResourcesQuestion();
teacherOpenCourseMergeResourcesQuestion.setTeacherOpenCourseId(Long.parseLong(teacherOpenCourseId));
teacherOpenCourseMergeResourcesQuestion.setCourseInfoId(Long.parseLong(courseInfoId));
teacherOpenCourseMergeResourcesQuestion.setTeacherOpenCourseMergeCourseInfoId(Long.parseLong(teacherOpenCourseMergeCourseInfoId));
teacherOpenCourseMergeResourcesQuestion.setQuestionType(Integer.parseInt(questionType));
teacherOpenCourseMergeResourcesQuestion.setQuestionScore(new BigDecimal(questionScore));
teacherOpenCourseMergeResourcesQuestion.setQuestionStem(questionStem);
@ -379,11 +382,17 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
if (ObjectUtil.isEmpty(resourcesQuestionIds)) { return; }
// 题目ID集合
String ids = join(resourcesQuestionIds.toArray(), ",");
List<ResourcesQuestion> resourcesQuestions = resourcesQuestionDao.getByIds(ids);
ResourcesQuestionQuery resourcesQuestionQuery = new ResourcesQuestionQuery();
resourcesQuestionQuery.setResourcesQuestionIds(ids);
// 已上架的
resourcesQuestionQuery.setQuestionStatus(1);
List<ResourcesQuestion> resourcesQuestions = resourcesQuestionDao.getValuesByQuery(resourcesQuestionQuery);
// 拷贝部分字段映射
CopyOptions copyOptions = CopyOptions.create().setFieldMapping(MapUtil.of("courseInfoId", "teacherOpenCourseMergeCourseInfoId"));
// 拷贝
List<TeacherOpenCourseMergeResourcesQuestion> copyToList =
BeanUtil.copyToList(resourcesQuestions, TeacherOpenCourseMergeResourcesQuestion.class);
BeanUtil.copyToList(resourcesQuestions, TeacherOpenCourseMergeResourcesQuestion.class, copyOptions);
if (ObjectUtil.isEmpty(copyToList)) { return; }
// 设置开课ID

@ -15,7 +15,7 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
@Query(name = "ID", display = false)
private Long teacherOpenCourseMergeResourcesInfoId;
@Query(name = "开课课程ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course_merge_course_info.course_info_name.course_info_status=1")
private Long courseInfoId;
private Long teacherOpenCourseMergeCourseInfoId;
@Query(name = "教师开课ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
private Long teacherOpenCourseId;
@Query(name = "资源名称", display = false)
@ -30,7 +30,7 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
private Long userId;
private String teacherOpenCourseMergeResourcesInfoIdPlural;
private String courseInfoIdPlural;
private String teacherOpenCourseMergeCourseInfoIdPlural;
private String teacherOpenCourseIdPlural;
private String orgIdPlural;
private String userIdPlural;
@ -45,12 +45,6 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
public void setTeacherOpenCourseMergeResourcesInfoId(Long teacherOpenCourseMergeResourcesInfoId ){
this.teacherOpenCourseMergeResourcesInfoId = teacherOpenCourseMergeResourcesInfoId;
}
public Long getCourseInfoId(){
return courseInfoId;
}
public void setCourseInfoId(Long courseInfoId ){
this.courseInfoId = courseInfoId;
}
public Long getTeacherOpenCourseId(){
return teacherOpenCourseId;
}
@ -91,7 +85,7 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
public TeacherOpenCourseMergeResourcesInfo pojo(){
TeacherOpenCourseMergeResourcesInfo pojo = new TeacherOpenCourseMergeResourcesInfo();
pojo.setTeacherOpenCourseMergeResourcesInfoId(this.getTeacherOpenCourseMergeResourcesInfoId());
pojo.setCourseInfoId(this.getCourseInfoId());
pojo.setTeacherOpenCourseMergeCourseInfoId(this.getTeacherOpenCourseMergeResourcesInfoId());
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setResourcesInfoName(this.getResourcesInfoName());
pojo.setResourcesInfoType(this.getResourcesInfoType());
@ -107,12 +101,6 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
public void setTeacherOpenCourseMergeResourcesInfoIdPlural(String teacherOpenCourseMergeResourcesInfoIdPlural){
this.teacherOpenCourseMergeResourcesInfoIdPlural = teacherOpenCourseMergeResourcesInfoIdPlural;
}
public String getCourseInfoIdPlural(){
return courseInfoIdPlural;
}
public void setCourseInfoIdPlural(String courseInfoIdPlural){
this.courseInfoIdPlural = courseInfoIdPlural;
}
public String getTeacherOpenCourseIdPlural(){
return teacherOpenCourseIdPlural;
}
@ -143,4 +131,20 @@ public class TeacherOpenCourseMergeResourcesInfoQuery extends PageParam {
public void set_given(String _given) {
this._given = _given;
}
public Long getTeacherOpenCourseMergeCourseInfoId() {
return teacherOpenCourseMergeCourseInfoId;
}
public void setTeacherOpenCourseMergeCourseInfoId(Long teacherOpenCourseMergeCourseInfoId) {
this.teacherOpenCourseMergeCourseInfoId = teacherOpenCourseMergeCourseInfoId;
}
public String getTeacherOpenCourseMergeCourseInfoIdPlural() {
return teacherOpenCourseMergeCourseInfoIdPlural;
}
public void setTeacherOpenCourseMergeCourseInfoIdPlural(String teacherOpenCourseMergeCourseInfoIdPlural) {
this.teacherOpenCourseMergeCourseInfoIdPlural = teacherOpenCourseMergeCourseInfoIdPlural;
}
}

@ -18,7 +18,7 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
@Query(name = "开课ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
private Long teacherOpenCourseId;
@Query(name = "课程ID", display = true,type=Query.TYPE_DICT,dict="teacher_open_course_merge_course_info.course_info_name.course_info_status=1")
private Long courseInfoId;
private Long teacherOpenCourseMergeCourseInfoId;
@Query(name = "题型(1单选 2多选 3判断)", display = false)
private Integer questionType;
@Query(name = "分值", display = false)
@ -48,7 +48,7 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
private String teacherOpenCourseMergeResourcesQuestionIdPlural;
private String teacherOpenCourseIdPlural;
private String courseInfoIdPlural;
private String teacherOpenCourseMergeCourseInfoIdPlural;
private String questionTypePlural;
private String questionStatusPlural;
private String userIdPlural;
@ -153,7 +153,7 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
TeacherOpenCourseMergeResourcesQuestion pojo = new TeacherOpenCourseMergeResourcesQuestion();
pojo.setTeacherOpenCourseMergeResourcesQuestionId(this.getTeacherOpenCourseMergeResourcesQuestionId());
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setCourseInfoId(this.getCourseInfoId());
pojo.setTeacherOpenCourseMergeCourseInfoId(this.getTeacherOpenCourseMergeCourseInfoId());
pojo.setQuestionType(this.getQuestionType());
pojo.setQuestionScore(this.getQuestionScore());
pojo.setQuestionStem(this.getQuestionStem());
@ -219,19 +219,19 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
this._given = _given;
}
public Long getCourseInfoId() {
return courseInfoId;
public Long getTeacherOpenCourseMergeCourseInfoId() {
return teacherOpenCourseMergeCourseInfoId;
}
public void setCourseInfoId(Long courseInfoId) {
this.courseInfoId = courseInfoId;
public void setTeacherOpenCourseMergeCourseInfoId(Long teacherOpenCourseMergeCourseInfoId) {
this.teacherOpenCourseMergeCourseInfoId = teacherOpenCourseMergeCourseInfoId;
}
public String getCourseInfoIdPlural() {
return courseInfoIdPlural;
public String getTeacherOpenCourseMergeCourseInfoIdPlural() {
return teacherOpenCourseMergeCourseInfoIdPlural;
}
public void setCourseInfoIdPlural(String courseInfoIdPlural) {
this.courseInfoIdPlural = courseInfoIdPlural;
public void setTeacherOpenCourseMergeCourseInfoIdPlural(String teacherOpenCourseMergeCourseInfoIdPlural) {
this.teacherOpenCourseMergeCourseInfoIdPlural = teacherOpenCourseMergeCourseInfoIdPlural;
}
}

@ -16,11 +16,11 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -67,11 +67,11 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -126,11 +126,11 @@ updateGivenByIds
update teacher_open_course_merge_resources_info
set
@if(contain("courseInfoId",_given)){
@if(isEmpty(courseInfoId)){
@if(contain("teacherOpenCourseMergeCourseInfoId",_given)){
@if(isEmpty(teacherOpenCourseMergeCourseInfoId)){
course_info_id = null ,
@}else{
course_info_id = #courseInfoId# ,
course_info_id = #teacherOpenCourseMergeCourseInfoId# ,
@}
@}
@if(contain("teacherOpenCourseId",_given)){
@ -191,8 +191,8 @@ getTeacherOpenCourseMergeResourcesInfoValues
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoId)){
and t.teacher_open_course_merge_resources_info_id =#teacherOpenCourseMergeResourcesInfoId#
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -228,11 +228,11 @@ getValuesByQuery
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -277,11 +277,11 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -335,11 +335,11 @@ getExcelValues
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -385,11 +385,11 @@ getExcelValues
@if(!isEmpty(teacherOpenCourseMergeResourcesInfoIdPlural)){
and find_in_set(t.teacher_open_course_merge_resources_info_id,#teacherOpenCourseMergeResourcesInfoIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#

@ -22,11 +22,11 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -103,11 +103,11 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -193,11 +193,11 @@ updateGivenByIds
teacher_open_course_id = #teacherOpenCourseId# ,
@}
@}
@if(contain("courseInfoId",_given)){
@if(isEmpty(courseInfoId)){
@if(contain("teacherOpenCourseMergeCourseInfoId",_given)){
@if(isEmpty(teacherOpenCourseMergeCourseInfoId)){
course_info_id = null ,
@}else{
course_info_id = #courseInfoId# ,
course_info_id = #teacherOpenCourseMergeCourseInfoId# ,
@}
@}
@if(contain("questionType",_given)){
@ -310,8 +310,8 @@ getTeacherOpenCourseMergeResourcesQuestionValues
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -374,11 +374,11 @@ getValuesByQuery
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -453,11 +453,11 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -549,11 +549,11 @@ getExcelValues
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@ -637,11 +637,11 @@ getExcelValues
@if(!isEmpty(teacherOpenCourseIdPlural)){
and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#)
@}
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(courseInfoIdPlural)){
and find_in_set(t.course_info_id,#courseInfoIdPlural#)
@if(!isEmpty(teacherOpenCourseMergeCourseInfoIdPlural)){
and find_in_set(t.course_info_id,#teacherOpenCourseMergeCourseInfoIdPlural#)
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#

Loading…
Cancel
Save