mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡对象 pile_auth_card
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class PileAuthCard {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 逻辑卡号
|
||||
*/
|
||||
@Excel(name = "逻辑卡号")
|
||||
private String logicCard;
|
||||
|
||||
/**
|
||||
* 物理卡号
|
||||
*/
|
||||
@Excel(name = "物理卡号")
|
||||
private String physicsCard;
|
||||
|
||||
/**
|
||||
* 所属用户的会员id
|
||||
*/
|
||||
@Excel(name = "所属用户的会员id")
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
@Repository
|
||||
public interface PileAuthCardMapper {
|
||||
/**
|
||||
* 查询充电站鉴权卡
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
public PileAuthCard selectPileAuthCardById(Long id);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCard> selectPileAuthCardList(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 修改充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 删除充电站鉴权卡
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
public interface IPileAuthCardService {
|
||||
/**
|
||||
* 查询充电站鉴权卡
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
public PileAuthCard selectPileAuthCardById(Long id);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCard> selectPileAuthCardList(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 修改充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
* @param ids 需要删除的充电站鉴权卡主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除充电站鉴权卡信息
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.PileAuthCardMapper;
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.service.IPileAuthCardService;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
@Service
|
||||
public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
@Autowired
|
||||
private PileAuthCardMapper pileAuthCardMapper;
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
@Override
|
||||
public PileAuthCard selectPileAuthCardById(Long id) {
|
||||
return pileAuthCardMapper.selectPileAuthCardById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
@Override
|
||||
public List<PileAuthCard> selectPileAuthCardList(PileAuthCard pileAuthCard) {
|
||||
return pileAuthCardMapper.selectPileAuthCardList(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPileAuthCard(PileAuthCard pileAuthCard) {
|
||||
return pileAuthCardMapper.insertPileAuthCard(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电站鉴权卡
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePileAuthCard(PileAuthCard pileAuthCard) {
|
||||
return pileAuthCardMapper.updatePileAuthCard(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
* @param ids 需要删除的充电站鉴权卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePileAuthCardByIds(Long[] ids) {
|
||||
return pileAuthCardMapper.deletePileAuthCardByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电站鉴权卡信息
|
||||
*
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePileAuthCardById(Long id) {
|
||||
return pileAuthCardMapper.deletePileAuthCardById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.PileAuthCardMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.PileAuthCard" id="PileAuthCardResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="logicCard" column="logic_card" />
|
||||
<result property="physicsCard" column="physics_card" />
|
||||
<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="selectPileAuthCardVo">
|
||||
select id, logic_card, physics_card, member_id, create_time, create_by, update_time, update_by, del_flag from pile_auth_card
|
||||
</sql>
|
||||
|
||||
<select id="selectPileAuthCardList" parameterType="com.jsowell.pile.domain.PileAuthCard" resultMap="PileAuthCardResult">
|
||||
<include refid="selectPileAuthCardVo"/>
|
||||
<where>
|
||||
<if test="logicCard != null and logicCard != ''"> and logic_card = #{logicCard}</if>
|
||||
<if test="physicsCard != null and physicsCard != ''"> and physics_card = #{physicsCard}</if>
|
||||
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPileAuthCardById" parameterType="Long" resultMap="PileAuthCardResult">
|
||||
<include refid="selectPileAuthCardVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPileAuthCard" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pile_auth_card
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="logicCard != null">logic_card,</if>
|
||||
<if test="physicsCard != null">physics_card,</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="logicCard != null">#{logicCard},</if>
|
||||
<if test="physicsCard != null">#{physicsCard},</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="updatePileAuthCard" parameterType="com.jsowell.pile.domain.PileAuthCard">
|
||||
update pile_auth_card
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="logicCard != null">logic_card = #{logicCard},</if>
|
||||
<if test="physicsCard != null">physics_card = #{physicsCard},</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="deletePileAuthCardById" parameterType="Long">
|
||||
delete from pile_auth_card where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePileAuthCardByIds" parameterType="String">
|
||||
delete from pile_auth_card where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user