| | |
| | | import cc.mrbird.febs.common.enumerates.ProductEnum; |
| | | import cc.mrbird.febs.common.utils.MallUtils; |
| | | import cc.mrbird.febs.mall.dto.TeamPerkDto; |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.entity.MallOrderItem; |
| | | import cc.mrbird.febs.mall.entity.MallProductBuy; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.quartz.OrderSettlementJob; |
| | | import cc.mrbird.febs.mall.service.*; |
| | |
| | | private NBYHService nbyhService; |
| | | @Autowired |
| | | private IAdminMallMemberService mallMemberService; |
| | | @Autowired |
| | | private MallProductNftMapper mallProductNftMapper; |
| | | |
| | | @Test |
| | | public void agentProfitTrade() { |
| | | // agentService.timeGetOrderBuy(); |
| | | // agentService.BuyToSell(); |
| | | // try { |
| | | // System.out.println(resourceLoader.getResource("classpath:lkl/api_private_key.pem").getInputStream()); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // nbyhService.tradeSinge(306L); |
| | | // nbyhService.tradeSingeOuterTransfer(306L); |
| | | // nbyhService.accountInfoQuery(306L); |
| | | // nbyhService.transferResultInfoQuery(315L); |
| | | // |
| | | // mallMemberService.chargeAgree(307L); |
| | | // mallMemberService.searchInfo(307L); |
| | | |
| | | // agentService.perkAgent(); |
| | | MallProductNft mallProductNft = mallProductNftMapper.selectById(4L); |
| | | BigDecimal profitPercent = mallProductNft.getProfit(); |
| | | System.out.println(profitPercent); |
| | | MallProductBuy mallProductBuy = mallProductBuyMapper.selectById(184L); |
| | | BigDecimal nftTotal = mallProductBuy.getNftTotal(); |
| | | System.out.println(nftTotal); |
| | | BigDecimal totalPerk = mallProductBuy.getTotalPerk(); |
| | | System.out.println(totalPerk); |
| | | BigDecimal profit = nftTotal.multiply(profitPercent.multiply(new BigDecimal(0.01))).setScale(2,BigDecimal.ROUND_DOWN); |
| | | System.out.println(profit); |
| | | BigDecimal bigDecimal = totalPerk.subtract(profit).setScale(2, BigDecimal.ROUND_DOWN); |
| | | System.out.println(bigDecimal); |
| | | } |
| | | @Test |
| | | public void agentProfit() { |