记得上下班打卡 | git大法好,push需谨慎

Commit d4aa10f8 authored by zhanggb's avatar zhanggb

~api:nft账号开通;

parent 6f0c2f27
......@@ -13,7 +13,7 @@ public interface IGoblinNftUserService {
* @param name 证件名
* @param idCard 证件号
* @param mobile 手机号
* @return Integer[1-成功]
* @return ResponseDto<GoblinUserNftAccInfoVo>
*/
ResponseDto<GoblinUserNftAccInfoVo> openNftAccount(String uid, String bizCode, String name, String idCard, String mobile);
}
......@@ -45,26 +45,20 @@ public class GoblinNftUserServiceImpl implements IGoblinNftUserService {
userRegisterReqDto.setIdCardType("1");// 同步com.liquidnet.service.galaxy.constant.GalaxyEnum.CardTypeEnum
userRegisterReqDto.setRouterType(GalaxyEnum.RouterTypeEnum.ZXINCHAIN.getCode());
ResponseDto<GalaxyUserRegisterRespDto> userRegisterRespDto = galaxyUserService.userRegister(userRegisterReqDto);
if (userRegisterRespDto.isSuccess()) {
GoblinUserNftAccInfoVo nftAccInfoVo = GoblinUserNftAccInfoVo.getNew();
nftAccInfoVo.setCode(NftAccStatusEnum.StatusAcc.ING.getCode());
nftAccInfoVo.setMsg(NftAccStatusEnum.StatusAcc.ING.getMsg());
nftAccInfoVo.setTime(LocalDateTime.now());
goblinRedisUtils.setOpenAccountInfo(uid, nftAccInfoVo);
galaxyUserService.userRegister(userRegisterReqDto);
// TODO: 2022/5/14 ==zhanggb nft.zxl开户替换队列实现
GalaxyUserRegisterRespDto userRegisterRespDtoData = userRegisterRespDto.getData();
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(),
SqlMapping.get("adam_user_busi_acct.add", uid, AdamEnum.BizAcct.NFT_ZX.name(), userRegisterRespDtoData.getBlockChainAddress(), null, null, 1, LocalDateTime.now())
);
return ResponseDto.success(nftAccInfoVo);
}
openAccountInfo = GoblinUserNftAccInfoVo.getNew();
openAccountInfo.setCode(NftAccStatusEnum.StatusAcc.ING.getCode());
openAccountInfo.setMsg(NftAccStatusEnum.StatusAcc.ING.getMsg());
break;
default:
log.warn("#开通业务账号:无效的业务码[UID={},bizCode={}]", bizCode, uid);
break;
}
log.warn("#开通业务账号:无效的业务码[UID={},bizCode={},name={},idCard={},mobile={}]", uid, bizCode, name, idCard, mobile);
return ResponseDto.failure(ErrorMapping.get("140015"));
}
openAccountInfo.setTime(LocalDateTime.now());
goblinRedisUtils.setOpenAccountInfo(uid, openAccountInfo);
return ResponseDto.success(openAccountInfo);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment