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
78699ced
authored
2025-03-03 21:34:00 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
84f61871
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
lego-admin/src/main/java/com/lego/web/controller/core/AdvertController.java
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
lego-admin/src/main/java/com/lego/web/controller/core/EntiretyController.java
lego-core/src/main/java/com/lego/core/domin/bo/AdvertBo.java
lego-core/src/main/java/com/lego/core/domin/bo/EntiretyBo.java
lego-admin/src/main/java/com/lego/web/controller/core/AdvertController.java
View file @
78699ce
...
...
@@ -47,7 +47,7 @@ public class AdvertController extends BaseController {
*/
@RepeatSubmit
()
@PostMapping
()
public
R
<
Void
>
addAdvert
(
@RequestBody
@Valid
AdvertBo
advertBo
)
throws
ServerException
{
public
R
<
Void
>
addAdvert
(
@RequestBody
@Valid
AdvertBo
advertBo
)
throws
ServerException
{
return
toAjax
(
service
.
addAdvert
(
advertBo
));
}
...
...
@@ -59,7 +59,7 @@ public class AdvertController extends BaseController {
*/
@RepeatSubmit
()
@PutMapping
public
R
<
Void
>
updateAdvert
(
@RequestBody
@Valid
AdvertBo
advertBo
)
throws
ServerException
{
public
R
<
Void
>
updateAdvert
(
@RequestBody
@Valid
AdvertBo
advertBo
)
throws
ServerException
{
return
toAjax
(
service
.
updateAdvert
(
advertBo
));
}
...
...
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
View file @
78699ce
...
...
@@ -16,6 +16,7 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.rmi.ServerException
;
import
java.util.List
;
...
...
@@ -73,7 +74,7 @@ public class CourseController extends BaseController {
*/
@RepeatSubmit
()
@PostMapping
()
public
R
<
Void
>
addCourse
(
@RequestBody
CourseBo
CourseBo
)
{
public
R
<
Void
>
addCourse
(
@RequestBody
@Valid
CourseBo
CourseBo
)
{
return
toAjax
(
service
.
addCourse
(
CourseBo
));
}
...
...
@@ -85,7 +86,7 @@ public class CourseController extends BaseController {
*/
@RepeatSubmit
()
@PutMapping
public
R
<
Void
>
update
(
@RequestBody
CourseBo
CourseBo
)
throws
ServerException
{
public
R
<
Void
>
update
(
@RequestBody
@Valid
CourseBo
CourseBo
)
throws
ServerException
{
return
toAjax
(
service
.
updateCourse
(
CourseBo
));
}
...
...
lego-admin/src/main/java/com/lego/web/controller/core/EntiretyController.java
View file @
78699ce
...
...
@@ -16,6 +16,7 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.rmi.ServerException
;
import
java.util.List
;
...
...
@@ -62,7 +63,7 @@ public class EntiretyController extends BaseController {
*/
@RepeatSubmit
()
@PostMapping
()
public
R
<
Void
>
addEntirety
(
@RequestBody
EntiretyBo
entiretyBo
)
{
public
R
<
Void
>
addEntirety
(
@RequestBody
@Valid
EntiretyBo
entiretyBo
)
{
return
toAjax
(
service
.
addEntirety
(
entiretyBo
));
}
...
...
@@ -74,7 +75,7 @@ public class EntiretyController extends BaseController {
*/
@RepeatSubmit
()
@PutMapping
public
R
<
Void
>
update
(
@RequestBody
EntiretyBo
entiretyBo
)
throws
ServerException
{
public
R
<
Void
>
update
(
@RequestBody
@Valid
EntiretyBo
entiretyBo
)
throws
ServerException
{
return
toAjax
(
service
.
updateEntirety
(
entiretyBo
));
}
...
...
lego-core/src/main/java/com/lego/core/domin/bo/AdvertBo.java
View file @
78699ce
...
...
@@ -2,6 +2,7 @@ package com.lego.core.domin.bo;
import
lombok.Data
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
...
...
@@ -30,7 +31,7 @@ public class AdvertBo extends BaseBO {
/**
* 排序
*/
@
Size
(
min
=
0
,
max
=
10
,
message
=
"排序不能超过{max}位数字
"
)
@
Max
(
value
=
1000000000
,
message
=
"必须小于等于1000000000
"
)
private
Long
sort
;
/**
...
...
lego-core/src/main/java/com/lego/core/domin/bo/EntiretyBo.java
View file @
78699ce
...
...
@@ -3,6 +3,7 @@ package com.lego.core.domin.bo;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
...
...
@@ -31,7 +32,7 @@ public class EntiretyBo extends BaseBO {
/**
* 排序
*/
@
Size
(
min
=
0
,
max
=
10
,
message
=
"排序不能超过{max}位数字
"
)
@
Max
(
value
=
1000000000
,
message
=
"必须小于等于1000000000
"
)
private
Long
sort
;
/**
...
...
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