Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
961e9c9a
Commit
961e9c9a
authored
Jul 30, 2025
by
wujipeng
Browse files
白名单新增优化
parent
36f53f65
Changes
4
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/WhiteController.java
View file @
961e9c9a
...
@@ -43,8 +43,8 @@ public class WhiteController extends BaseController {
...
@@ -43,8 +43,8 @@ public class WhiteController extends BaseController {
@ApiOperation
(
value
=
"新增"
)
@ApiOperation
(
value
=
"新增"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
Result
<
Boolean
>
save
OrUpdate
(
@RequestBody
WhiteDTO
whiteDTO
)
{
public
Result
<
Boolean
>
save
(
@RequestBody
WhiteDTO
whiteDTO
)
{
return
Result
.
data
(
whiteService
.
save
(
whiteDTO
));
return
Result
.
data
(
whiteService
.
save
White
(
whiteDTO
));
}
}
@ApiOperation
(
value
=
"删除"
)
@ApiOperation
(
value
=
"删除"
)
...
...
src/main/java/com/platform/model/entity/WhiteEntity.java
View file @
961e9c9a
...
@@ -3,9 +3,12 @@ package com.platform.model.entity;
...
@@ -3,9 +3,12 @@ package com.platform.model.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
* @author : wujipeng
* @author : wujipeng
* @date : 2025/7/30 17:34
* @date : 2025/7/30 17:34
...
@@ -27,7 +30,8 @@ public class WhiteEntity {
...
@@ -27,7 +30,8 @@ public class WhiteEntity {
private
String
amount
;
private
String
amount
;
@ApiModelProperty
(
"加入时间"
)
@ApiModelProperty
(
"加入时间"
)
private
String
time
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
time
;
@ApiModelProperty
(
"加入用户"
)
@ApiModelProperty
(
"加入用户"
)
private
String
user
;
private
String
user
;
...
...
src/main/java/com/platform/service/WhiteService.java
View file @
961e9c9a
...
@@ -22,4 +22,12 @@ public interface WhiteService extends IService<WhiteEntity> {
...
@@ -22,4 +22,12 @@ public interface WhiteService extends IService<WhiteEntity> {
* @return List<WhiteVO>
* @return List<WhiteVO>
*/
*/
List
<
WhiteVO
>
pageWhite
(
WhiteDTO
whiteDTO
);
List
<
WhiteVO
>
pageWhite
(
WhiteDTO
whiteDTO
);
/**
* 新增
*
* @param whiteDTO whiteDTO
* @return Boolean
*/
Boolean
saveWhite
(
WhiteDTO
whiteDTO
);
}
}
src/main/java/com/platform/service/impl/WhiteServiceImpl.java
View file @
961e9c9a
...
@@ -8,6 +8,7 @@ import com.platform.model.vo.WhiteVO;
...
@@ -8,6 +8,7 @@ import com.platform.model.vo.WhiteVO;
import
com.platform.service.WhiteService
;
import
com.platform.service.WhiteService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +23,11 @@ public class WhiteServiceImpl extends ServiceImpl<WhiteMapper, WhiteEntity> impl
...
@@ -22,4 +23,11 @@ public class WhiteServiceImpl extends ServiceImpl<WhiteMapper, WhiteEntity> impl
public
List
<
WhiteVO
>
pageWhite
(
WhiteDTO
whiteDTO
)
{
public
List
<
WhiteVO
>
pageWhite
(
WhiteDTO
whiteDTO
)
{
return
baseMapper
.
pageWhite
(
whiteDTO
);
return
baseMapper
.
pageWhite
(
whiteDTO
);
}
}
@Override
public
Boolean
saveWhite
(
WhiteDTO
whiteDTO
)
{
whiteDTO
.
setTime
(
new
Date
());
//TODO 添加用户
return
save
(
whiteDTO
);
}
}
}
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