diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java new file mode 100644 index 000000000..80d708be4 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java @@ -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; + +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java new file mode 100644 index 000000000..5c0ca9c22 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java @@ -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 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); +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java new file mode 100644 index 000000000..61542a040 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java @@ -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 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); +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java new file mode 100644 index 000000000..7c8ecbe79 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java @@ -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 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); + } +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml new file mode 100644 index 000000000..df50717c0 --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, logic_card, physics_card, member_id, create_time, create_by, update_time, update_by, del_flag from pile_auth_card + + + + + + + + insert into pile_auth_card + + logic_card, + physics_card, + member_id, + create_time, + create_by, + update_time, + update_by, + del_flag, + + + #{logicCard}, + #{physicsCard}, + #{memberId}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + #{delFlag}, + + + + + update pile_auth_card + + logic_card = #{logicCard}, + physics_card = #{physicsCard}, + member_id = #{memberId}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + del_flag = #{delFlag}, + + where id = #{id} + + + + delete from pile_auth_card where id = #{id} + + + + delete from pile_auth_card where id in + + #{id} + + + \ No newline at end of file