Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
23765825
Commit
23765825
authored
Nov 08, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
318b3b53
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
58 deletions
+39
-58
BChapterController.java
...soft/business/bchapter/controller/BChapterController.java
+1
-1
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+1
-1
BCourse.java
...ain/java/org/rcisoft/business/bcourse/entity/BCourse.java
+4
-0
BFileController.java
...rg/rcisoft/business/bfile/controller/BFileController.java
+1
-47
BLabelController.java
.../rcisoft/business/blabel/controller/BLabelController.java
+1
-1
BLabel.java
src/main/java/org/rcisoft/business/blabel/entity/BLabel.java
+2
-0
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+1
-1
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+3
-0
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+6
-6
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+19
-1
No files found.
src/main/java/org/rcisoft/business/bchapter/controller/BChapterController.java
View file @
23765825
...
...
@@ -116,7 +116,7 @@ public class BChapterController extends PaginationController<BChapter> {
}
@ApiOperation
(
value
=
"206
流 输出
ppt转为pdf"
,
notes
=
"流 输出ppt转为pdf"
)
@ApiOperation
(
value
=
"206
将
ppt转为pdf"
,
notes
=
"流 输出ppt转为pdf"
)
@GetMapping
(
"/getFile"
)
public
Result
getFile
(
CurUser
curUser
,
@Valid
String
chapterId
,
BindingResult
br
)
throws
IOException
{
String
newFileUrl
=
bChapterService
.
changeFileToPdf
(
chapterId
);
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
23765825
...
...
@@ -310,7 +310,7 @@ public class BChapterServiceImpl implements BChapterService {
int
x
=
bFileRepository
.
updateUploadFile
(
bFile
);
// 判断 新文件 更新 课程学习进度(总进度 此章节进度)
if
(
StringUtils
.
isNotEmpty
(
dto
.
getVideoUrl
())
&&
!(
bFileOld
.
getVideoUrl
().
equals
(
dto
.
getVideoUrl
()))
)
{
if
(
StringUtils
.
isNotEmpty
(
bFileOld
.
getVideoUrl
())
&&
!(
bFileOld
.
getVideoUrl
().
equals
(
dto
.
getVideoUrl
()))
)
{
// 所有学习过此课程的 学生课程信息
List
<
BLessonPerson
>
bLessonPersonList
=
bLessonPersonRepository
.
selectByLessonId
(
chapterDTO
.
getLessonId
());
BLesson
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
chapterDTO
.
getLessonId
());
...
...
src/main/java/org/rcisoft/business/bcourse/entity/BCourse.java
View file @
23765825
package
org
.
rcisoft
.
business
.
bcourse
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -19,14 +20,17 @@ import java.util.List;
@AllArgsConstructor
public
class
BCourse
extends
IdEntity
<
BCourse
>
{
@ApiModelProperty
(
value
=
"章节名"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
cName
;
@ApiModelProperty
(
value
=
"父级id"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
pid
;
private
int
sort
;
@ApiModelProperty
(
value
=
"章节等级"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
courseLevel
;
...
...
src/main/java/org/rcisoft/business/bfile/controller/BFileController.java
View file @
23765825
...
...
@@ -41,7 +41,7 @@ public class BFileController extends PaginationController<BFile> {
@Autowired
private
Global
global
;
@ApiOperation
(
value
=
"401 上传文件
"
,
notes
=
"上传文件
"
)
@ApiOperation
(
value
=
"401 上传文件
(弃用)"
,
notes
=
"上传文件(弃用)
"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"0视频 1音频 2ppt 3pdf 4附件"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"file"
,
value
=
"视频文件"
,
required
=
true
,
dataType
=
"MultipartFile"
)})
@PostMapping
(
value
=
"/upload"
)
...
...
@@ -53,51 +53,5 @@ public class BFileController extends PaginationController<BFile> {
data
);
}
// /**
// * 下载文件
// * @param chapterId
// * @param response
// * @return
// */
// @ApiOperation(value="下载文件", notes="下载文件")
// @ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar")
// @GetMapping(value = "/downloadFileWithoutAuth")
// public Result downloadFileWithoutAuth(String chapterId, HttpServletResponse response) throws IOException {
// BFile bFile = bFileService.queryFileUrlByChapterId(chapterId);
// BufferedInputStream bis = null;
// BufferedOutputStream bos = null;
// if(bFile.getFileUrl()!=""&&bFile.getFileUrl()!=null){
// File file=new File(global.getBASE_UPLOAD_SERVER_LOCATION()+File.separator+bFile.getFileUrl());
// if(!file.isFile()){
// throw new ServiceException(ResultServiceEnums.DOWNLOAD_ERROR);
// }
// bis = new BufferedInputStream(new FileInputStream(file));
// bos = new BufferedOutputStream(response.getOutputStream());
//
// String fileName = "";
// if(bFile.getVideoName()!=null&&!bFile.getVideoName().equals("")&&bFile.getVideoName().endsWith(".zip")){
// fileName = bFile.getVideoName();
// }else{
// fileName = file.getName();
// }
//
// response.reset();
// response.setContentType("application/octet-stream;charset=utf-8");
// response.setHeader("Content-Disposition", "attachment;filename="+ new String((fileName).getBytes(), "iso-8859-1"));
// response.setHeader("Access-Control-Allow-Origin", "*");
// IOUtils.copy(bis, bos);
// bis.close();
// bos.close();
// }else {
// throw new ServiceException(ResultServiceEnums.DOWNLOAD_ERROR);
// }
// return Result.builder(new PersistModel(1),
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// "");
// }
}
src/main/java/org/rcisoft/business/blabel/controller/BLabelController.java
View file @
23765825
...
...
@@ -76,7 +76,7 @@ public class BLabelController extends PaginationController<BLabel> {
bLabel
);
}
@ApiOperation
(
value
=
"505 根据条件查询"
,
notes
=
"根据条件查询标签"
)
@ApiOperation
(
value
=
"505 根据条件查询"
,
notes
=
"根据条件查询标签"
,
response
=
BLabel
.
class
)
@ApiImplicitParam
(
name
=
"lName"
,
value
=
"(标签名)模糊查询条件"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBlabels"
)
public
Result
queryBlabels
(
CurUser
curUser
,
@Valid
String
lName
,
BindingResult
br
){
...
...
src/main/java/org/rcisoft/business/blabel/entity/BLabel.java
View file @
23765825
package
org
.
rcisoft
.
business
.
blabel
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -21,6 +22,7 @@ public class BLabel extends IdEntity<BLabel> {
/*标签名称*/
@Length
(
min
=
0
,
max
=
64
,
message
=
"标签名称过长"
)
@ApiModelProperty
(
value
=
"标签名"
)
private
String
lName
;
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
23765825
...
...
@@ -19,7 +19,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
//我学习的课程
@Select
(
"<script> select blp.*,bl.lesson_name lessonName,bl.default_url defaultUrl,bl.person_number personNumber, "
+
" bl.class_hour classHour,bl.discuss_number discussNumber ,bl.lecturer_id lecturerId, bl.lesson_type "
+
" lessonType,bl.course_time courseTime "
+
" lessonType,bl.course_time courseTime
,bl.release_state releaseState
"
+
",su.name lecturerName "
+
" from b_lesson_person blp "
+
" left join b_lesson bl on blp.lesson_id = bl.business_id "
+
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
23765825
...
...
@@ -120,6 +120,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
private
String
lessonType
;
@ApiModelProperty
(
value
=
" 发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)"
)
@Transient
private
String
releaseState
;
@Transient
private
String
corpId
;
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
23765825
...
...
@@ -111,14 +111,14 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
mtUserGetsReqDTO
.
setIds
(
uids
);
//遍历获取部门名
List
<
MTUserInfoRspDTO
>
departs
=
mtCotactApiRequestClient
.
userGets
(
mtUserGetsReqDTO
);
if
(
departs
!=
null
&&
departs
.
size
()
>
0
){
studentTrackingRspDTOs
.
forEach
(
studentTrackingRspDTO
->
{
departs
.
forEach
(
depart
->
{
if
(
studentTrackingRspDTO
.
getPersonId
().
equals
(
depart
.
getId
())){
if
(
studentTrackingRspDTOs
!=
null
&&
studentTrackingRspDTOs
.
size
()
>
0
&&
departs
!=
null
&&
departs
.
size
()
>
0
){
for
(
StudentTrackingRspDTO
studentTrackingRspDTO
:
studentTrackingRspDTOs
)
{
for
(
MTUserInfoRspDTO
depart
:
departs
)
{
if
(
studentTrackingRspDTO
.
getPersonId
().
equals
(
depart
.
getId
())
&&
depart
.
getDepts
()
!=
null
&&
depart
.
getDepts
().
size
()
>
0
){
studentTrackingRspDTO
.
setDepartName
(
depart
.
getDepts
().
get
(
0
).
getName
());
}
}
);
}
);
}
}
}
return
studentTrackingRspDTOs
;
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
23765825
...
...
@@ -533,6 +533,17 @@ public class BLessonServiceImpl implements BLessonService {
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
recommendBLesson
(
RecommendLessonDTO
recommendLessonDTO
)
{
BLesson
bLessonExi
=
new
BLesson
();
bLessonExi
.
setBusinessId
(
recommendLessonDTO
.
getLessonId
());
bLessonExi
=
bLessonRepository
.
selectByPrimaryKey
(
bLessonExi
);
//判断课程是否存在
if
(
bLessonExi
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_NOT_EXISTA
);
}
//判断课程是否已关闭
if
(
"4"
.
equals
(
bLessonExi
.
getReleaseState
())){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_CLOSED
);
}
if
(
StringUtils
.
isNotEmpty
(
recommendLessonDTO
.
getRecommendPerson
())
||
StringUtils
.
isNotEmpty
(
recommendLessonDTO
.
getRecommendDepart
()))
{
BRecommend
bRecommend
=
new
BRecommend
();
...
...
@@ -625,9 +636,14 @@ public class BLessonServiceImpl implements BLessonService {
BLesson
bLesson
=
new
BLesson
();
bLesson
.
setBusinessId
(
appointLessonDTO
.
getLessonId
());
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
bLesson
);
//判断课程是否存在
if
(
bLesson
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_NOT_EXISTA
);
}
//判断课程是否已关闭
if
(
"4"
.
equals
(
bLesson
.
getReleaseState
())){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_CLOSED
);
}
//获取部门中人员
List
<
String
>
deptList
=
asList
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
split
(
appointLessonDTO
.
getAppointDepart
(),
","
));
...
...
@@ -822,7 +838,9 @@ public class BLessonServiceImpl implements BLessonService {
//设置部门名
bLessonPerson
.
setPersonName
(
mtUserInfoRspDTO
.
getName
());
bLessonPerson
.
setHeadPic
(
mtUserInfoRspDTO
.
getAvatar
());
bLessonPerson
.
setDepartName
(
mtUserInfoRspDTO
.
getDepts
().
get
(
0
).
getName
());
if
(
mtUserInfoRspDTO
.
getDepts
()
!=
null
&&
mtUserInfoRspDTO
.
getDepts
().
size
()
>
0
){
bLessonPerson
.
setDepartName
(
mtUserInfoRspDTO
.
getDepts
().
get
(
0
).
getName
());
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment