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
0c07a080
Commit
0c07a080
authored
Sep 23, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bfile
parent
ab7c1398
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
260 deletions
+65
-260
BChapterController.java
...soft/business/bchapter/controller/BChapterController.java
+2
-188
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+0
-1
BCourseController.java
...cisoft/business/bcourse/controller/BCourseController.java
+25
-29
BCourseService.java
.../org/rcisoft/business/bcourse/service/BCourseService.java
+0
-2
BCourseServiceImpl.java
...oft/business/bcourse/service/impl/BCourseServiceImpl.java
+6
-14
BFileController.java
...rg/rcisoft/business/bfile/controller/BFileController.java
+22
-23
BFile.java
src/main/java/org/rcisoft/business/bfile/entity/BFile.java
+5
-1
BFileServiceImpl.java
...rcisoft/business/bfile/service/impl/BFileServiceImpl.java
+1
-1
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+0
-1
Global.java
src/main/java/org/rcisoft/common/component/Global.java
+4
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/controller/BChapterController.java
View file @
0c07a080
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
0c07a080
...
...
@@ -259,7 +259,6 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
@Select
(
"<script>select * from b_chapter where sort > #{sort} "
+
"AND pid = #{pid} and del_flag = 0 and flag = 1 "
+
"<if test=\"slId !=null and slId !=''\">AND sl_id = #{slId} </if> "
+
"<if test=\"lessonId !=null and lessonId !=''\">AND lesson_id = #{lessonId} </if> "
+
"ORDER BY sort asc LIMIT 1</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
src/main/java/org/rcisoft/business/bcourse/controller/BCourseController.java
View file @
0c07a080
package
org
.
rcisoft
.
business
.
bcourse
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -22,6 +23,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@RestController
...
...
@@ -31,43 +34,47 @@ public class BCourseController extends PaginationController<BCourse> {
@Autowired
private
BCourseService
bCourseServiceImpl
;
@ApiOperation
(
value
=
"查询课程分类"
,
notes
=
"查询课程分类"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"
课程名
模糊查询"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiOperation
(
value
=
"查询课程分类"
,
notes
=
"查询课程分类"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"
(课程名)
模糊查询"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/queryCourse"
)
public
Result
queryBCourse
(
CurUser
curUser
,
@Valid
BCourse
param
,
BindingResult
br
){
public
Result
queryBCourse
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
BCourse
bCourse
=
new
BCourse
();
bCourse
.
setCName
(
cName
);
Map
<
String
,
Object
>
map
=
new
HashedMap
();
map
.
put
(
"courseList"
,
bCourseServiceImpl
.
queryBCourse
(
param
));
map
.
put
(
"courseList"
,
bCourseServiceImpl
.
queryBCourse
(
bCourse
));
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
map
);
}
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"
课程名
模糊查询"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"
(课程名)
模糊查询"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBCourseByPagination"
)
public
GridModel
queryBCourseByPagination
(
CurUser
curUser
,
@Valid
BCourse
param
,
BindingResult
br
){
bCourseServiceImpl
.
queryBCourseByPagination
(
getPaginationUtility
(),
param
);
public
GridModel
queryBCourseByPagination
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
BCourse
bCourse
=
new
BCourse
();
bCourse
.
setCName
(
cName
);
bCourseServiceImpl
.
queryBCourseByPagination
(
getPaginationUtility
(),
bCourse
);
GridModel
gridModel
=
getGridModelResponse
();
return
gridModel
;
}
@ApiOperation
(
value
=
"物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"
ID
"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiOperation
(
value
=
"物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"
businessId
"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
PersistModel
data
=
bCourseServiceImpl
.
removeCourse
(
id
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
id
);
}
@ApiOperation
(
value
=
"更新课程名"
,
notes
=
"根据ID更新课程名"
)
@ApiOperation
(
value
=
"修改课程名"
,
notes
=
"根据ID更新课程名"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"cName"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/update"
)
public
Result
update
(
CurUser
curUser
,
@Valid
BCourse
bCourse
,
BindingResult
br
){
public
Result
update
(
CurUser
curUser
,
@Valid
BCourse
bCourse
,
BindingResult
br
)
{
PersistModel
data
=
bCourseServiceImpl
.
updateCourse
(
bCourse
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
@@ -75,11 +82,11 @@ public class BCourseController extends PaginationController<BCourse> {
bCourse
.
getBusinessId
());
}
@ApiOperation
(
value
=
"插入课程分类"
,
notes
=
"插入
课程分类"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"p
id"
,
value
=
"parentId
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
name"
,
value
=
"cName
"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiOperation
(
value
=
"添加课程分类"
,
notes
=
"添加课程分类,不填parentId添加一级
课程分类"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"p
arentId"
,
value
=
"上一级
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
cName"
,
value
=
"课程分类名
"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/insert"
)
public
Result
insert
(
CurUser
curUser
,
@Valid
BCourse
bCourse
,
BindingResult
br
){
public
Result
insert
(
CurUser
curUser
,
@Valid
BCourse
bCourse
,
BindingResult
br
)
{
PersistModel
data
=
bCourseServiceImpl
.
insertCourse
(
bCourse
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
@@ -87,15 +94,4 @@ public class BCourseController extends PaginationController<BCourse> {
bCourse
.
getParentId
());
}
@ApiOperation
(
value
=
"插入课程分类"
,
notes
=
"插入一级课程分类"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"order_by"
,
value
=
"orderBy"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"cName"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/insertTop"
)
public
Result
insertTop
(
CurUser
curUser
,
@Valid
BCourse
bCourse
,
BindingResult
br
){
PersistModel
data
=
bCourseServiceImpl
.
insertTopCourse
(
bCourse
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCourse
.
getParentId
());
}
}
src/main/java/org/rcisoft/business/bcourse/service/BCourseService.java
View file @
0c07a080
...
...
@@ -17,8 +17,6 @@ public interface BCourseService {
PersistModel
insertCourse
(
BCourse
bCourse
);
PersistModel
insertTopCourse
(
BCourse
bCourse
);
PersistModel
removeCourse
(
String
id
);
PersistModel
updateCourse
(
BCourse
bCoursee
);
...
...
src/main/java/org/rcisoft/business/bcourse/service/impl/BCourseServiceImpl.java
View file @
0c07a080
...
...
@@ -27,7 +27,7 @@ public class BCourseServiceImpl implements BCourseService {
@Override
public
List
<
QueryCourseResDTO
>
queryBCourse
(
BCourse
model
)
{
Map
param
=
new
HashMap
<
String
,
Object
>();
if
(
model
.
getCName
()
!=
null
&&
!
""
.
equals
(
model
.
getCName
())){
if
(
model
.
getCName
()
!=
null
&&
!
""
.
equals
(
model
.
getCName
()))
{
param
.
put
(
"cName"
,
model
.
getCName
());
}
return
bCourseRepository
.
queryCourses
(
param
);
...
...
@@ -36,7 +36,7 @@ public class BCourseServiceImpl implements BCourseService {
@Override
public
List
<
QueryCourseResDTO
>
queryBCourseByPagination
(
PageUtil
pageUtil
,
BCourse
model
)
{
Map
param
=
new
HashMap
<
String
,
Object
>();
if
(
model
.
getCName
()
!=
null
&&
!
""
.
equals
(
model
.
getCName
())){
if
(
model
.
getCName
()
!=
null
&&
!
""
.
equals
(
model
.
getCName
()))
{
param
.
put
(
"cName"
,
model
.
getCName
());
}
return
bCourseRepository
.
queryCourses
(
param
);
...
...
@@ -47,19 +47,11 @@ public class BCourseServiceImpl implements BCourseService {
public
PersistModel
insertCourse
(
BCourse
bCourse
)
{
List
<
BCourse
>
list
=
bCourseRepository
.
selectOneByName
(
bCourse
.
getCName
());
if
(
list
.
size
()>
0
)
{
if
(
list
.
size
()
>
0
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
}
UserUtil
.
setCurrentPersistOperation
(
bCourse
);
return
new
PersistModel
(
bCourseRepository
.
insert
(
bCourse
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
)
;
}
@Override
public
PersistModel
insertTopCourse
(
BCourse
bCourse
)
{
bCourse
.
setParentId
(
"00000000"
);
List
<
BCourse
>
list
=
bCourseRepository
.
selectOneByName
(
bCourse
.
getCName
());
if
(
list
.
size
()>
0
){
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
if
(
bCourse
.
getParentId
()
==
null
||
""
.
equals
(
bCourse
.
getParentId
()))
{
bCourse
.
setParentId
(
"00000000"
);
}
UserUtil
.
setCurrentPersistOperation
(
bCourse
);
return
new
PersistModel
(
bCourseRepository
.
insert
(
bCourse
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
...
...
@@ -74,7 +66,7 @@ public class BCourseServiceImpl implements BCourseService {
@Override
public
PersistModel
updateCourse
(
BCourse
bCourse
)
{
List
<
BCourse
>
list
=
bCourseRepository
.
selectOneByName
(
bCourse
.
getCName
());
if
(
list
.
size
()>
0
)
{
if
(
list
.
size
()
>
0
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
}
UserUtil
.
setCurrentMergeOperation
(
bCourse
);
...
...
src/main/java/org/rcisoft/business/bfile/controller/BFileController.java
View file @
0c07a080
...
...
@@ -105,7 +105,6 @@ public class BFileController extends PaginationController<BFile> {
@ApiOperation
(
value
=
"上传文件"
,
notes
=
"上传文件"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"chapterId"
,
value
=
"章节ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"课程ID"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"slId"
,
value
=
"开课ID"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"'0'为视频,'1'为附件,'2'为ppt,'3'为pdf"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"file"
,
value
=
"视频文件"
,
required
=
true
,
dataType
=
"MultipartFile"
)})
@PostMapping
(
value
=
"/uploadVideo"
)
...
...
@@ -118,28 +117,28 @@ public class BFileController extends PaginationController<BFile> {
videoUrl
);
}
@ApiOperation
(
value
=
"上传license"
,
notes
=
"上传license证书文件"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"file"
,
value
=
"license文件"
,
required
=
true
,
dataType
=
"MultipartFile"
)})
@PostMapping
(
value
=
"/uploadLicenseWithoutAuth"
)
public
Result
uploadLicense
(
HttpServletRequest
request
)
{
List
<
MultipartFile
>
list
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"file"
);
try
{
if
(
list
.
size
()>
0
){
bFileService
.
uploadLicense
(
list
.
get
(
0
));
}
else
{
throw
new
ServiceException
(
ResultServiceEnums
.
UPLOAD_ERROR
);
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
ServiceException
(
ResultServiceEnums
.
UPLOAD_ERROR
);
}
return
Result
.
builder
(
new
PersistModel
(
1
),
"license上传成功"
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
""
);
}
//
@ApiOperation(value="上传license", notes="上传license证书文件")
//
@ApiImplicitParams({
//
@ApiImplicitParam(name = "file", value = "license文件", required = true, dataType = "MultipartFile")})
//
@PostMapping(value = "/uploadLicenseWithoutAuth")
//
public Result uploadLicense(HttpServletRequest request) {
//
List<MultipartFile> list = ((MultipartHttpServletRequest)request).getFiles("file");
//
try {
//
if(list.size()>0){
//
bFileService.uploadLicense(list.get(0));
//
}else{
//
throw new ServiceException(ResultServiceEnums.UPLOAD_ERROR);
//
}
//
//
} catch (IOException e) {
//
e.printStackTrace();
//
throw new ServiceException(ResultServiceEnums.UPLOAD_ERROR);
//
}
//
return Result.builder(new PersistModel(1),
//
"license上传成功",
//
MessageConstant.MESSAGE_ALERT_ERROR,
//
"");
//
}
/**
...
...
src/main/java/org/rcisoft/business/bfile/entity/BFile.java
View file @
0c07a080
...
...
@@ -32,13 +32,17 @@ public class BFile extends IdEntity<BFile> {
@NotBlank
private
String
videoUrl
;
/*
'0'为视频,'1'为
附件*/
/*
0视频 1音频 2ppt 3pdf 4
附件*/
private
String
type
;
@Length
(
min
=
1
,
max
=
256
,
message
=
"长度最小为1,最大为200"
)
@NotBlank
private
String
fileUrl
;
@Length
(
min
=
1
,
max
=
256
,
message
=
"长度最小为1,最大为200"
)
@NotBlank
private
String
audioUrl
;
@Length
(
min
=
1
,
max
=
256
,
message
=
"长度最小为1,最大为200"
)
@NotBlank
private
String
pptUrl
;
...
...
src/main/java/org/rcisoft/business/bfile/service/impl/BFileServiceImpl.java
View file @
0c07a080
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
0c07a080
...
...
@@ -8,7 +8,6 @@ import org.rcisoft.business.blesson.dao.BLessonRepository;
import
org.rcisoft.business.blesson.dto.BLessonIPublishDTO
;
import
org.rcisoft.business.blesson.dto.BLessonIPublishRspDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonDirection
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blessonlabel.dao.BLessonLabelRepository
;
import
org.rcisoft.business.blessonlabel.entity.BLessonLabel
;
...
...
src/main/java/org/rcisoft/common/component/Global.java
View file @
0c07a080
...
...
@@ -65,6 +65,10 @@ public class Global {
@Value
(
"${global.path.video_location}"
)
private
String
VIDEO_LOCATION
;
/*音频路径*/
@Value
(
"${global.path.audio_location}"
)
private
String
AUDIO_LOCATION
;
/*旧视频路径*/
@Value
(
"${global.path.temp_location}"
)
private
String
TEMP_LOCATION
;
...
...
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