diff --git a/blockchain-server/blockchain-server-eth/src/main/java/com/blockchain/server/eth/controller/EthWalletController.java b/blockchain-server/blockchain-server-eth/src/main/java/com/blockchain/server/eth/controller/EthWalletController.java index 2166f7f..86ac33a 100644 --- a/blockchain-server/blockchain-server-eth/src/main/java/com/blockchain/server/eth/controller/EthWalletController.java +++ b/blockchain-server/blockchain-server-eth/src/main/java/com/blockchain/server/eth/controller/EthWalletController.java @@ -1,23 +1,18 @@ package com.blockchain.server.eth.controller; -import com.blockchain.common.base.constant.BaseConstant; import com.blockchain.common.base.dto.ResultDTO; import com.blockchain.common.base.dto.SessionUserDTO; -import com.blockchain.common.base.exception.RPCException; import com.blockchain.common.base.util.SSOHelper; -import com.blockchain.server.eth.common.enums.EthWalletEnums; -import com.blockchain.server.eth.common.exception.EthWalletException; -import com.blockchain.server.eth.controller.api.EthTokenApi; import com.blockchain.server.eth.controller.api.EthWalletApi; import com.blockchain.server.eth.entity.EthWalletTransfer; import com.blockchain.server.eth.feign.UserFeign; -import com.blockchain.server.eth.service.IEthTokenService; import com.blockchain.server.eth.service.IEthWalletKeyService; import com.blockchain.server.eth.service.IEthWalletService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.apache.tomcat.jni.User; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.bind.annotation.*; @@ -43,6 +38,8 @@ public class EthWalletController { private UserFeign userFeign; + private static final Logger LOG = LoggerFactory.getLogger(EthWalletController.class); + @ApiOperation(value = EthWalletApi.GetWallet.METHOD_API_NAME, notes = EthWalletApi.GetWallet.METHOD_API_NOTE) @GetMapping("/getWallet") public ResultDTO getWallet( @@ -95,13 +92,14 @@ public class EthWalletController { @ApiParam(EthWalletApi.SaveWalletPass.METHOD_API_CODE) @RequestParam(name = "code", required = false) String code, HttpServletRequest request) { SessionUserDTO user = SSOHelper.getUser(redisTemplate, request); - ResultDTO resultDTO = userFeign.validateSmsg(code, user.getTel()); + /* ResultDTO resultDTO = userFeign.validateSmsg(code, user.getTel()); if (resultDTO == null) { throw new EthWalletException(EthWalletEnums.SERVER_IS_TOO_BUSY); } if (resultDTO.getCode() != BaseConstant.REQUEST_SUCCESS) { throw new RPCException(resultDTO.getCode(), resultDTO.getMsg()); - } + }*/ + LOG.info(" user yyyfUserId : "+ user.getYyyfUserId()); ethWalletService.updatePassword(user.getId(), password); return ResultDTO.requstSuccess(); } diff --git a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/UserMainServiceImpl.java b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/UserMainServiceImpl.java index d075e37..909eb12 100644 --- a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/UserMainServiceImpl.java +++ b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/UserMainServiceImpl.java @@ -25,6 +25,8 @@ import com.blockchain.server.user.mapper.UserMainMapper; import com.blockchain.server.user.service.*; import com.codingapi.tx.annotation.TxTransaction; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -59,6 +61,7 @@ public class UserMainServiceImpl implements UserMainService { @Autowired private BtcFeign btcFeign; + private static final Logger LOG = LoggerFactory.getLogger(UserMainServiceImpl.class); @Override public UserMain selectByMobilePhone(String tel) { @@ -97,8 +100,8 @@ public class UserMainServiceImpl implements UserMainService { userLoginService.insertEntity(userId, password);//插入密码信息 int insertRow = userRelationService.insertRelationChain(userId, invitationCode);//插入推荐关系 userInfoService.saveUser(userId,tel, insertRow > 0);//插入用户其他信息 - -/* ResultDTO ethResult = ethFeign.initWallets(userId); + LOG.info("生成钱包开始"); + ResultDTO ethResult = ethFeign.initWallets(userId); if (ethResult.getCode() != BaseConstant.REQUEST_SUCCESS) { throw new RPCException(ethResult.getCode(), ethResult.getMsg()); } @@ -109,7 +112,8 @@ public class UserMainServiceImpl implements UserMainService { ResultDTO btcResult = btcFeign.createWallet(userId); if (btcResult.getCode() != BaseConstant.REQUEST_SUCCESS) { throw new RPCException(btcResult.getCode(), btcResult.getMsg()); - }*/ + } + LOG.info("生成钱包结束"); return user; }