记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
cf0214a6
Commit
cf0214a6
authored
May 12, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开通和获取整理
parent
0a5de099
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
17 deletions
+27
-17
NftAccStatusEnum.java
...m/liquidnet/service/goblin/constant/NftAccStatusEnum.java
+1
-1
GoblinUserNftAccInfoVo.java
.../liquidnet/service/goblin/dto/GoblinUserNftAccInfoVo.java
+1
-1
IGoblinNftUserService.java
...quidnet/service/goblin/service/IGoblinNftUserService.java
+2
-1
GoblinNFTUserController.java
...et/service/goblin/controller/GoblinNFTUserController.java
+9
-3
GoblinNftUserServiceImpl.java
...service/goblin/service/impl/GoblinNftUserServiceImpl.java
+11
-4
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+3
-7
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/NftAccStatusEnum.java
View file @
cf0214a6
...
@@ -8,7 +8,7 @@ public class NftAccStatusEnum {
...
@@ -8,7 +8,7 @@ public class NftAccStatusEnum {
ING
(
"1000"
,
"开通中"
),
ING
(
"1000"
,
"开通中"
),
SUCCESS
(
"2000"
,
"开通成功"
),
SUCCESS
(
"2000"
,
"开通成功"
),
FAILURE1
(
"3000"
,
"实名失败"
),
FAILURE1
(
"3000"
,
"实名失败"
),
FAILURE2
(
"3001"
,
"开通失败
重试"
),
FAILURE2
(
"3001"
,
"开通失败
可
重试"
),
FAILURE3
(
"3002"
,
"该身份证已开通数字账号 不可重复操作"
),
FAILURE3
(
"3002"
,
"该身份证已开通数字账号 不可重复操作"
),
;
;
private
final
String
code
;
private
final
String
code
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/GoblinUserNftAccInfoVo.java
View file @
cf0214a6
...
@@ -15,7 +15,7 @@ public class GoblinUserNftAccInfoVo implements Serializable, Cloneable {
...
@@ -15,7 +15,7 @@ public class GoblinUserNftAccInfoVo implements Serializable, Cloneable {
private
static
final
long
serialVersionUID
=
9036417838200526658L
;
private
static
final
long
serialVersionUID
=
9036417838200526658L
;
@ApiModelProperty
(
position
=
11
,
value
=
"状态码"
)
@ApiModelProperty
(
position
=
11
,
value
=
"状态码
1000开通中 2000开通成功 3000实名失败 3001开通失败可重试 3002该身份证已开通数字账号 不可重复操作
"
)
private
String
code
;
private
String
code
;
@ApiModelProperty
(
position
=
12
,
value
=
"提示信息"
)
@ApiModelProperty
(
position
=
12
,
value
=
"提示信息"
)
private
String
msg
;
private
String
msg
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinNftUserService.java
View file @
cf0214a6
package
com
.
liquidnet
.
service
.
goblin
.
service
;
package
com
.
liquidnet
.
service
.
goblin
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo
;
public
interface
IGoblinNftUserService
{
public
interface
IGoblinNftUserService
{
...
@@ -14,5 +15,5 @@ public interface IGoblinNftUserService {
...
@@ -14,5 +15,5 @@ public interface IGoblinNftUserService {
* @param mobile 手机号
* @param mobile 手机号
* @return Integer[1-成功]
* @return Integer[1-成功]
*/
*/
ResponseDto
<
Integer
>
openNftAccount
(
String
uid
,
String
bizCode
,
String
name
,
String
idCard
,
String
mobile
);
ResponseDto
<
GoblinUserNftAccInfoVo
>
openNftAccount
(
String
uid
,
String
bizCode
,
String
name
,
String
idCard
,
String
mobile
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinNFTUserController.java
View file @
cf0214a6
...
@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.CurrentUtil;
...
@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.CurrentUtil;
import
com.liquidnet.commons.lang.util.IDCardUtil
;
import
com.liquidnet.commons.lang.util.IDCardUtil
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.NftAccStatusEnum
;
import
com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo
;
import
com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo
;
import
com.liquidnet.service.goblin.service.IGoblinNftUserService
;
import
com.liquidnet.service.goblin.service.IGoblinNftUserService
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
...
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Pattern
;
import
java.time.LocalDateTime
;
@Api
(
tags
=
"NFT:账号相关"
)
@Api
(
tags
=
"NFT:账号相关"
)
@Slf4j
@Slf4j
...
@@ -39,7 +41,7 @@ public class GoblinNFTUserController {
...
@@ -39,7 +41,7 @@ public class GoblinNFTUserController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"idCard"
,
value
=
"身份证号"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"idCard"
,
value
=
"身份证号"
),
})
})
@PostMapping
(
value
=
"open/account"
)
@PostMapping
(
value
=
"open/account"
)
public
ResponseDto
<
Integer
>
openAccount
(
@Pattern
(
regexp
=
"\\b(NFT_ZX)\\b"
,
message
=
"业务码无效"
)
public
ResponseDto
<
GoblinUserNftAccInfoVo
>
openAccount
(
@Pattern
(
regexp
=
"\\b(NFT_ZX)\\b"
,
message
=
"业务码无效"
)
@RequestParam
String
bizCode
,
@RequestParam
String
bizCode
,
@RequestParam
(
required
=
true
)
String
name
,
@RequestParam
(
required
=
true
)
String
name
,
@RequestParam
(
required
=
true
)
String
idCard
)
{
@RequestParam
(
required
=
true
)
String
idCard
)
{
...
@@ -77,7 +79,11 @@ public class GoblinNFTUserController {
...
@@ -77,7 +79,11 @@ public class GoblinNFTUserController {
@ApiOperation
(
value
=
"业务账号开通信息"
)
@ApiOperation
(
value
=
"业务账号开通信息"
)
@GetMapping
(
value
=
"open/account/info"
)
@GetMapping
(
value
=
"open/account/info"
)
public
ResponseDto
<
GoblinUserNftAccInfoVo
>
openAccountInfo
()
{
public
ResponseDto
<
GoblinUserNftAccInfoVo
>
openAccountInfo
()
{
goblinRedisUtils
.
setOpenAccountInfo
(
CurrentUtil
.
getCurrentUid
());
GoblinUserNftAccInfoVo
nftAccInfoVo
=
GoblinUserNftAccInfoVo
.
getNew
();
return
ResponseDto
.
success
(
goblinRedisUtils
.
openAccountInfo
(
CurrentUtil
.
getCurrentUid
()));
nftAccInfoVo
.
setCode
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getCode
());
nftAccInfoVo
.
setMsg
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getMsg
());
nftAccInfoVo
.
setTime
(
LocalDateTime
.
now
());
goblinRedisUtils
.
setOpenAccountInfo
(
CurrentUtil
.
getCurrentUid
(),
nftAccInfoVo
);
return
ResponseDto
.
success
(
goblinRedisUtils
.
getOpenAccountInfo
(
CurrentUtil
.
getCurrentUid
()));
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinNftUserServiceImpl.java
View file @
cf0214a6
...
@@ -9,6 +9,8 @@ import com.liquidnet.service.galaxy.constant.GalaxyEnum;
...
@@ -9,6 +9,8 @@ import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto
;
import
com.liquidnet.service.galaxy.service.IGalaxyUserService
;
import
com.liquidnet.service.galaxy.service.IGalaxyUserService
;
import
com.liquidnet.service.goblin.constant.NftAccStatusEnum
;
import
com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo
;
import
com.liquidnet.service.goblin.service.IGoblinNftUserService
;
import
com.liquidnet.service.goblin.service.IGoblinNftUserService
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.QueueUtils
;
import
com.liquidnet.service.goblin.util.QueueUtils
;
...
@@ -30,8 +32,9 @@ public class GoblinNftUserServiceImpl implements IGoblinNftUserService {
...
@@ -30,8 +32,9 @@ public class GoblinNftUserServiceImpl implements IGoblinNftUserService {
private
IGalaxyUserService
galaxyUserService
;
private
IGalaxyUserService
galaxyUserService
;
@Override
@Override
public
ResponseDto
<
Integer
>
openNftAccount
(
String
uid
,
String
bizCode
,
String
name
,
String
idCard
,
String
mobile
)
{
public
ResponseDto
<
GoblinUserNftAccInfoVo
>
openNftAccount
(
String
uid
,
String
bizCode
,
String
name
,
String
idCard
,
String
mobile
)
{
if
(
goblinRedisUtils
.
getNftNumAccount
(
uid
))
return
ResponseDto
.
success
(
1
);
GoblinUserNftAccInfoVo
openAccountInfo
=
goblinRedisUtils
.
getOpenAccountInfo
(
uid
);
if
(
null
!=
openAccountInfo
)
return
ResponseDto
.
success
(
openAccountInfo
);
switch
(
bizCode
)
{
switch
(
bizCode
)
{
case
"NFT_ZX"
:
case
"NFT_ZX"
:
GalaxyUserRegisterReqDto
userRegisterReqDto
=
GalaxyUserRegisterReqDto
.
getNew
();
GalaxyUserRegisterReqDto
userRegisterReqDto
=
GalaxyUserRegisterReqDto
.
getNew
();
...
@@ -44,14 +47,18 @@ public class GoblinNftUserServiceImpl implements IGoblinNftUserService {
...
@@ -44,14 +47,18 @@ public class GoblinNftUserServiceImpl implements IGoblinNftUserService {
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegisterRespDto
=
galaxyUserService
.
userRegister
(
userRegisterReqDto
);
ResponseDto
<
GalaxyUserRegisterRespDto
>
userRegisterRespDto
=
galaxyUserService
.
userRegister
(
userRegisterReqDto
);
if
(
userRegisterRespDto
.
isSuccess
())
{
if
(
userRegisterRespDto
.
isSuccess
())
{
goblinRedisUtils
.
setNftNumAccount
(
uid
);
GoblinUserNftAccInfoVo
nftAccInfoVo
=
GoblinUserNftAccInfoVo
.
getNew
();
nftAccInfoVo
.
setCode
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getCode
());
nftAccInfoVo
.
setMsg
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getMsg
());
nftAccInfoVo
.
setTime
(
LocalDateTime
.
now
());
goblinRedisUtils
.
setOpenAccountInfo
(
uid
,
nftAccInfoVo
);
GalaxyUserRegisterRespDto
userRegisterRespDtoData
=
userRegisterRespDto
.
getData
();
GalaxyUserRegisterRespDto
userRegisterRespDtoData
=
userRegisterRespDto
.
getData
();
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_STORE
.
getKey
(),
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
())
SqlMapping
.
get
(
"adam_user_busi_acct.add"
,
uid
,
AdamEnum
.
BizAcct
.
NFT_ZX
.
name
(),
userRegisterRespDtoData
.
getBlockChainAddress
(),
null
,
null
,
1
,
LocalDateTime
.
now
())
);
);
return
ResponseDto
.
success
(
1
);
return
ResponseDto
.
success
(
nftAccInfoVo
);
}
}
break
;
break
;
default
:
default
:
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
cf0214a6
...
@@ -1756,7 +1756,7 @@ public class GoblinRedisUtils {
...
@@ -1756,7 +1756,7 @@ public class GoblinRedisUtils {
}
}
}
}
public
GoblinUserNftAccInfoVo
o
penAccountInfo
(
String
userId
)
{
public
GoblinUserNftAccInfoVo
getO
penAccountInfo
(
String
userId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
.
concat
(
userId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
.
concat
(
userId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
...
@@ -1765,13 +1765,9 @@ public class GoblinRedisUtils {
...
@@ -1765,13 +1765,9 @@ public class GoblinRedisUtils {
return
(
GoblinUserNftAccInfoVo
)
obj
;
return
(
GoblinUserNftAccInfoVo
)
obj
;
}
}
}
}
public
void
setOpenAccountInfo
(
String
userId
)
{
public
void
setOpenAccountInfo
(
String
userId
,
GoblinUserNftAccInfoVo
nftAccInfoVo
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
.
concat
(
userId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
.
concat
(
userId
);
GoblinUserNftAccInfoVo
nftAccInfoVo
=
GoblinUserNftAccInfoVo
.
getNew
();
redisUtil
.
set
(
redisKey
,
nftAccInfoVo
);
nftAccInfoVo
.
setCode
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getCode
());
nftAccInfoVo
.
setMsg
(
NftAccStatusEnum
.
StatusAcc
.
ING
.
getMsg
());
nftAccInfoVo
.
setTime
(
LocalDateTime
.
now
());
Object
obj
=
redisUtil
.
set
(
redisKey
,
nftAccInfoVo
);
}
}
public
int
getIsExchange
(
String
skuId
)
{
public
int
getIsExchange
(
String
skuId
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment