| | |
| | | import com.xcong.excoin.modules.fish.entity.*; |
| | | import com.xcong.excoin.modules.fish.service.MemberCannonService; |
| | | import com.xcong.excoin.modules.fish.vo.CannonSettingVo; |
| | | import com.xcong.excoin.modules.fish.vo.GoldAccountVo; |
| | | import com.xcong.excoin.modules.fish.vo.OwnCannonVo; |
| | | import com.xcong.excoin.modules.member.dao.MemberWalletCoinDao; |
| | | import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity; |
| | | import com.xcong.excoin.utils.RedisUtils; |
| | |
| | | return Result.ok("兑换成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result getGoldAccount() { |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberAccountGold memberAccountGold = memberAccountGoldDao.selectAccountGoldByMemberId(memberId); |
| | | if(ObjectUtil.isEmpty(memberAccountGold)){ |
| | | MemberAccountGold memberAccountGoldNew = new MemberAccountGold(); |
| | | memberAccountGoldNew.setMemberId(memberId); |
| | | memberAccountGoldNew.setTotalBalance(BigDecimal.ZERO); |
| | | memberAccountGoldNew.setAvailableBalance(BigDecimal.ZERO); |
| | | memberAccountGoldNew.setFrozenBalance(BigDecimal.ZERO); |
| | | memberAccountGoldDao.insert(memberAccountGoldNew); |
| | | } |
| | | GoldAccountVo goldAccountVo = memberAccountGoldDao.selectAccountGoldVoByMemberId(memberId); |
| | | return Result.ok(goldAccountVo); |
| | | } |
| | | |
| | | @Override |
| | | public Result getOwnCannon() { |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | List<OwnCannonVo> cannonOwnRecords = cannonOwnRecordDao.selectCannonOwnRecordsByMemberId(memberId); |
| | | return Result.ok(cannonOwnRecords); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(UUID.randomUUID().toString()); |
| | | } |