3 files modified
1 files added
| | |
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealVo; |
| | | import com.xcong.excoin.modules.fish.dto.*; |
| | | import com.xcong.excoin.modules.fish.service.MemberCannonService; |
| | | import com.xcong.excoin.modules.fish.vo.AccountAvaBanlaceVo; |
| | | import com.xcong.excoin.modules.fish.vo.CannonSettingVo; |
| | | import com.xcong.excoin.modules.fish.vo.GoldAccountVo; |
| | | import com.xcong.excoin.modules.fish.vo.OwnCannonVo; |
| | |
| | | private MemberCannonService memberCannonService; |
| | | |
| | | /** |
| | | * 获取账户金币,代币,USDT可用余额 |
| | | */ |
| | | @ApiOperation(value="获取账户金币,代币,USDT可用余额", notes="获取账户金币,代币,USDT可用余额") |
| | | @ApiResponses({@ApiResponse( code = 200, message = "success", response = AccountAvaBanlaceVo.class)}) |
| | | @GetMapping(value="/getAccountAva") |
| | | public Result getAccountAvaBanlace() { |
| | | return memberCannonService.getAccountAvaBanlace(); |
| | | } |
| | | |
| | | /** |
| | | * 获取金币账户 |
| | | */ |
| | | @ApiOperation(value="获取金币账户", notes="获取金币账户") |
| | |
| | | Result getOwnCannon(); |
| | | |
| | | Result fishing(FishingDto fishingDto); |
| | | |
| | | Result getAccountAvaBanlace(); |
| | | } |
| | |
| | | import com.xcong.excoin.modules.fish.dto.*; |
| | | import com.xcong.excoin.modules.fish.entity.*; |
| | | import com.xcong.excoin.modules.fish.service.MemberCannonService; |
| | | import com.xcong.excoin.modules.fish.vo.AccountAvaBanlaceVo; |
| | | import com.xcong.excoin.modules.fish.vo.CannonSettingVo; |
| | | import com.xcong.excoin.modules.fish.vo.GoldAccountVo; |
| | | import com.xcong.excoin.modules.fish.vo.OwnCannonVo; |
| | |
| | | return Result.ok("success"); |
| | | } |
| | | |
| | | @Override |
| | | public Result getAccountAvaBanlace() { |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberAccountGold memberAccountGold = memberAccountGoldDao.selectAccountGoldByMemberId(memberId); |
| | | MemberWalletCoinEntity memberWalletCoinEntityXCT = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.XCT.name()); |
| | | MemberWalletCoinEntity memberWalletCoinEntityUSDT = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.USDT.name()); |
| | | AccountAvaBanlaceVo accountAvaBanlaceVo = new AccountAvaBanlaceVo(); |
| | | accountAvaBanlaceVo.setMemberId(memberId); |
| | | accountAvaBanlaceVo.setGoldAvailableBalance(memberAccountGold.getAvailableBalance() == null?BigDecimal.ZERO:memberAccountGold.getAvailableBalance()); |
| | | accountAvaBanlaceVo.setCoinAvailableBalance(memberWalletCoinEntityXCT.getAvailableBalance() == null?BigDecimal.ZERO:memberWalletCoinEntityXCT.getAvailableBalance()); |
| | | accountAvaBanlaceVo.setUsdtAvailableBalance(memberWalletCoinEntityUSDT.getAvailableBalance() == null?BigDecimal.ZERO:memberWalletCoinEntityUSDT.getAvailableBalance()); |
| | | return Result.ok(accountAvaBanlaceVo); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(UUID.randomUUID().toString()); |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.fish.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AccountAvaBanlaceVo", description = "") |
| | | public class AccountAvaBanlaceVo { |
| | | |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty(value = "金币可用余额") |
| | | private BigDecimal goldAvailableBalance; |
| | | |
| | | @ApiModelProperty(value = "代币可用余额") |
| | | private BigDecimal coinAvailableBalance; |
| | | |
| | | @ApiModelProperty(value = "usdt可用余额") |
| | | private BigDecimal usdtAvailableBalance; |
| | | } |