Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c3d0185d
authored
Oct 27, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:消息模块开发
1 parent
33a38111
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
19 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/MsgController.java
project-order/src/main/java/com/dituhui/pea/order/dto/IdDTO.java
project-order/src/main/java/com/dituhui/pea/order/dto/MsgDTO.java
project-order/src/main/java/com/dituhui/pea/order/controller/MsgController.java
View file @
c3d0185
...
@@ -63,7 +63,7 @@ public class MsgController {
...
@@ -63,7 +63,7 @@ public class MsgController {
* @date 2023/10/24
* @date 2023/10/24
*/
*/
@PostMapping
(
"/msg/delete"
)
@PostMapping
(
"/msg/delete"
)
public
Result
<
Boolean
>
delete
(
@RequestHeader
(
name
=
"userId"
,
required
=
true
)
String
userId
,
@RequestBody
@Valid
IdDTO
dto
)
{
public
Result
<
Boolean
>
delete
(
@RequestHeader
(
name
=
"userId"
,
required
=
true
)
String
userId
,
@RequestBody
@Valid
MsgDTO
.
IdDTO
dto
)
{
AssertUtil
.
isNotEmpty
(
userId
,
"用户ID不能为空"
);
AssertUtil
.
isNotEmpty
(
userId
,
"用户ID不能为空"
);
AssertUtil
.
isNotNull
(
dto
.
getId
(),
"消息ID不能为空"
);
AssertUtil
.
isNotNull
(
dto
.
getId
(),
"消息ID不能为空"
);
msgService
.
delete
(
dto
.
getId
(),
userId
);
msgService
.
delete
(
dto
.
getId
(),
userId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/IdDTO.java
deleted
100644 → 0
View file @
33a3811
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
/**
* 公共 id类
*
* @author RenPing
* @date 2023/10/26
*/
@Data
public
class
IdDTO
{
@NotNull
(
message
=
"ID不能为空"
)
private
Integer
id
;
}
project-order/src/main/java/com/dituhui/pea/order/dto/MsgDTO.java
View file @
c3d0185
...
@@ -49,4 +49,12 @@ public class MsgDTO {
...
@@ -49,4 +49,12 @@ public class MsgDTO {
@Min
(
value
=
0
,
message
=
"标签类型格式不对"
)
@Min
(
value
=
0
,
message
=
"标签类型格式不对"
)
@Max
(
value
=
1
,
message
=
"标签类型格式不对"
)
@Max
(
value
=
1
,
message
=
"标签类型格式不对"
)
private
Integer
tag
;
private
Integer
tag
;
@Data
public
static
class
IdDTO
{
@NotNull
(
message
=
"ID不能为空"
)
private
Integer
id
;
}
}
}
\ No newline at end of file
Write
Preview
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