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

Commit 97603b3e authored by anjiabin's avatar anjiabin

修改一个身份证只能开通一个数字账户

parent af2c8da9
......@@ -11,6 +11,7 @@ package com.liquidnet.service.galaxy.constant;
*/
public class GalaxyConstant {
//可删除key
public static final String REDIS_KEY_GALAXY_USER_ID_CARD="galaxy:user_id_card:";
public static final String REDIS_KEY_GALAXY_USER="galaxy:user:";
public static final String REDIS_KEY_GALAXY_SERIES="galaxy:series:";
public static final String REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD="galaxy:series:nft:upload:";
......
......@@ -173,6 +173,14 @@ public class ZxinUserCommonBiz {
throw new GalaxyNftUserException(nft003Resp.getCode(),nft003Resp.getMessage());
}
//如果实名认证成功,并且该身份证已经开通过数字账户
if(isRealNameAuthSuccess){
String blockAddress = dataUtils.getGalaxyUserInfoByIdCardNo(reqDto.getRouterType(),idCard);
if(StringUtil.isNotEmpty(blockAddress)){
throw new GalaxyNftUserException(nft003Resp.getCode(),nft003Resp.getMessage());
}
}
if(StringUtil.isNotEmpty(userPubKey)&&StringUtil.isNotEmpty(userPriKey)&&StringUtil.isNotEmpty(userIdentification)){
//1.2.2调用授信平台NFT地址绑定接口
Nft014IdentityBindSubmitByTrustedReqDto nft014ReqDto = Nft014IdentityBindSubmitByTrustedReqDto.getNew();
......@@ -213,6 +221,9 @@ public class ZxinUserCommonBiz {
isBindBlockAddressSuccess = true;
userInfoBo.setBlockChainAddress(address);
//设置
dataUtils.setGalaxyUserInfoByIdCardNo(reqDto.getRouterType(),idCard,address);
}else{
throw new GalaxyNftUserException(nft016Resp.getCode(),nft016Resp.getMessage());
}
......
......@@ -29,6 +29,18 @@ public abstract class AbstractDataUtils {
// private long keyExpireTime = 3600*24*30;
public void setGalaxyUserInfoByIdCardNo(String routerType,String idCardNo, String address) {
this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_USER_ID_CARD.concat(routerType).concat(":") + idCardNo,address);
}
public String getGalaxyUserInfoByIdCardNo(String routerType,String idCardNo) {
Object obj = this.getRedisUtil().get(GalaxyConstant.REDIS_KEY_GALAXY_USER_ID_CARD.concat(routerType).concat(":") + idCardNo);
if(obj!=null){
return (String) obj;
}
return null;
}
public void setGalaxyUserInfo(String routerType,String userId, GalaxyUserInfoBo userInfoBo) {
String userType = GalaxyEnum.RegisterTypeEnum.PERSON.getCode();
this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_USER.concat(routerType).concat(":") + userId,userInfoBo);
......@@ -40,8 +52,8 @@ public abstract class AbstractDataUtils {
this.getQueueUtil().sendMySqlRedis(
SqlMapping.get("galaxy_user_info.insert"),
new Object[]{userId,userInfoBo.getUserName(),userType,userInfoBo.getMobile(),userInfoBo.getIdCardType()
,userInfoBo.getIdCard(),userInfoBo.getMnemonic(),userInfoBo.getIndex(),userInfoBo.getUserIdentification(),userInfoBo.getUserPubKey()
,userInfoBo.getUserPriKey(),userInfoBo.getBlockChainAddress(),userInfoBo.getRouterType(),new Date(),null
,userInfoBo.getIdCard(),userInfoBo.getMnemonic(),userInfoBo.getIndex(),userInfoBo.getUserIdentification(),userInfoBo.getUserPubKey()
,userInfoBo.getUserPriKey(),userInfoBo.getBlockChainAddress(),userInfoBo.getRouterType(),new Date(),null
}
, MQConst.GalaxyQueue.SQL_USER_INFO.getKey()
);
......
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