数据
This commit is contained in:
@@ -11,4 +11,5 @@ import com.ruoyi.cai.domain.AccountBlack;
|
|||||||
*/
|
*/
|
||||||
public interface AccountBlackService extends IService<AccountBlack> {
|
public interface AccountBlackService extends IService<AccountBlack> {
|
||||||
|
|
||||||
|
boolean existsByNameAndAccount(String cardName, String cardAccount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.cai.service.impl;
|
package com.ruoyi.cai.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.cai.domain.AccountBlack;
|
import com.ruoyi.cai.domain.AccountBlack;
|
||||||
import com.ruoyi.cai.mapper.AccountBlackMapper;
|
import com.ruoyi.cai.mapper.AccountBlackMapper;
|
||||||
@@ -14,4 +15,10 @@ import org.springframework.stereotype.Service;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class AccountBlackServiceImpl extends ServiceImpl<AccountBlackMapper,AccountBlack> implements AccountBlackService {
|
public class AccountBlackServiceImpl extends ServiceImpl<AccountBlackMapper,AccountBlack> implements AccountBlackService {
|
||||||
|
@Override
|
||||||
|
public boolean existsByNameAndAccount(String cardName, String cardAccount) {
|
||||||
|
return this.exists(Wrappers.lambdaQuery(AccountBlack.class).eq(AccountBlack::getCardName, cardName)
|
||||||
|
.eq(AccountBlack::getCardAccount, cardAccount)
|
||||||
|
.eq(AccountBlack::getEnableStatus, 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,7 @@ import com.ruoyi.cai.pay.OrderNoUtil;
|
|||||||
import com.ruoyi.cai.pay.OrderTypeEnum;
|
import com.ruoyi.cai.pay.OrderTypeEnum;
|
||||||
import com.ruoyi.cai.rank.RankAdminManager;
|
import com.ruoyi.cai.rank.RankAdminManager;
|
||||||
import com.ruoyi.cai.rank.bean.RankAdminBean;
|
import com.ruoyi.cai.rank.bean.RankAdminBean;
|
||||||
import com.ruoyi.cai.service.AccountBankcardService;
|
import com.ruoyi.cai.service.*;
|
||||||
import com.ruoyi.cai.service.AccountCashService;
|
|
||||||
import com.ruoyi.cai.service.AccountService;
|
|
||||||
import com.ruoyi.cai.service.WithdrawExchangeService;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
@@ -52,6 +49,8 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
|||||||
private WithdrawTotalCache withdrawTotalCache;
|
private WithdrawTotalCache withdrawTotalCache;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RankAdminManager rankAdminManager;
|
private RankAdminManager rankAdminManager;
|
||||||
|
@Autowired
|
||||||
|
private AccountBlackService accountBlackService;
|
||||||
@Override
|
@Override
|
||||||
public void withdraw(WithdrawReq res) {
|
public void withdraw(WithdrawReq res) {
|
||||||
AccountBankcard one = accountBankcardService.getOne(Wrappers.lambdaQuery(AccountBankcard.class)
|
AccountBankcard one = accountBankcardService.getOne(Wrappers.lambdaQuery(AccountBankcard.class)
|
||||||
@@ -63,6 +62,10 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
|||||||
if(withdrawExchange == null){
|
if(withdrawExchange == null){
|
||||||
throw new ServiceException("参数不正确");
|
throw new ServiceException("参数不正确");
|
||||||
}
|
}
|
||||||
|
boolean check = accountBlackService.existsByNameAndAccount(one.getCardName(),one.getCardAccount());
|
||||||
|
if(check){
|
||||||
|
throw new ServiceException("提现失败,错误码: 800900");
|
||||||
|
}
|
||||||
Long traceId = IdManager.nextId();
|
Long traceId = IdManager.nextId();
|
||||||
Long coinNum = withdrawExchange.getCoinNum();
|
Long coinNum = withdrawExchange.getCoinNum();
|
||||||
accountService.withdraw(res.getUserId(), coinNum,traceId);
|
accountService.withdraw(res.getUserId(), coinNum,traceId);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from cai_user t1
|
from cai_user t1
|
||||||
left join cai_user_info t2 on t1.id = t2.user_id
|
left join cai_user_info t2 on t1.id = t2.user_id
|
||||||
left join cai_user_online t4 on t1.id = t4.user_id
|
left join cai_user_online t4 on t1.id = t4.user_id
|
||||||
join cai_account_cash t5 on t1.id = t5.user_id
|
join cai_account_bankcard t5 on t1.id = t5.user_id
|
||||||
where t5.card_account = #{cardAccount} and t5.card_name = #{cardName}
|
where t5.card_account = #{cardAccount} and t5.card_name = #{cardName}
|
||||||
order by t2.last_login_time desc
|
order by t2.last_login_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user