This commit is contained in:
2023-07-10 17:55:26 +08:00
parent 01971a712d
commit 9dd8b633ef
5 changed files with 32 additions and 2 deletions

View File

@@ -61,6 +61,8 @@ public interface IAdapayMemberAccountService {
AdapayMemberAccount selectByMerchantId(String merchantId);
AdapayMemberAccount selectByMemberId(String memberId);
String selectAdapayMemberIdByStationId(String stationId);
void deleteByMemberId(String memberId);

View File

@@ -3,6 +3,7 @@ package com.jsowell.pile.service.impl;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.AdapayMemberAccount;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.mapper.AdapayMemberAccountMapper;
@@ -75,7 +76,12 @@ public class AdapayMemberAccountServiceImpl implements IAdapayMemberAccountServi
@Override
public int updateAdapayMemberAccount(AdapayMemberAccount adapayMemberAccount) {
// adapayMemberAccount.setUpdateTime(DateUtils.getNowDate());
return adapayMemberAccountMapper.updateAdapayMemberAccount(adapayMemberAccount);
int i = adapayMemberAccountMapper.updateAdapayMemberAccount(adapayMemberAccount);
if (StringUtils.isNotBlank(adapayMemberAccount.getMerchantId())) {
String redisKey = CacheConstants.ADAPAY_MEMBER_ACCOUNT + adapayMemberAccount.getMerchantId();
redisCache.deleteObject(redisKey);
}
return i;
}
/**
@@ -113,6 +119,12 @@ public class AdapayMemberAccountServiceImpl implements IAdapayMemberAccountServi
return adapayMemberAccount;
}
@Override
public AdapayMemberAccount selectByMemberId(String memberId) {
return adapayMemberAccountMapper.selectByMemberId(memberId);
}
@Override
public String selectAdapayMemberIdByStationId(String stationId) {
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));