| | |
| | | import cc.mrbird.febs.dapp.enumerate.*; |
| | | import cc.mrbird.febs.dapp.mapper.*; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.soccer.entity.SoccerLeagues; |
| | | import cc.mrbird.febs.dapp.vo.*; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import cc.mrbird.febs.system.entity.User; |
| | |
| | | |
| | | @Override |
| | | public List<AdminAgentLevelOptionTreeVo> getAgentLevelOption() { |
| | | return dataDictionaryCustomMapper.getAgentLevelOption(); |
| | | List<AdminAgentLevelOptionTreeVo> agentLevelOption = dataDictionaryCustomMapper.getAgentLevelOption(); |
| | | AdminAgentLevelOptionTreeVo adminAgentLevelOptionTreeVo = new AdminAgentLevelOptionTreeVo(); |
| | | adminAgentLevelOptionTreeVo.setId("MEMBER"); |
| | | adminAgentLevelOptionTreeVo.setName("MEMBER"); |
| | | agentLevelOption.add(adminAgentLevelOptionTreeVo); |
| | | return agentLevelOption; |
| | | } |
| | | |
| | | @Override |
| | |
| | | public FebsResponse salePackage(SalePackageDto salePackageDto) { |
| | | Long memberId = LoginUserUtil.getAppUser().getId(); |
| | | BigDecimal cnt = salePackageDto.getCnt(); |
| | | |
| | | if(ObjectUtil.isEmpty(salePackageDto.getCnt())){ |
| | | throw new FebsException("请输入正确的数量"); |
| | | } |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | | |
| | | if(2 == dappMemberEntity.getChangeAble()){ |
| | | throw new FebsException("账号已冻结"); |
| | | } |
| | | BigDecimal saleDoing = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId, FundFlowEnum.SALE_PACKAGE.getCode(), DappFundFlowEntity.WITHDRAW_STATUS_ING); |
| | | if(BigDecimal.ZERO.compareTo(saleDoing) < 0){ |
| | | throw new FebsException("正在进行中,请稍后再试"); |
| | |
| | | if(ObjectUtil.isEmpty(dappMemberEntity)) { |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | dappMemberEntity.setChangeAble(1); |
| | | dappMemberEntity.setChangeAble(2); |
| | | dappMemberDao.updateById(dappMemberEntity); |
| | | return new FebsResponse().success(); |
| | | } |
| | |
| | | if(ObjectUtil.isEmpty(dappMemberEntity)) { |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | dappMemberEntity.setChangeAble(2); |
| | | dappMemberEntity.setChangeAble(1); |
| | | dappMemberDao.updateById(dappMemberEntity); |
| | | |
| | | redisUtils.hdel(AppContants.REDIS_KEY_SIGN, dappMemberEntity.getAddress()); |
| | |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SoccerLeagues> selectSoccerLeaguesInPage(SoccerLeagues soccerLeagues, QueryRequest request) { |
| | | Page<SoccerLeagues> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<SoccerLeagues> soccerLeaguesIPage = dappMemberDao.selectSoccerLeaguesInPage(soccerLeagues, page); |
| | | return soccerLeaguesIPage; |
| | | } |
| | | |
| | | public static List<List<String>> partitionList(List<String> originalList, int partitionSize) { |
| | | List<List<String>> partitionedList = new ArrayList<>(); |
| | | int size = originalList.size(); |