| | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | |
| | | MallProductBuy mallProductBuy = mallProductBuyMapper.selectMemberIdAndNFTIdAndStateAndMateState( |
| | | memberId,productNFTId,ProductEnum.PRODUCT_BUY_ON_GOING.getValue(),ProductEnum.PRODUCT_BUY_MATE_STATE_FAIL.getValue()); |
| | | if(ObjectUtil.isNotEmpty(mallProductBuy)){ |
| | | throw new FebsException("不可重复预约"); |
| | | throw new FebsException("不可重复开启"); |
| | | } |
| | | QueryWrapper<MallProductBuy> mallProductBuyDone = new QueryWrapper<>(); |
| | | mallProductBuyDone.like("CREATED_TIME", DateUtil.today()); |
| | | mallProductBuyDone.eq("member_id",memberId); |
| | | Integer selectCount = mallProductBuyMapper.selectCount(mallProductBuyDone); |
| | | if(0 < selectCount){ |
| | | throw new FebsException("每日预约一次"); |
| | | throw new FebsException("每日开启一次"); |
| | | } |
| | | |
| | | BigDecimal priceToken = mallProductNft.getPriceToken(); |
| | |
| | | null, |
| | | FlowTypeNewEnum.TOKEN.getValue(), |
| | | MoneyFlowTypeNewEnum.TOKEN_BUY_FROZEN.getDescrition()); |
| | | return new FebsResponse().success(); |
| | | HashMap<String, Long> objectObjectHashMap = new HashMap<>(); |
| | | objectObjectHashMap.put("id",productNFTId); |
| | | objectObjectHashMap.put("time",5L); |
| | | return new FebsResponse().success().data(objectObjectHashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // IPage<ApiOrderRecordListVo> pageBuy = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize()); |
| | | // IPage<ApiOrderRecordListVo> apiOrderListVoIPageBuy = mallProductBuyRecordMapper.selectListInPage(pageBuy, apiOrderListDto); |
| | | // if(CollUtil.isNotEmpty(apiOrderListVoIPageBuy.getRecords())){ |
| | | // for(ApiOrderRecordListVo apiOrderListVo : apiOrderListVoIPageBuy.getRecords()){ |
| | | // objects.add(apiOrderListVo); |
| | | // } |
| | | // } |
| | | IPage<ApiOrderRecordListVo> pageSell = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize()); |
| | | IPage<ApiOrderRecordListVo> apiOrderListVoIPageSell = mallProductSellRecordMapper.selectListInPage(pageSell, apiOrderListDto); |
| | | if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){ |
| | |
| | | } |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse orderSellList(ApiOrderSellDto apiOrderBuyDto) { |
| | | Long memberId = LoginUserUtil.getLoginUser().getId(); |
| | | IPage<ApiOrderSellVo> page = new Page<>(apiOrderBuyDto.getPageNum(), apiOrderBuyDto.getPageSize()); |
| | | apiOrderBuyDto.setMemberId(memberId); |
| | | IPage<ApiOrderSellVo> apiOrderBuyVoIPage = mallProductBuyMapper.selectSellListInPage(page, apiOrderBuyDto); |
| | | return new FebsResponse().success().data(apiOrderBuyVoIPage); |
| | | } |
| | | } |