| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public interface MemberCoinWithdrawDao extends BaseMapper<MemberCoinWithdrawEntity> { |
| | | |
| | | IPage<AdminMemberCoinWithdrawVo> findMemberWithdrawCoinInPage(Page<MemberCoinWithdrawEntity> page, @Param("record")MemberCoinWithdrawEntity memberCoinWithdrawEntity); |
| | | |
| | | Integer selectByMemberIdAndCreateTime(@Param("memberId")Long memberIdOut, @Param("createTime")String createTime, @Param("type")String type); |
| | | |
| | | List<MemberCoinWithdrawEntity> selectListByDate(@Param("date")Date date); |
| | | } |
| | |
| | | public void withdraw(WithdrawDto withdrawDto) { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | |
| | | List<MemberCoinWithdrawEntity> memberCoinWithdrawEntities = memberCoinWithdrawDao.selectListByDate(new Date()); |
| | | if(CollUtil.isNotEmpty(memberCoinWithdrawEntities)){ |
| | | throw new FebsException("今日已提现"); |
| | | } |
| | | |
| | | DappWalletCoinEntity walletCoin = dappWalletCoinDao.selectByMemberId(member.getId()); |
| | | if (walletCoin.getAvailableAmount().compareTo(withdrawDto.getAmount()) < 0) { |
| | | throw new FebsException("Balance Not Enough"); |
| | |
| | | and a.is_inside = #{type} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectListByDate" resultType="cc.mrbird.febs.dapp.entity.MemberCoinWithdrawEntity"> |
| | | select |
| | | * |
| | | from |
| | | member_coin_withdraw |
| | | where date_format(create_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d') |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | id: 'withdrawTable', |
| | | url: ctx + 'flow/fundFlow?type=21', |
| | | cols: [[ |
| | | {field: 'address', title: '地址', minWidth: 130}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | {field: 'amountReal', title: '到账金额(USDT)', minWidth: 130}, |
| | | {field: 'address', title: '地址', minWidth: 200}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 150}, |
| | | {field: 'amountReal', title: '到账金额(USDT)', minWidth: 100}, |
| | | {title: '提现状态', templet: '#withdraw-status'}, |
| | | {field: 'amount', title: '提现金额(USDT)', minWidth: 130}, |
| | | {field: 'fee', title: '手续费', minWidth: 130}, |
| | | {field: 'amount', title: '提现金额(USDT)', minWidth: 100}, |
| | | {field: 'fee', title: '手续费', minWidth: 100}, |
| | | {title: '操作', toolbar: '#withdraw-option', minWidth: 200} |
| | | ]] |
| | | }); |