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
07cef8ea
Commit
07cef8ea
authored
Sep 24, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bfile
parent
dcf4e070
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
31 deletions
+27
-31
BFileController.java
...rg/rcisoft/business/bfile/controller/BFileController.java
+4
-26
BFileRepository.java
.../java/org/rcisoft/business/bfile/dao/BFileRepository.java
+13
-3
BFileServiceImpl.java
...rcisoft/business/bfile/service/impl/BFileServiceImpl.java
+1
-1
SysUserController.java
...va/org/rcisoft/sys/user/controller/SysUserController.java
+3
-1
SysUserMapper.java
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
+1
-0
application-dev.yml
src/main/resources/application-dev.yml
+4
-0
BFileMapper.xml
...in/resources/mapper/business/bfile/mapper/BFileMapper.xml
+1
-0
No files found.
src/main/java/org/rcisoft/business/bfile/controller/BFileController.java
View file @
07cef8ea
...
...
@@ -104,43 +104,21 @@ 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
=
fals
e
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
type"
,
value
=
"'0'为视频,'1'为附件,'2'为ppt,'3'为pdf
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
type"
,
value
=
"0视频 1音频 2ppt 3pdf 4附件"
,
required
=
tru
e
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
lessonId"
,
value
=
"章节所在课程名
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"file"
,
value
=
"视频文件"
,
required
=
true
,
dataType
=
"MultipartFile"
)})
@PostMapping
(
value
=
"/uploadVideo"
)
public
Result
uploadVideo
(
BFile
bFile
,
HttpServletRequest
request
)
{
List
<
MultipartFile
>
list
=
((
MultipartHttpServletRequest
)
request
).
getFiles
(
"file"
);
String
videoUrl
=
bFileService
.
uploadVideoToServer
(
list
,
bFile
);
return
Result
.
builder
(
new
PersistModel
(
1
),
"上传成功"
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
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,
// "");
// }
/**
* 下载文件
* @param chapterId
...
...
src/main/java/org/rcisoft/business/bfile/dao/BFileRepository.java
View file @
07cef8ea
package
org
.
rcisoft
.
business
.
bfile
.
dao
;
import
org.apache.ibatis.annotations.
Insert
;
import
org.
apache.ibatis.annotations.ResultMap
;
import
org.
apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.
*
;
import
org.
rcisoft.business.bchapter.entity.BChapter
;
import
org.
rcisoft.business.bcourse.entity.BCourse
;
import
org.rcisoft.business.bfile.entity.BFile
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -15,6 +15,16 @@ import java.util.Map;
*/
@Repository
public
interface
BFileRepository
extends
BaseMapper
<
BFile
>
{
@Update
(
"UPDATE b_chapter set course_time = #{time} where business_id =#{id}"
)
int
updateVideoTimeInChapter
(
@Param
(
"time"
)
String
time
,
@Param
(
"id"
)
String
id
);
@Update
(
"UPDATE b_lesson set course_time = #{time} where business_id =#{id}"
)
int
updateVideoTimeInLesson
(
@Param
(
"time"
)
String
time
,
@Param
(
"id"
)
String
id
);
@Select
(
"SELECT business_id FROM b_chapter WHERE"
+
"pid = ( SELECT business_id FROM b_chapter WHERE lesson_id = #{lessonId} AND chapter_level = '1' AND del_flag != 1 AND flag = 1 ORDER BY sort LIMIT 1 ) "
+
"ORDER BY sort LIMIT 1"
)
String
getFirstChapter
(
@Param
(
"lessonId"
)
String
lessonId
);
/**
* 根据条件查找
...
...
src/main/java/org/rcisoft/business/bfile/service/impl/BFileServiceImpl.java
View file @
07cef8ea
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/sys/user/controller/SysUserController.java
View file @
07cef8ea
...
...
@@ -43,7 +43,9 @@ public class SysUserController extends PaginationController<SysUser> {
private
Global
global
;
@ApiOperation
(
value
=
"分页查询用户"
,
notes
=
"分页查询用户"
)
@ApiImplicitParam
(
name
=
"agencyCode"
,
value
=
"教学单位Code"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"用户名(模糊查询条件)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"用户启用状态 0未启用 1启用"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"roleName"
,
value
=
"用户角色"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryUsers"
)
public
GridModel
queryUsers
(
CurUser
curUser
,
@Valid
SysUser
sysUser
,
BindingResult
br
)
{
userServiceImpl
.
queryUsersByPagination
(
getPaginationUtility
(),
sysUser
);
...
...
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
View file @
07cef8ea
...
...
@@ -23,6 +23,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"left join s_role as sr on ru.role_id = sr.business_id "
+
"where su.del_flag = 0"
+
"<if test=\"name!=null and name != ''\"> and su.name like CONCAT('%',#{name},'%') </if>"
+
"<if test=\"roleName!=null and roleName != ''\"> and sr.role_name = #{roleName}</if>"
+
"<if test=\"flag!=null and flag != ''\"> and su.flag = #{flag}</if></script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysUser
>
queryUsers
(
SysUser
sysUser
);
...
...
src/main/resources/application-dev.yml
View file @
07cef8ea
...
...
@@ -54,6 +54,10 @@ spring:
charset
:
UTF-8
suffix
:
.ftl
template-loader-path
:
classpath:/templates/
servlet
:
multipart
:
max-file-size
:
10MB
max-request-size
:
100MB
global
:
default_location
:
...
...
src/main/resources/mapper/business/bfile/mapper/BFileMapper.xml
View file @
07cef8ea
...
...
@@ -12,6 +12,7 @@
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"video_name"
jdbcType=
"VARCHAR"
property=
"videoName"
/>
<result
column=
"video_url"
jdbcType=
"VARCHAR"
property=
"videoUrl"
/>
<result
column=
"audio_url"
jdbcType=
"VARCHAR"
property=
"audioUrl"
/>
<result
column=
"file_url"
jdbcType=
"VARCHAR"
property=
"fileUrl"
/>
<result
column=
"ppt_url"
jdbcType=
"VARCHAR"
property=
"pptUrl"
/>
<result
column=
"pdf_url"
jdbcType=
"VARCHAR"
property=
"pdfUrl"
/>
...
...
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