Commit a941ecf3 authored by wujipeng's avatar wujipeng
Browse files

白名单新增优化

parent 10ba665e
......@@ -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);
}
......@@ -29,7 +29,7 @@ public class WhiteServiceImpl extends ServiceImpl<WhiteMapper, WhiteEntity> impl
public Boolean saveWhite(WhiteDTO whiteDTO) {
whiteDTO.setTime(new Date());
//TODO 添加用户
return save(whiteDTO);
return baseMapper.saveWhite(whiteDTO);
}
@Override
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment