Commit 7ce6b368 authored by luzhuang's avatar luzhuang

更新代码

parent 2cbf362f
......@@ -203,6 +203,7 @@ public class BChapterServiceImpl implements BChapterService {
if (model.getIsTest() == null || model.getIsTest().equals("")) {
model.setIsTest("");
}
model.setIsTest(dto.getType());
int sort = bChapterRepository.selectMaxSort(model.getPid(), model.getLessonId());
model.setSort(sort);
......@@ -214,7 +215,7 @@ public class BChapterServiceImpl implements BChapterService {
line = bChapterRepository.insertSelective(model);
} else {
model.setClassHour("1");
model.setCourseTime(dto.getFileTime());
model.setCourseTime(dto.getFileTime().substring(0,dto.getFileTime().lastIndexOf(".")));
// model.setCorpId(corpId);
bFile.setChapterId(model.getBusinessId());
bFile.setLessonId(model.getLessonId());
......@@ -234,10 +235,11 @@ public class BChapterServiceImpl implements BChapterService {
}
} else {
UserUtil.setCurrentMergeOperation(model);
bFile.setChapterId(model.getBusinessId());
UserUtil.setCurrentMergeOperation(bFile);
model.setCourseTime(dto.getFileTime());
model.setIsTest(dto.getType());
model.setCourseTime(dto.getFileTime().substring(0,dto.getFileTime().lastIndexOf(".")));
//先判断该课程的第一章的第一节是否是本节 更新blesson表中course_time字段
String cid = bChapterRepository.getFirstChapter(model.getLessonId());
if (cid.equals(model.getBusinessId())) {
......
......@@ -51,7 +51,7 @@ public interface BFileRepository extends BaseMapper<BFile> {
"VALUES (#{businessId}, #{lessonId}, #{chapterId}, #{fileName}, #{videoUrl}, #{fileUrl}, #{type}, #{flag}, #{delFlag}, #{remarks}, #{createBy}, #{updateBy}, #{updateDate}, #{createDate},#{fileSize})")
int insertUploadFile(BFile bFile);
@Update("update b_file set file_name = #{fileName} , video_url = #{videoUrl} , type = #{type} " +
@Update("update b_file set file_name = #{fileName} , video_url = #{videoUrl} , type = #{type} ,file_size = #{fileSize}" +
"where chapter_id =#{chapterId}")
int updateUploadFile(BFile bFile);
......
......@@ -61,7 +61,7 @@ public class BLabelController extends PaginationController<BLabel> {
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bLabel.getBusinessId());
bLabel);
}
@ApiOperation(value="504 添加新标签", notes="根据businessId插入新标签")
......@@ -73,7 +73,7 @@ public class BLabelController extends PaginationController<BLabel> {
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
null);
bLabel);
}
@ApiOperation(value="505 根据条件查询", notes="根据条件查询标签")
......
......@@ -20,7 +20,7 @@ import javax.validation.constraints.NotNull;
public class BLabel extends IdEntity<BLabel> {
/*标签名称*/
@Length(min = 1,max = 64,message = "标签名称过长")
@Length(min = 0,max = 64,message = "标签名称过长")
private String lName;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment