Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
15cd555c
authored
2026-01-13 14:52:51 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
7429fc8b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
14 deletions
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
lego-core/src/main/java/com/lego/core/domain/Course.java
lego-core/src/main/java/com/lego/core/domain/Entirety.java
lego-core/src/main/java/com/lego/core/domain/bo/CourseBo.java
lego-core/src/main/java/com/lego/core/domain/bo/EntiretyBo.java
lego-core/src/main/java/com/lego/core/domain/vo/CourseVo.java
lego-core/src/main/java/com/lego/core/domain/vo/EntiretyVo.java
lego-core/src/main/java/com/lego/core/service/ICourseService.java
lego-core/src/main/java/com/lego/core/service/impl/CourseServiceImpl.java
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
View file @
15cd555
...
...
@@ -28,6 +28,7 @@ import javax.validation.Valid;
import
java.io.ByteArrayOutputStream
;
import
java.io.InputStream
;
import
java.rmi.ServerException
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -864,8 +865,20 @@ public class CourseController extends BaseController {
}
@RepeatSubmit
()
@PutMapping
(
"/batch/display/{courseIds}"
)
public
R
<
Void
>
batchDisplay
(
@PathVariable
String
[]
courseIds
)
throws
ServerException
{
return
toAjax
(
service
.
batchDisplay
(
courseIds
));
}
@RepeatSubmit
()
@PutMapping
(
"/hide/{id}"
)
public
R
<
Void
>
hide
(
@PathVariable
String
id
)
throws
ServerException
{
return
toAjax
(
service
.
hide
(
id
));
}
@RepeatSubmit
()
@PutMapping
(
"/batch/hide/{courseIds}"
)
public
R
<
Void
>
batchHide
(
@PathVariable
String
[]
courseIds
)
throws
ServerException
{
return
toAjax
(
service
.
batchHide
(
courseIds
));
}
}
...
...
lego-core/src/main/java/com/lego/core/domain/Course.java
View file @
15cd555
...
...
@@ -136,6 +136,6 @@ public class Course extends BaseEntity {
/**
* 是否可见
*/
private
boolean
isV
isible
;
private
boolean
v
isible
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/Entirety.java
View file @
15cd555
...
...
@@ -61,6 +61,6 @@ public class Entirety extends BaseEntity {
/**
* 是否可见
*/
private
boolean
isV
isible
;
private
boolean
v
isible
;
}
...
...
lego-core/src/main/java/com/lego/core/domain/bo/CourseBo.java
View file @
15cd555
...
...
@@ -108,5 +108,5 @@ public class CourseBo extends BaseBO {
/**
* 是否可见
*/
private
boolean
isV
isible
;
private
boolean
v
isible
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/bo/EntiretyBo.java
View file @
15cd555
...
...
@@ -48,5 +48,5 @@ public class EntiretyBo extends BaseBO {
/**
* 是否可见
*/
private
boolean
isV
isible
;
private
boolean
v
isible
;
}
...
...
lego-core/src/main/java/com/lego/core/domain/vo/CourseVo.java
View file @
15cd555
...
...
@@ -164,5 +164,10 @@ public class CourseVo {
/**
* 是否可见
*/
private
boolean
isVisible
;
private
boolean
visible
;
/**
* 是否可见
*/
private
String
display
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/vo/EntiretyVo.java
View file @
15cd555
...
...
@@ -58,5 +58,10 @@ public class EntiretyVo {
/**
* 是否可见
*/
private
boolean
isVisible
;
private
boolean
visible
;
/**
* 是否可见
*/
private
String
display
;
}
...
...
lego-core/src/main/java/com/lego/core/service/ICourseService.java
View file @
15cd555
...
...
@@ -80,14 +80,15 @@ public interface ICourseService {
* @throws ServerException
*/
boolean
hide
(
String
id
)
throws
ServerException
;
/**
* 批量隐藏
*
* @param
i
ds
* @param
courseI
ds
* @return
* @throws ServerException
*/
boolean
batchHide
(
List
<
String
>
i
ds
)
throws
ServerException
;
boolean
batchHide
(
String
[]
courseI
ds
)
throws
ServerException
;
/**
* 显示
*
...
...
@@ -100,10 +101,10 @@ public interface ICourseService {
/**
* 批量显示
*
* @param
i
ds
* @param
courseI
ds
* @return
* @throws ServerException
*/
boolean
batchDisplay
(
List
<
String
>
i
ds
)
throws
ServerException
;
boolean
batchDisplay
(
String
[]
courseI
ds
)
throws
ServerException
;
}
...
...
lego-core/src/main/java/com/lego/core/service/impl/CourseServiceImpl.java
View file @
15cd555
...
...
@@ -30,6 +30,7 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.stereotype.Service
;
import
java.rmi.ServerException
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -94,6 +95,12 @@ public class CourseServiceImpl implements ICourseService {
if
(
StrUtil
.
isNotBlank
(
vo
.
getPptOssId
())){
vo
.
setPptOssUrl
(
ossUrlService
.
selectUrlByIds
(
vo
.
getPptOssId
()));
}
if
(
vo
.
isVisible
()){
vo
.
setDisplay
(
"已显示"
);
}
else
{
vo
.
setDisplay
(
"已隐藏"
);
}
}
}
return
TableDataInfo
.
build
(
page
);
...
...
@@ -298,11 +305,18 @@ public class CourseServiceImpl implements ICourseService {
}
@Override
public
boolean
batchDisplay
(
List
<
String
>
ids
)
throws
ServerException
{
public
boolean
batchDisplay
(
String
[]
courseIds
)
throws
ServerException
{
if
(
courseIds
==
null
)
System
.
out
.
println
(
"=============1=========="
);
else
System
.
out
.
println
(
"========================"
+
Arrays
.
asList
(
courseIds
));
for
(
String
id
:
courseIds
)
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
true
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
baseMapper
.
updateById
(
course
);
}
return
true
;
}
@Override
...
...
@@ -314,11 +328,14 @@ public class CourseServiceImpl implements ICourseService {
}
@Override
public
boolean
batchHide
(
List
<
String
>
ids
)
throws
ServerException
{
public
boolean
batchHide
(
String
[]
courseIds
)
throws
ServerException
{
for
(
String
id
:
courseIds
)
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
false
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
baseMapper
.
updateById
(
course
);
}
return
true
;
}
/**
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment