|
|
@ -4,6 +4,7 @@ import com.blockchain.common.base.dto.ResultDTO; |
|
|
|
import com.blockchain.common.base.util.SSOHelper; |
|
|
|
import com.blockchain.common.base.util.SSOHelper; |
|
|
|
import com.blockchain.server.btc.common.constants.BtcApplicationConstans; |
|
|
|
import com.blockchain.server.btc.common.constants.BtcApplicationConstans; |
|
|
|
import com.blockchain.server.btc.controller.api.BtcWalletApi; |
|
|
|
import com.blockchain.server.btc.controller.api.BtcWalletApi; |
|
|
|
|
|
|
|
import com.blockchain.server.btc.controller.api.BtcWalletTransferApi; |
|
|
|
import com.blockchain.server.btc.service.BtcWalletService; |
|
|
|
import com.blockchain.server.btc.service.BtcWalletService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@ -51,4 +52,15 @@ public class BtcWalletController { |
|
|
|
String userOpenId = SSOHelper.getUserId(redisTemplate, request); |
|
|
|
String userOpenId = SSOHelper.getUserId(redisTemplate, request); |
|
|
|
return ResultDTO.requstSuccess(btcWalletService.handleTransfer(userOpenId,fromType, toType, coinName, amount)); |
|
|
|
return ResultDTO.requstSuccess(btcWalletService.handleTransfer(userOpenId,fromType, toType, coinName, amount)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = BtcWalletApi.ResetWallet.METHOD_API_NAME, notes = BtcWalletApi.ResetWallet.METHOD_API_NOTE) |
|
|
|
|
|
|
|
@PostMapping("/resetWallet") |
|
|
|
|
|
|
|
public ResultDTO resetWallet(HttpServletRequest request, |
|
|
|
|
|
|
|
@ApiParam(BtcWalletApi.ResetWallet.TOADDR) @RequestParam("addr") String addr, |
|
|
|
|
|
|
|
@ApiParam(BtcWalletApi.ResetWallet.TOKENID) @RequestParam("tokenId") String tokenId, |
|
|
|
|
|
|
|
@ApiParam(BtcWalletApi.ResetWallet.WALLET_TYPE) @RequestParam(value = "walletType", defaultValue = BtcApplicationConstans.TYPE_CCT) String walletType) { |
|
|
|
|
|
|
|
String userOpenId = SSOHelper.getUserId(redisTemplate, request); |
|
|
|
|
|
|
|
return ResultDTO.requstSuccess(btcWalletService.resetWallet(userOpenId, addr, tokenId, walletType)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |