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
7375435e
Commit
7375435e
authored
Apr 06, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除、查询 cutpdf节
parent
d55febc2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+14
-2
QueryChapterListResDTO.java
...rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
+3
-0
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+3
-1
No files found.
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
7375435e
...
@@ -25,7 +25,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
...
@@ -25,7 +25,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
* @return
* @return
*/
*/
@Update
(
"update b_chapter set del_flag = '1' where business_id=#{businessId}"
)
@Update
(
"update b_chapter bc "
+
"left join b_file bf on bc.business_id = bf.chapter_id "
+
"set bc.del_flag = '1' where bf.video_url = ( "
+
"SELECT video_url from b_file where chapter_id = #{businessId})"
)
int
removeByPrimaryKey
(
@Param
(
"businessId"
)
String
businessId
);
int
removeByPrimaryKey
(
@Param
(
"businessId"
)
String
businessId
);
/**
/**
...
@@ -83,7 +86,8 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
...
@@ -83,7 +86,8 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" bf.video_url AS videoUrl, "
+
" bf.video_url AS videoUrl, "
+
" bf.file_name AS fileName ,"
+
" bf.file_name AS fileName ,"
+
" bf.file_time AS fileTime ,"
+
" bf.file_time AS fileTime ,"
+
" bf.file_size AS fileSize "
+
" bf.file_size AS fileSize ,"
+
" if((SELECT count(0) from b_file where video_url = bf.video_url )>1,1,0) isCutPdf "
+
" FROM "
+
" FROM "
+
" b_chapter bc "
+
" b_chapter bc "
+
" LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id "
+
" LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id "
+
...
@@ -480,5 +484,13 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
...
@@ -480,5 +484,13 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
"update b_chapter set sort = (sort+#{num}) where business_id = #{item}"
+
"update b_chapter set sort = (sort+#{num}) where business_id = #{item}"
+
"</foreach></script>"
)
"</foreach></script>"
)
int
updatePdfSort
(
@Param
(
"ids"
)
List
<
String
>
ids
,
@Param
(
"num"
)
int
num
);
int
updatePdfSort
(
@Param
(
"ids"
)
List
<
String
>
ids
,
@Param
(
"num"
)
int
num
);
@Select
(
"SELECT bf.chapter_id "
+
"from b_file bf "
+
"left join b_chapter bc on bc.business_id = bf.chapter_id "
+
"where bf.video_url = (SELECT video_url from b_file where chapter_id = #{chapterId}) "
+
"and bf.del_flag!=1 and bf.flag =1 "
+
"ORDER BY bc.sort LIMIT 1"
)
String
getFirstOssId
(
String
chapterId
);
}
}
src/main/java/org/rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
View file @
7375435e
...
@@ -72,4 +72,7 @@ public class QueryChapterListResDTO {
...
@@ -72,4 +72,7 @@ public class QueryChapterListResDTO {
@ApiModelProperty
(
value
=
"课程时间"
)
@ApiModelProperty
(
value
=
"课程时间"
)
private
String
courseTime
;
private
String
courseTime
;
@ApiModelProperty
(
value
=
"是否是切割的节"
)
private
String
isCutPdf
;
}
}
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
7375435e
...
@@ -658,7 +658,9 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -658,7 +658,9 @@ public class BChapterServiceImpl implements BChapterService {
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
removeBChapter
(
String
id
,
CurUser
curUser
)
{
public
PersistModel
removeBChapter
(
String
oldId
,
CurUser
curUser
)
{
//根据章节id 获取与该章节oss地址相同的第一个章节id
String
id
=
bChapterRepository
.
getFirstOssId
(
oldId
);
BChapter
bChapter
=
bChapterRepository
.
selectByPrimaryKey
(
id
);
BChapter
bChapter
=
bChapterRepository
.
selectByPrimaryKey
(
id
);
String
lessonId
=
bChapterRepository
.
getLessonIdBychaperId
(
id
);
String
lessonId
=
bChapterRepository
.
getLessonIdBychaperId
(
id
);
if
(
bChapter
==
null
)
if
(
bChapter
==
null
)
...
...
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