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
a941ecf3
Commit
a941ecf3
authored
Aug 06, 2025
by
wujipeng
Browse files
白名单新增优化
parent
10ba665e
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/mapper/WhiteMapper.java
View file @
a941ecf3
...
...
@@ -28,4 +28,6 @@ public interface WhiteMapper extends BaseMapper<WhiteEntity> {
List
<
String
>
queryList
();
List
<
WhiteEntity
>
queryByNameList
(
@Param
(
"userNameList"
)
List
<
String
>
userNameList
);
Boolean
saveWhite
(
WhiteDTO
whiteDTO
);
}
src/main/java/com/platform/service/impl/WhiteServiceImpl.java
View file @
a941ecf3
...
...
@@ -29,7 +29,7 @@ public class WhiteServiceImpl extends ServiceImpl<WhiteMapper, WhiteEntity> impl
public
Boolean
saveWhite
(
WhiteDTO
whiteDTO
)
{
whiteDTO
.
setTime
(
new
Date
());
//TODO 添加用户
return
sav
e
(
whiteDTO
);
return
baseMapper
.
saveWhit
e
(
whiteDTO
);
}
@Override
...
...
src/main/resources/com/platform/mapper/WhiteMapper.xml
View file @
a941ecf3
...
...
@@ -2,6 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.platform.mapper.WhiteMapper"
>
<insert
id=
"saveWhite"
>
insert IGNORE into white(name, account, time, user)
values
<foreach
collection=
"whiteDTO.nameList"
item=
"name"
separator=
","
>
(#{name}, #{whiteDTO.account}, #{whiteDTO.time}, #{whiteDTO.user})
</foreach>
</insert>
<select
id=
"pageWhite"
resultType=
"com.platform.model.vo.WhiteVO"
>
select
...
...
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