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

Commit 9b46e227 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/jxl_0512_nft_acc' into jxl_0512_nft_acc

parents c99b0a96 97603b3e
...@@ -11,6 +11,7 @@ package com.liquidnet.service.galaxy.constant; ...@@ -11,6 +11,7 @@ package com.liquidnet.service.galaxy.constant;
*/ */
public class GalaxyConstant { public class GalaxyConstant {
//可删除key //可删除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_USER="galaxy:user:";
public static final String REDIS_KEY_GALAXY_SERIES="galaxy:series:"; public static final String REDIS_KEY_GALAXY_SERIES="galaxy:series:";
public static final String REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD="galaxy:series:nft:upload:"; public static final String REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD="galaxy:series:nft:upload:";
......
...@@ -13,7 +13,7 @@ adam_user_info.update_qr_code=UPDATE adam_user_info SET qr_code=? WHERE uid=? ...@@ -13,7 +13,7 @@ adam_user_info.update_qr_code=UPDATE adam_user_info SET qr_code=? WHERE uid=?
# ---------------------------------------------------- # ----------------------------------------------------
adam_real_name.add=INSERT INTO adam_real_name (real_name_id,`uid`,`type`,`node`,`name`,id_card,`state`,created_at) VALUES (?,?,?,?,?,?,?,?) adam_real_name.add=INSERT INTO adam_real_name (real_name_id,`uid`,`type`,`node`,`name`,id_card,`state`,created_at) VALUES (?,?,?,?,?,?,?,?)
adam_real_name.del=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='\u4E09\u8981\u7D20\u8BA4\u8BC1\u8986\u76D6' WHERE `uid`=? and `state`=1 and node=2 adam_real_name.del=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='\u4E09\u8981\u7D20\u8BA4\u8BC1\u8986\u76D6' WHERE `uid`=? and `state`=1 and node=2
adam_real_name.del_by_nft=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='\u4E09\u8981\u7D20\u8BA4\u8BC1\u8986\u76D6NFT' WHERE `uid`=? and `state`=1 and node=2 adam_real_name.del_by_nft=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='\u4E09\u8981\u7D20\u8BA4\u8BC1\u8986\u76D6NFT' WHERE `uid`=? and `state`=1
adam_real_name.close=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='close' WHERE `uid`=? adam_real_name.close=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='close' WHERE `uid`=?
# ---------------------------------------------------- # ----------------------------------------------------
......
...@@ -30,8 +30,6 @@ import lombok.extern.slf4j.Slf4j; ...@@ -30,8 +30,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -175,6 +173,14 @@ public class ZxinUserCommonBiz { ...@@ -175,6 +173,14 @@ public class ZxinUserCommonBiz {
throw new GalaxyNftUserException(nft003Resp.getCode(),nft003Resp.getMessage()); 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)){ if(StringUtil.isNotEmpty(userPubKey)&&StringUtil.isNotEmpty(userPriKey)&&StringUtil.isNotEmpty(userIdentification)){
//1.2.2调用授信平台NFT地址绑定接口 //1.2.2调用授信平台NFT地址绑定接口
Nft014IdentityBindSubmitByTrustedReqDto nft014ReqDto = Nft014IdentityBindSubmitByTrustedReqDto.getNew(); Nft014IdentityBindSubmitByTrustedReqDto nft014ReqDto = Nft014IdentityBindSubmitByTrustedReqDto.getNew();
...@@ -215,6 +221,9 @@ public class ZxinUserCommonBiz { ...@@ -215,6 +221,9 @@ public class ZxinUserCommonBiz {
isBindBlockAddressSuccess = true; isBindBlockAddressSuccess = true;
userInfoBo.setBlockChainAddress(address); userInfoBo.setBlockChainAddress(address);
//设置
dataUtils.setGalaxyUserInfoByIdCardNo(reqDto.getRouterType(),idCard,address);
}else{ }else{
throw new GalaxyNftUserException(nft016Resp.getCode(),nft016Resp.getMessage()); throw new GalaxyNftUserException(nft016Resp.getCode(),nft016Resp.getMessage());
} }
...@@ -237,6 +246,7 @@ public class ZxinUserCommonBiz { ...@@ -237,6 +246,7 @@ public class ZxinUserCommonBiz {
userInfoBo.setMobile(mobile); userInfoBo.setMobile(mobile);
userInfoBo.setIdCardType(idCardType); userInfoBo.setIdCardType(idCardType);
userInfoBo.setIdCard(idCard); userInfoBo.setIdCard(idCard);
userInfoBo.setUserIdentification(userIdentification);
dataUtils.updateGalaxyUserInfo(reqDto.getRouterType(),reqDto.getUserId(),userInfoBo); dataUtils.updateGalaxyUserInfo(reqDto.getRouterType(),reqDto.getUserId(),userInfoBo);
} }
} }
......
...@@ -29,6 +29,18 @@ public abstract class AbstractDataUtils { ...@@ -29,6 +29,18 @@ public abstract class AbstractDataUtils {
// private long keyExpireTime = 3600*24*30; // 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) { public void setGalaxyUserInfo(String routerType,String userId, GalaxyUserInfoBo userInfoBo) {
String userType = GalaxyEnum.RegisterTypeEnum.PERSON.getCode(); String userType = GalaxyEnum.RegisterTypeEnum.PERSON.getCode();
this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_USER.concat(routerType).concat(":") + userId,userInfoBo); this.getRedisUtil().set(GalaxyConstant.REDIS_KEY_GALAXY_USER.concat(routerType).concat(":") + userId,userInfoBo);
...@@ -40,8 +52,8 @@ public abstract class AbstractDataUtils { ...@@ -40,8 +52,8 @@ public abstract class AbstractDataUtils {
this.getQueueUtil().sendMySqlRedis( this.getQueueUtil().sendMySqlRedis(
SqlMapping.get("galaxy_user_info.insert"), SqlMapping.get("galaxy_user_info.insert"),
new Object[]{userId,userInfoBo.getUserName(),userType,userInfoBo.getMobile(),userInfoBo.getIdCardType() new Object[]{userId,userInfoBo.getUserName(),userType,userInfoBo.getMobile(),userInfoBo.getIdCardType()
,userInfoBo.getIdCard(),userInfoBo.getMnemonic(),userInfoBo.getIndex(),userInfoBo.getUserIdentification(),userInfoBo.getUserPubKey() ,userInfoBo.getIdCard(),userInfoBo.getMnemonic(),userInfoBo.getIndex(),userInfoBo.getUserIdentification(),userInfoBo.getUserPubKey()
,userInfoBo.getUserPriKey(),userInfoBo.getBlockChainAddress(),userInfoBo.getRouterType(),new Date(),null ,userInfoBo.getUserPriKey(),userInfoBo.getBlockChainAddress(),userInfoBo.getRouterType(),new Date(),null
} }
, MQConst.GalaxyQueue.SQL_USER_INFO.getKey() , 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