mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 20:45:10 +08:00
根据运营商id逻辑删除审核未通过的汇付会员账户
This commit is contained in:
@@ -68,4 +68,11 @@ public interface AdapayMemberAccountService {
|
||||
|
||||
AdapayMemberAccount getDefault();
|
||||
|
||||
/**
|
||||
* 根据运营商id逻辑删除审核未通过的汇付会员账户
|
||||
* @param merchantId
|
||||
* @return
|
||||
*/
|
||||
int deleteAuditFailed(String merchantId);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,12 +9,13 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||
import com.jsowell.pile.mapper.AdapayMemberAccountMapper;
|
||||
import com.jsowell.pile.service.AdapayMemberAccountService;
|
||||
import com.jsowell.pile.service.PileStationInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
@@ -28,14 +29,9 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic
|
||||
@Autowired
|
||||
private AdapayMemberAccountMapper adapayMemberAccountMapper;
|
||||
|
||||
@Autowired
|
||||
private PileStationInfoService pileStationInfoService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
@@ -119,10 +115,6 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic
|
||||
return adapayMemberAccountMapper.selectByMemberId(memberId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateAdapayMemberAccountByMemberId(AdapayMemberAccount adapayMemberAccount) {
|
||||
adapayMemberAccountMapper.updateAdapayMemberAccountByMemberId(adapayMemberAccount);
|
||||
@@ -136,6 +128,29 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic
|
||||
return account;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据运营商id逻辑删除审核未通过的汇付会员账户
|
||||
* @param merchantId 运营商id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int deleteAuditFailed(String merchantId) {
|
||||
int result = 0;
|
||||
// 查询运营商所有的汇付会员账号配置信息
|
||||
List<AdapayMemberAccount> accountList = this.selectAdapayMemberAccountList(merchantId);
|
||||
if (CollectionUtils.isNotEmpty(accountList)) {
|
||||
List<String> ids = accountList.stream()
|
||||
.filter(x -> StringUtils.equals(x.getStatus(), Constants.TWO))
|
||||
.map(x -> x.getId() + "")
|
||||
.collect(Collectors.toList());
|
||||
result = this.deleteAdapayMemberAccountByIds(ids);
|
||||
// 清缓存
|
||||
String redisKey = CacheConstants.ADAPAY_MEMBER_ACCOUNT + merchantId;
|
||||
redisCache.deleteObject(redisKey);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int insert(AdapayMemberAccount record) {
|
||||
|
||||
Reference in New Issue
Block a user