Commit 41f86373 authored by zhangqingle's avatar zhangqingle

修改接口

parent 2ac1ecb0
......@@ -43,7 +43,6 @@ public class BBanner extends IdEntity<BBanner> {
@ApiModelProperty(value = "是否为外部链接(0:否,1:是)")
private String isExternalLink;
@Length(min = 1,max = 256,message = "长度最小为1,最大为256")
@ApiModelProperty(value = "外部URL")
private String externalUrl;
......
......@@ -51,7 +51,7 @@ public class BBannerServiceImpl implements BBannerService {
if ("1".equals(model.getIsExternalLink()) && StringUtils.isEmpty(model.getExternalUrl()))
throw new ServiceException(ResultServiceEnums.JUMP_ADDRESS_NULL);
else if ("1".equals(model.getIsExternalLink()) && StringUtils.isNotBlank(model.getExternalUrl())){
String regex = "^([hH][tT]{2}[pP]:/*|[hH][tT]{2}[pP][sS]:/*|[fF][tT][pP]:/*)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\/])"; // +(\?{0,1}(([A-Za-z0-9-~]+\={0,1})([A-Za-z0-9-~]*)\&{0,1})*)$
String regex = "^([hH][tT]{2}[pP]:/*|[hH][tT]{2}[pP][sS]:/*|[fF][tT][pP]:/*)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\/])+(\\?{0,1}(([A-Za-z0-9-~]+\\={0,1})([A-Za-z0-9-~]*)\\&{0,1})*)$"; // +(\?{0,1}(([A-Za-z0-9-~]+\={0,1})([A-Za-z0-9-~]*)\&{0,1})*)$
Pattern pattern = Pattern.compile(regex);
if (!pattern.matcher(model.getExternalUrl()).matches()) {
......
......@@ -512,6 +512,9 @@ public class BChapterServiceImpl implements BChapterService {
@Override
public String changeFileToPdf(String chapterId) {
if (StringUtils.isEmpty(chapterId)){
return null;
}
//1. 获取文件信息
BFile bFile = bFileRepository.selectInfoByChapterId(chapterId);
return changeFile(bFile);
......@@ -519,11 +522,19 @@ public class BChapterServiceImpl implements BChapterService {
@Override
public String changeFileToPdfAtView(BFile bFile) {
if (StringUtils.isEmpty(bFile.getVideoUrl()) || StringUtils.isEmpty(bFile.getLessonId()) || StringUtils.isEmpty(bFile.getType())){
return null;
// throw new ServiceException(ResultServiceEnums.PARAM_NOT_NULL);
}
return changeFile(bFile);
}
@Override
public String getDownLoadUrl(BFile bFile) {
if (StringUtils.isEmpty(bFile.getVideoUrl()) || StringUtils.isEmpty(bFile.getLessonId())){
return null;
// throw new ServiceException(ResultServiceEnums.PARAM_NOT_NULL);
}
String name = bFile.getVideoUrl().substring(bFile.getVideoUrl().lastIndexOf("/") + 1);
String filePath = global.getBASE_UPLOAD_SERVER_LOCATION() + global.getCOURSE_LOCATION() + File.separator + bFile.getLessonId();
String returnBasePath = global.getRETURN_UPLOAD_SERVER_LOCATION() + global.getCOURSE_LOCATION() + File.separator + bFile.getLessonId();
......
......@@ -92,7 +92,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
Set<String> deptIds = new HashSet<>();
deptIds.add(studentTrackingDTO.getDepartId());
Set<String> deptSets = new HashSet<String>(deptIds);
Set<String> deptSets = new HashSet<>(deptIds);
List<String> datas = mtCotactApiRequestClient.getSubUserIdsByDeptIds(studentTrackingDTO.getCorpId(), deptSets);
// List<UserGetStudentTrackingRspDTO> datas = mtCotactApiRequestClient.allUserListByDeptAtStuTrack(studentTrackingDTO.getCorpId(),studentTrackingDTO.getDepartId());
if (datas != null && datas.size()>0){
......
......@@ -236,6 +236,7 @@ public enum ResultServiceEnums {
LESSON_NO_CHAPTER(136,"当前课程暂无章节,不能被发布"),
ROLE_IS_NULL(137,"当前未勾选角色,请勾选角色"),
ILLEGAL_URL(138,"网址不合法(http(s)://xxxx.xx)"),
PARAM_NOT_NULL(139,"参数不能为空"),
;
private Integer code;
......
......@@ -230,17 +230,17 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
" b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id " +
" where blp.del_flag != 1 AND blp.flag = 1 " +
" and bl.del_flag != 1 AND bl.flag = 1 " +
" and blp.is_finish = 2 " +
" and bl.release_state = 2 " +
// " and blp.is_finish = 2 " +
// " and bl.release_state = 2 " +
" and bl.lesson_type = 0 " +
" and blp.person_id = #{userId}) lessonCount, " +
" and bl.corp_id = #{corpId} " +
" and blp.person_id = #{userId} and blp.is_finish is not null) lessonCount, " +
" (select count(1) from " +
" b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id " +
" where blp.del_flag != 1 AND blp.flag = 1 " +
" and bl.del_flag != 1 AND bl.flag = 1 " +
" and bl.release_state = 2 " +
// " and bl.release_state = 2 " +
" and blp.train_is_sign = 0" +
" and blp.person_id = #{userId}) trainCount, " +
......
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