mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update
This commit is contained in:
@@ -1,70 +1,76 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡对象 pile_auth_card
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
* 充电站鉴权卡表
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PileAuthCard {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 逻辑卡号
|
||||
*/
|
||||
@Excel(name = "逻辑卡号")
|
||||
private String logicCard;
|
||||
|
||||
/**
|
||||
* 物理卡号
|
||||
*/
|
||||
@Excel(name = "物理卡号")
|
||||
private String physicsCard;
|
||||
|
||||
/**
|
||||
* 卡状态
|
||||
* 卡状态(0-待激活;1-正常使用;2-启动锁定;9-停用)
|
||||
*/
|
||||
@Excel(name = "卡状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 所属用户的会员id
|
||||
*/
|
||||
@Excel(name = "所属用户的会员id")
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 所属运营商id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class PileAuthCardDTO {
|
||||
private Long id;
|
||||
private Integer id;
|
||||
|
||||
private String logicCard;
|
||||
|
||||
@@ -28,7 +28,14 @@ public class PileAuthCardDTO {
|
||||
|
||||
private String verificationCode;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
* 创建时传过来
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 有权限的运营商id列表
|
||||
*/
|
||||
private List<String> merchantIdList;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
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.uniapp.AuthCardVO;
|
||||
@@ -9,14 +7,66 @@ import com.jsowell.pile.vo.web.PileAuthCardVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface PileAuthCardMapper {
|
||||
/**
|
||||
* delete by primary key
|
||||
*
|
||||
* @param id primaryKey
|
||||
* @return deleteCount
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* insert record to table
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insert(PileAuthCard record);
|
||||
|
||||
int insertOrUpdate(PileAuthCard record);
|
||||
|
||||
int insertOrUpdateSelective(PileAuthCard record);
|
||||
|
||||
/**
|
||||
* insert record to table selective
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(PileAuthCard record);
|
||||
|
||||
/**
|
||||
* select by primary key
|
||||
*
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
PileAuthCard selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* update record selective
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(PileAuthCard record);
|
||||
|
||||
/**
|
||||
* update record
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(PileAuthCard record);
|
||||
|
||||
int updateBatch(List<PileAuthCard> list);
|
||||
|
||||
int batchInsert(@Param("list") List<PileAuthCard> list);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡
|
||||
*
|
||||
@@ -26,12 +76,14 @@ public interface PileAuthCardMapper {
|
||||
// public PileAuthCard selectPileAuthCardById(Long id);
|
||||
|
||||
PileAuthCardVO getCardInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡信息
|
||||
*
|
||||
* @param pileAuthCard
|
||||
* @return
|
||||
*/
|
||||
PileAuthCard selectPileAuthCardInfo (PileAuthCard pileAuthCard);
|
||||
PileAuthCard selectPileAuthCardInfo(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
@@ -39,7 +91,7 @@ public interface PileAuthCardMapper {
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCard> selectPileAuthCardList(PileAuthCard pileAuthCard);
|
||||
List<PileAuthCard> selectPileAuthCardList(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡列表
|
||||
@@ -47,7 +99,7 @@ public interface PileAuthCardMapper {
|
||||
* @param dto 充电站鉴权卡
|
||||
* @return 充电站鉴权卡集合
|
||||
*/
|
||||
public List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCardDTO dto);
|
||||
List<PileAuthCardVO> getPileAuthCardInfoList(PileAuthCardDTO dto);
|
||||
|
||||
/**
|
||||
* 新增充电站鉴权卡
|
||||
@@ -55,7 +107,7 @@ public interface PileAuthCardMapper {
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPileAuthCard(PileAuthCard pileAuthCard);
|
||||
int insertPileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 修改充电站鉴权卡
|
||||
@@ -63,7 +115,7 @@ public interface PileAuthCardMapper {
|
||||
* @param pileAuthCard 充电站鉴权卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePileAuthCard(PileAuthCard pileAuthCard);
|
||||
int updatePileAuthCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 删除充电站鉴权卡
|
||||
@@ -71,10 +123,11 @@ public interface PileAuthCardMapper {
|
||||
* @param id 充电站鉴权卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardById(Long id);
|
||||
int deletePileAuthCardById(Long id);
|
||||
|
||||
/**
|
||||
* 停用某张卡
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@@ -86,12 +139,13 @@ public interface PileAuthCardMapper {
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileAuthCardByIds(Long[] ids);
|
||||
int deletePileAuthCardByIds(Long[] ids);
|
||||
|
||||
int unBindingCard(PileAuthCard pileAuthCard);
|
||||
|
||||
/**
|
||||
* 根据逻辑卡号查询某状态的鉴权卡信息
|
||||
*
|
||||
* @param status
|
||||
* @param logicCard
|
||||
* @return
|
||||
@@ -100,8 +154,9 @@ public interface PileAuthCardMapper {
|
||||
|
||||
/**
|
||||
* 通过memberId查询鉴权卡列表 (小程序用)
|
||||
*
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
List<AuthCardVO> getAuthCardListByMemberId(@Param("memberId") String memberId);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,34 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.dto.PileAuthCardDTO;
|
||||
import com.jsowell.pile.vo.uniapp.AuthCardVO;
|
||||
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
||||
|
||||
/**
|
||||
* 充电站鉴权卡Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
public interface IPileAuthCardService {
|
||||
import java.util.List;
|
||||
|
||||
public interface PileAuthCardService{
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(PileAuthCard record);
|
||||
|
||||
int insertOrUpdate(PileAuthCard record);
|
||||
|
||||
int insertOrUpdateSelective(PileAuthCard record);
|
||||
|
||||
int insertSelective(PileAuthCard record);
|
||||
|
||||
PileAuthCard selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(PileAuthCard record);
|
||||
|
||||
int updateByPrimaryKey(PileAuthCard record);
|
||||
|
||||
int updateBatch(List<PileAuthCard> list);
|
||||
|
||||
int batchInsert(List<PileAuthCard> list);
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡
|
||||
*
|
||||
@@ -132,4 +147,5 @@ public interface IPileAuthCardService {
|
||||
* @return
|
||||
*/
|
||||
int unbindAuthCard(PileAuthCardDTO dto);
|
||||
|
||||
}
|
||||
@@ -97,8 +97,6 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic
|
||||
return adapayMemberAccountMapper.deleteAdapayMemberAccountByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AdapayMemberAccount selectByMerchantId(String merchantId) {
|
||||
if (StringUtils.isBlank(merchantId)) {
|
||||
|
||||
@@ -132,7 +132,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
private IPileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
@Autowired
|
||||
private IPileAuthCardService pileAuthCardService;
|
||||
private PileAuthCardService pileAuthCardService;
|
||||
|
||||
@Autowired
|
||||
private OrderMonitorDataService orderMonitorDataService;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.dto.PileAuthCardDTO;
|
||||
import com.jsowell.pile.mapper.PileAuthCardMapper;
|
||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileAuthCardService;
|
||||
import com.jsowell.pile.service.PileAuthCardService;
|
||||
import com.jsowell.pile.util.UserUtils;
|
||||
import com.jsowell.pile.vo.base.LoginUserDetailVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
@@ -31,7 +31,7 @@ import java.util.stream.Collectors;
|
||||
* @date 2023-03-16
|
||||
*/
|
||||
@Service
|
||||
public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
public class PileAuthCardServiceImpl implements PileAuthCardService {
|
||||
@Autowired
|
||||
private PileAuthCardMapper pileAuthCardMapper;
|
||||
|
||||
@@ -48,7 +48,6 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
// public PileAuthCard selectPileAuthCardById(Long id) {
|
||||
// return pileAuthCardMapper.selectPileAuthCardById(id);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public PileAuthCardVO getCardInfoById(Long id) {
|
||||
return pileAuthCardMapper.getCardInfoById(id);
|
||||
@@ -56,6 +55,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 查询充电站鉴权卡信息
|
||||
*
|
||||
* @param pileAuthCard
|
||||
* @return
|
||||
*/
|
||||
@@ -112,7 +112,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
String logicCard = dto.getLogicCard();
|
||||
// 根据卡号查询数据库
|
||||
PileAuthCard cardInfo = pileAuthCardMapper.selectSomeStatusCardInfo(null, logicCard);
|
||||
if(cardInfo != null) {
|
||||
if (cardInfo != null) {
|
||||
// 不为空说明此卡已存在
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_AUTH_CARD_CODE_EXIST);
|
||||
}
|
||||
@@ -136,10 +136,11 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
PileAuthCard pileAuthCard = PileAuthCard.builder()
|
||||
.logicCard(logicCard)
|
||||
.memberId(memberId)
|
||||
.merchantId(dto.getMerchantId())
|
||||
.status(status)
|
||||
.secretKey(secretKey)
|
||||
.build();
|
||||
return pileAuthCardMapper.insertPileAuthCard(pileAuthCard);
|
||||
return pileAuthCardMapper.insertSelective(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,7 +168,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
.memberId(memberBasicInfo.getMemberId())
|
||||
.status("1")
|
||||
.build();
|
||||
return pileAuthCardMapper.updatePileAuthCard(pileAuthCard);
|
||||
return pileAuthCardMapper.updateByPrimaryKeySelective(pileAuthCard);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,6 +205,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 根据逻辑卡号查询某状态的鉴权卡信息
|
||||
*
|
||||
* @param status
|
||||
* @param logicCard
|
||||
* @return
|
||||
@@ -215,6 +217,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 通过逻辑卡号查询卡信息
|
||||
*
|
||||
* @param logicCard
|
||||
* @return
|
||||
*/
|
||||
@@ -225,6 +228,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 通过memberId查询鉴权卡列表 (小程序用)
|
||||
*
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
@@ -239,6 +243,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 用户绑定鉴权卡
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
@@ -266,6 +271,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
|
||||
/**
|
||||
* 用户解绑鉴权卡
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -287,4 +293,55 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
||||
pileAuthCard.setSecretKey(secretKey);
|
||||
return updatePileAuthCard(pileAuthCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return pileAuthCardMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(PileAuthCard record) {
|
||||
return pileAuthCardMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdate(PileAuthCard record) {
|
||||
return pileAuthCardMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdateSelective(PileAuthCard record) {
|
||||
return pileAuthCardMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(PileAuthCard record) {
|
||||
return pileAuthCardMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PileAuthCard selectByPrimaryKey(Integer id) {
|
||||
return pileAuthCardMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(PileAuthCard record) {
|
||||
return pileAuthCardMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(PileAuthCard record) {
|
||||
return pileAuthCardMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<PileAuthCard> list) {
|
||||
return pileAuthCardMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<PileAuthCard> list) {
|
||||
return pileAuthCardMapper.batchInsert(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public abstract class AbstractOrderLogic implements InitializingBean {
|
||||
protected AdapayCallbackRecordService adapayCallbackRecordService;
|
||||
|
||||
@Autowired
|
||||
protected IPileAuthCardService pileAuthCardService;
|
||||
protected PileAuthCardService pileAuthCardService;
|
||||
|
||||
@Autowired
|
||||
protected IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||
|
||||
Reference in New Issue
Block a user