mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
新增 后管修改鉴权卡绑定
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -55,6 +56,7 @@ public class PileAuthCard {
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
private String createBy;
|
||||
|
||||
@@ -10,7 +10,15 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class PileAuthCardDTO {
|
||||
private Long id;
|
||||
|
||||
private String logicCard;
|
||||
|
||||
private String physicsCard;
|
||||
|
||||
private String status;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String phoneNumber;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.pile.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.dto.PileAuthCardDTO;
|
||||
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -20,8 +21,9 @@ public interface PileAuthCardMapper {
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
public PileAuthCard selectPileAuthCardById(Long id);
|
||||
// public PileAuthCard selectPileAuthCardById(Long id);
|
||||
|
||||
PileAuthCardVO getCardInfoById(Long id);
|
||||
/**
|
||||
* 查询充电站鉴权卡信息
|
||||
* @param pileAuthCard
|
||||
@@ -40,10 +42,10 @@ public interface PileAuthCardMapper {
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @param dto 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCard pileAuthCard);
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCardDTO dto);
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
|
||||
@@ -19,7 +19,9 @@ public interface IPileAuthCardService {
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
public PileAuthCard selectPileAuthCardById(Long id);
|
||||
// public PileAuthCard selectPileAuthCardById(Long id);
|
||||
|
||||
PileAuthCardVO getCardInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡信息
|
||||
@@ -39,10 +41,10 @@ public interface IPileAuthCardService {
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @param dto 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCard pileAuthCard);
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCardDTO dto);
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
@@ -68,6 +70,8 @@ public interface IPileAuthCardService {
|
||||
*/
|
||||
public int updatePileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
public int updateCardInfo(PileAuthCardDTO dto);
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
|
||||
@@ -35,9 +35,14 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 充电站鉴权卡
|
||||
*/
|
||||
// @Override
|
||||
// public PileAuthCard selectPileAuthCardById(Long id) {
|
||||
// return pileAuthCardMapper.selectPileAuthCardById(id);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public PileAuthCard selectPileAuthCardById(Long id) {
|
||||
return pileAuthCardMapper.selectPileAuthCardById(id);
|
||||
public PileAuthCardVO getCardInfoById(Long id) {
|
||||
return pileAuthCardMapper.getCardInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,12 +69,12 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
*
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @param dto 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
@Override
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCard pileAuthCard) {
|
||||
return pileAuthCardMapper.getPileAuthCardInfoList(pileAuthCard);
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCardDTO dto) {
|
||||
return pileAuthCardMapper.getPileAuthCardInfoList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,6 +121,22 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
return pileAuthCardMapper.updatePileAuthCard(pileAuthCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateCardInfo(PileAuthCardDTO dto) {
|
||||
// 通过手机号查询memberId
|
||||
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber());
|
||||
if (memberBasicInfo == null) {
|
||||
// 为空则说明未查到该用户的注册信息
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
||||
}
|
||||
PileAuthCard pileAuthCard = PileAuthCard.builder()
|
||||
.id(dto.getId())
|
||||
.logicCard(dto.getLogicCard())
|
||||
.memberId(memberBasicInfo.getMemberId())
|
||||
.build();
|
||||
return pileAuthCardMapper.updatePileAuthCard(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 鉴权卡VO
|
||||
*
|
||||
@@ -16,7 +18,13 @@ public class PileAuthCardVO {
|
||||
|
||||
private String physicsCard;
|
||||
|
||||
private String status;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private String nickName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user