mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 22:15:06 +08:00
新增 后管修改鉴权卡绑定
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除充电站鉴权卡
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user