Commit c02afc9b authored by zhangqingle's avatar zhangqingle

Merge branch 'meiteng' of ssh://103.249.252.28:10022/lcy/education into meiteng

parents e3fa1993 8c9e7660
......@@ -49,6 +49,9 @@ public class QueryChapterListResDTO {
@ApiModelProperty(value = "进度")
private String progress;
@ApiModelProperty(value = "最近进度")
private int currentLocation;
@ApiModelProperty(value = "id")
private String businessId;
......
......@@ -111,6 +111,7 @@ public class BChapterServiceImpl implements BChapterService {
List<BRStudentChapter> brStudentChapterList = brStudentChapterRepository.queryByStuIdAndChapter(childList.getBusinessId(), curUser.getUserId());
if (null != brStudentChapterList && brStudentChapterList.size() > 0) {
childList.setProgress(brStudentChapterList.get(0).getProgress()*100 + "%");
childList.setCurrentLocation(brStudentChapterList.get(0).getCurrentLocation());
percent += brStudentChapterList.get(0).getProgress();
}
i++;
......@@ -129,9 +130,6 @@ public class BChapterServiceImpl implements BChapterService {
map.put("chapterList", queryChapterListResDTOS);
map.put("totalProgress", df.format((float)percent/i) + "%");
map.put("lessonInfo", bLessonRepository.selectByPrimaryKey(lessonId)); // 课程信息
BLessonPerson bLessonPerson = bLessonPersonRepository.selectByPrimaryKey(lessonId);
if (null != bLessonPerson){
}
map.put("currentChapter", bChapterRepository.getWithCurrentChapterBylessonId(lessonId));
return map;
......
......@@ -9,6 +9,8 @@ import org.rcisoft.core.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Entity
@Table(name = "b_label")
......@@ -18,7 +20,7 @@ import javax.persistence.Transient;
public class BLabel extends IdEntity<BLabel> {
/*标签名称*/
@Length(min = 1,max = 64,message = "长度最小为1,最大为50")
@Length(min = 1,max = 64,message = "标签名称过长")
private String lName;
}
package org.rcisoft.business.blabel.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.rcisoft.business.blabel.dao.BLabelRepository;
import org.rcisoft.business.blabel.entity.BLabel;
import org.rcisoft.business.blabel.service.BLabelService;
......@@ -34,7 +35,9 @@ public class BLabelServiceImpl implements BLabelService {
@Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public PersistModel insertLabel(BLabel bLabel) {
if(StringUtils.isBlank(bLabel.getLName())){
throw new ServiceException("标签名称不能为空");
}
List<BLabel> line = bLabelRepository.checknameByName(bLabel);
if(line.size()>0){
throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS);
......@@ -46,6 +49,9 @@ public class BLabelServiceImpl implements BLabelService {
@Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public PersistModel updateLabel(BLabel bLabel) {
if(StringUtils.isBlank(bLabel.getLName())){
throw new ServiceException("标签名称不能为空");
}
List<BLabel> line = bLabelRepository.checknameByName(bLabel);
if(line.size()>0){
throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS);
......
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