| | |
| | | package cc.mrbird.febs.dapp.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.ShareCodeUtil; |
| | | import cc.mrbird.febs.dapp.dto.ApproveDto; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | |
| | | public DappMemberEntity findByAddress(String address) { |
| | | return dappMemberDao.selectByAddress(address); |
| | | } |
| | | |
| | | @Override |
| | | public void accountStatus(Long id) { |
| | | DappMemberEntity member = dappMemberDao.selectById(id); |
| | | if (member == null) { |
| | | throw new FebsException("用户不存在"); |
| | | } |
| | | |
| | | if (member.getAccountStatus() == AppContants.INT_FLAG_Y) { |
| | | member.setAccountStatus(AppContants.INT_FLAG_N); |
| | | } else { |
| | | member.setAccountStatus(AppContants.INT_FLAG_Y); |
| | | } |
| | | dappMemberDao.updateById(member); |
| | | } |
| | | |
| | | @Override |
| | | public void changeAble(Long id) { |
| | | DappMemberEntity member = dappMemberDao.selectById(id); |
| | | if (member == null) { |
| | | throw new FebsException("用户不存在"); |
| | | } |
| | | |
| | | if (member.getChangeAble() == AppContants.INT_FLAG_Y) { |
| | | member.setChangeAble(AppContants.INT_FLAG_N); |
| | | } else { |
| | | member.setChangeAble(AppContants.INT_FLAG_Y); |
| | | } |
| | | dappMemberDao.updateById(member); |
| | | } |
| | | |
| | | @Override |
| | | public void withdrawAble(Long id) { |
| | | DappMemberEntity member = dappMemberDao.selectById(id); |
| | | if (member == null) { |
| | | throw new FebsException("用户不存在"); |
| | | } |
| | | |
| | | if (member.getWithdrawAble() == AppContants.INT_FLAG_Y) { |
| | | member.setWithdrawAble(AppContants.INT_FLAG_N); |
| | | } else { |
| | | member.setWithdrawAble(AppContants.INT_FLAG_Y); |
| | | } |
| | | dappMemberDao.updateById(member); |
| | | } |
| | | } |