KKSU
2024-04-18 bcb00e8735f149cc5c5b37a2311cc0a7ceb4a18b
代币设置
3 files modified
32 ■■■■ changed files
src/main/java/cc/mrbird/febs/dapp/mapper/DappFundFlowDao.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java 16 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappFundFlowDao.xml 14 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/mapper/DappFundFlowDao.java
@@ -30,6 +30,8 @@
    BigDecimal selectAmountTotalByTypeAndMemberIdAndDate(@Param("memberId") Long memberId,@Param("type") int type, @Param("date") Date date);
    List<DappFundFlowEntity> selectAmountTotalByTypeAndMemberIdAndDateAndState(@Param("memberId") Long memberId,@Param("type") int type,@Param("status") int state, @Param("date") Date date);
    IPage<MoneyFlowVo> findMoneyFlowVos(Page<MoneyFlowVo> page, @Param("record")TeamListDto teamListDto);
    IPage<DappFundFlowEntity> selectInPages(Page<DappFundFlowEntity> page, @Param("record")DappFundFlowEntity dappFundFlowEntity);
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()));
src/main/resources/mapper/dapp/DappFundFlowDao.xml
@@ -100,6 +100,20 @@
        </if>
    </select>
    <select id="selectAmountTotalByTypeAndMemberIdAndDateAndState" resultType="cc.mrbird.febs.dapp.entity.DappFundFlowEntity">
        select
        *
        from
        dapp_fund_flow
        where
        member_id = #{memberId}
        and type = #{type}
          and status = #{status}
        <if test="date != null">
            and date_format(create_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d');
        </if>
    </select>
    <select id="findMoneyFlowVos" resultType="cc.mrbird.febs.dapp.vo.MoneyFlowVo">