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
7429fc8b
authored
2026-01-13 11:47:07 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增隐藏属性
1 parent
d11cae39
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
108 additions
and
0 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 @
7429fc8
...
...
@@ -856,4 +856,16 @@ public class CourseController extends BaseController {
public
R
<
Void
>
remove
(
@PathVariable
String
id
)
throws
ServerException
{
return
toAjax
(
service
.
remove
(
id
));
}
@RepeatSubmit
()
@PutMapping
(
"/display/{id}"
)
public
R
<
Void
>
display
(
@PathVariable
String
id
)
throws
ServerException
{
return
toAjax
(
service
.
display
(
id
));
}
@RepeatSubmit
()
@PutMapping
(
"/hide/{id}"
)
public
R
<
Void
>
hide
(
@PathVariable
String
id
)
throws
ServerException
{
return
toAjax
(
service
.
hide
(
id
));
}
}
...
...
lego-core/src/main/java/com/lego/core/domain/Course.java
View file @
7429fc8
...
...
@@ -133,4 +133,9 @@ public class Course extends BaseEntity {
*/
private
String
programType
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/Entirety.java
View file @
7429fc8
...
...
@@ -58,4 +58,9 @@ public class Entirety extends BaseEntity {
@TableLogic
private
String
delFlag
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
...
...
lego-core/src/main/java/com/lego/core/domain/bo/CourseBo.java
View file @
7429fc8
...
...
@@ -104,4 +104,9 @@ public class CourseBo extends BaseBO {
* 编程类型(0没有编程 1图标 2词语)
*/
private
String
programType
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/bo/EntiretyBo.java
View file @
7429fc8
...
...
@@ -44,4 +44,9 @@ public class EntiretyBo extends BaseBO {
* 文件ID
*/
private
String
ossId
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
...
...
lego-core/src/main/java/com/lego/core/domain/vo/CourseVo.java
View file @
7429fc8
...
...
@@ -160,4 +160,9 @@ public class CourseVo {
* 编程类型(0没有编程 1图标 2词语)
*/
private
String
programType
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
\ No newline at end of file
...
...
lego-core/src/main/java/com/lego/core/domain/vo/EntiretyVo.java
View file @
7429fc8
...
...
@@ -54,4 +54,9 @@ public class EntiretyVo {
* 前端APP数据国际化(zh_CN、en_US、ru_RU)
*/
private
String
language
;
/**
* 是否可见
*/
private
boolean
isVisible
;
}
...
...
lego-core/src/main/java/com/lego/core/service/ICourseService.java
View file @
7429fc8
...
...
@@ -71,5 +71,39 @@ public interface ICourseService {
* @throws ServerException
*/
boolean
remove
(
String
id
)
throws
ServerException
;
/**
* 隐藏
*
* @param id
* @return
* @throws ServerException
*/
boolean
hide
(
String
id
)
throws
ServerException
;
/**
* 批量隐藏
*
* @param ids
* @return
* @throws ServerException
*/
boolean
batchHide
(
List
<
String
>
ids
)
throws
ServerException
;
/**
* 显示
*
* @param id
* @return
* @throws ServerException
*/
boolean
display
(
String
id
)
throws
ServerException
;
/**
* 批量显示
*
* @param ids
* @return
* @throws ServerException
*/
boolean
batchDisplay
(
List
<
String
>
ids
)
throws
ServerException
;
}
...
...
lego-core/src/main/java/com/lego/core/service/impl/CourseServiceImpl.java
View file @
7429fc8
...
...
@@ -289,6 +289,38 @@ public class CourseServiceImpl implements ICourseService {
return
baseMapper
.
deleteById
(
id
)
>
0
;
}
@Override
public
boolean
display
(
String
id
)
throws
ServerException
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
true
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
}
@Override
public
boolean
batchDisplay
(
List
<
String
>
ids
)
throws
ServerException
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
true
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
}
@Override
public
boolean
hide
(
String
id
)
throws
ServerException
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
false
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
}
@Override
public
boolean
batchHide
(
List
<
String
>
ids
)
throws
ServerException
{
CourseVo
courseVo
=
baseMapper
.
selectVoById
(
id
);
courseVo
.
setVisible
(
false
);
Course
course
=
BeanUtil
.
toBean
(
courseVo
,
Course
.
class
);
return
baseMapper
.
updateById
(
course
)
>
0
;
}
/**
* 校验数据是否存在
*
...
...
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