mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
站点白名单
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 站点白名单对象 pile_station_whitelist
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-04-19
|
||||
*/
|
||||
public class PileStationWhitelist extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
@Excel(name = "站点id")
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@Excel(name = "会员id")
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setStationId(String stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public String getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
public void setMemberId(String memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public String getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("stationId", getStationId())
|
||||
.append("memberId", getMemberId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileStationWhitelist;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站点白名单Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-04-19
|
||||
*/
|
||||
@Repository
|
||||
public interface PileStationWhitelistMapper {
|
||||
/**
|
||||
* 查询站点白名单
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 站点白名单
|
||||
*/
|
||||
public PileStationWhitelist selectPileStationWhitelistById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点白名单列表
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 站点白名单集合
|
||||
*/
|
||||
public List<PileStationWhitelist> selectPileStationWhitelistList(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 新增站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPileStationWhitelist(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 修改站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePileStationWhitelist(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 删除站点白名单
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileStationWhitelistById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除站点白名单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileStationWhitelistByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.PileStationWhitelist;
|
||||
|
||||
/**
|
||||
* 站点白名单Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-04-19
|
||||
*/
|
||||
public interface IPileStationWhitelistService {
|
||||
/**
|
||||
* 查询站点白名单
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 站点白名单
|
||||
*/
|
||||
public PileStationWhitelist selectPileStationWhitelistById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点白名单列表
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 站点白名单集合
|
||||
*/
|
||||
public List<PileStationWhitelist> selectPileStationWhitelistList(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 新增站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPileStationWhitelist(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 修改站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePileStationWhitelist(PileStationWhitelist pileStationWhitelist);
|
||||
|
||||
/**
|
||||
* 批量删除站点白名单
|
||||
*
|
||||
* @param ids 需要删除的站点白名单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileStationWhitelistByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除站点白名单信息
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileStationWhitelistById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.domain.PileStationWhitelist;
|
||||
import com.jsowell.pile.mapper.PileStationWhitelistMapper;
|
||||
import com.jsowell.pile.service.IPileStationWhitelistService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站点白名单Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-04-19
|
||||
*/
|
||||
@Service
|
||||
public class PileStationWhitelistServiceImpl implements IPileStationWhitelistService {
|
||||
@Autowired
|
||||
private PileStationWhitelistMapper pileStationWhitelistMapper;
|
||||
|
||||
/**
|
||||
* 查询站点白名单
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 站点白名单
|
||||
*/
|
||||
@Override
|
||||
public PileStationWhitelist selectPileStationWhitelistById(Long id) {
|
||||
return pileStationWhitelistMapper.selectPileStationWhitelistById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点白名单列表
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 站点白名单
|
||||
*/
|
||||
@Override
|
||||
public List<PileStationWhitelist> selectPileStationWhitelistList(PileStationWhitelist pileStationWhitelist) {
|
||||
return pileStationWhitelistMapper.selectPileStationWhitelistList(pileStationWhitelist);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPileStationWhitelist(PileStationWhitelist pileStationWhitelist) {
|
||||
pileStationWhitelist.setCreateTime(DateUtils.getNowDate());
|
||||
return pileStationWhitelistMapper.insertPileStationWhitelist(pileStationWhitelist);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点白名单
|
||||
*
|
||||
* @param pileStationWhitelist 站点白名单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePileStationWhitelist(PileStationWhitelist pileStationWhitelist) {
|
||||
pileStationWhitelist.setUpdateTime(DateUtils.getNowDate());
|
||||
return pileStationWhitelistMapper.updatePileStationWhitelist(pileStationWhitelist);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除站点白名单
|
||||
*
|
||||
* @param ids 需要删除的站点白名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePileStationWhitelistByIds(Long[] ids) {
|
||||
return pileStationWhitelistMapper.deletePileStationWhitelistByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点白名单信息
|
||||
*
|
||||
* @param id 站点白名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePileStationWhitelistById(Long id) {
|
||||
return pileStationWhitelistMapper.deletePileStationWhitelistById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsowell.pile.mapper.PileStationWhitelistMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.PileStationWhitelist" id="PileStationWhitelistResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="memberId" column="member_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, station_id, member_id, create_time, create_by, update_time, update_by, del_flag
|
||||
</sql>
|
||||
|
||||
<sql id="selectPileStationWhitelistVo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from pile_station_whitelist
|
||||
</sql>
|
||||
|
||||
<select id="selectPileStationWhitelistList" parameterType="com.jsowell.pile.domain.PileStationWhitelist" resultMap="PileStationWhitelistResult">
|
||||
<include refid="selectPileStationWhitelistVo"/>
|
||||
<where>
|
||||
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
||||
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPileStationWhitelistById" parameterType="Long" resultMap="PileStationWhitelistResult">
|
||||
<include refid="selectPileStationWhitelistVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPileStationWhitelist" parameterType="com.jsowell.pile.domain.PileStationWhitelist">
|
||||
insert into pile_station_whitelist
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePileStationWhitelist" parameterType="com.jsowell.pile.domain.PileStationWhitelist">
|
||||
update pile_station_whitelist
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePileStationWhitelistById" parameterType="Long">
|
||||
delete from pile_station_whitelist where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePileStationWhitelistByIds" parameterType="String">
|
||||
delete from pile_station_whitelist where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user