KKSU
2024-04-18 bcb00e8735f149cc5c5b37a2311cc0a7ceb4a18b
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -236,11 +236,17 @@
    @Transactional(rollbackFor = Exception.class)
    public Long transfer(TransferDto transferDto) {
        DappMemberEntity member = LoginUserUtil.getAppUser();
        QueryWrapper<DappFundFlowEntity> objectQueryWrapper = new QueryWrapper<>();
        objectQueryWrapper.eq("type" ,FlowTypeEnum.ZHI_YA.getValue());
        objectQueryWrapper.eq("status" ,DappFundFlowEntity.WITHDRAW_STATUS_AGREE);
        objectQueryWrapper.eq("member_id" ,member.getId());
        List<DappFundFlowEntity> dappFundFlowEntities = dappFundFlowDao.selectList(objectQueryWrapper);
//        QueryWrapper<DappFundFlowEntity> objectQueryWrapper = new QueryWrapper<>();
//        objectQueryWrapper.eq("type" ,FlowTypeEnum.ZHI_YA.getValue());
//        objectQueryWrapper.eq("status" ,DappFundFlowEntity.WITHDRAW_STATUS_AGREE);
//        objectQueryWrapper.eq("member_id" ,member.getId());
//        List<DappFundFlowEntity> dappFundFlowEntities = dappFundFlowDao.selectList(objectQueryWrapper);
        List<DappFundFlowEntity> dappFundFlowEntities = dappFundFlowDao.selectAmountTotalByTypeAndMemberIdAndDateAndState(
                member.getId(),
                FlowTypeEnum.ZHI_YA.getValue(),
                DappFundFlowEntity.WITHDRAW_STATUS_AGREE,
                new Date());
        BigDecimal zhiyaAmount = new BigDecimal(redisUtils.getString(DataDicEnum.MEMBER_ZHIYA_AMOUNT.getValue()));
        Integer zhiyaTime = Integer.parseInt(redisUtils.getString(DataDicEnum.MEMBER_ZHIYA_TIME.getValue()));