Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
lei
fzm-joying
Commits
f1c433de
Commit
f1c433de
authored
Sep 15, 2021
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
9da074e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
33 deletions
+6
-33
User.java
joying-common/src/main/java/com/fzm/common/entity/User.java
+1
-1
LogAop.java
joying-portal/src/main/java/com/fzm/portal/aop/LogAop.java
+1
-29
CollectionController.java
.../java/com/fzm/portal/controller/CollectionController.java
+4
-3
No files found.
joying-common/src/main/java/com/fzm/common/entity/User.java
View file @
f1c433de
...
...
@@ -50,7 +50,7 @@ public class User extends AbstractUser {
@ApiModelProperty
(
"认证类型 0-个人认证 1-企业认证"
)
private
Integer
authType
;
@ApiModelProperty
(
"实名认证状态 0-未认证 1-认证成功 2-认证失败
3-认证中
"
)
@ApiModelProperty
(
"实名认证状态 0-未认证 1-认证成功 2-认证失败"
)
private
Integer
authStatus
;
@ApiModelProperty
(
"是否发行过nft作品 0-否 1-是"
)
...
...
joying-portal/src/main/java/com/fzm/portal/aop/LogAop.java
View file @
f1c433de
...
...
@@ -46,7 +46,7 @@ public class LogAop {
private
static
ThreadLocal
<
Long
>
threadLocal
=
new
ThreadLocal
<>();
@Pointcut
(
value
=
"execution(public * com.fzm.portal.controller.*.*(..))"
)
@Pointcut
(
value
=
"execution(public * com.fzm.portal.controller.
.
*.*(..))"
)
public
void
pointCut
()
{
}
...
...
@@ -127,32 +127,4 @@ public class LogAop {
return
argList
;
}
public
static
void
main
(
String
[]
args
){
try
{
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
// 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
Credential
cred
=
new
Credential
(
"AKIDlMm3EC2dxXw50f4C4f092ey2pLaaKnyt"
,
"g5D4ey1nJZXEhtoSovkIZYGhqjLgkgNo"
);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile
httpProfile
=
new
HttpProfile
();
httpProfile
.
setEndpoint
(
"faceid.tencentcloudapi.com"
);
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile
clientProfile
=
new
ClientProfile
();
clientProfile
.
setHttpProfile
(
httpProfile
);
// 实例化要请求产品的client对象,clientProfile是可选的
FaceidClient
client
=
new
FaceidClient
(
cred
,
"ap-shanghai"
,
clientProfile
);
// 实例化一个请求对象,每个接口都会对应一个request对象
IdCardOCRVerificationRequest
req
=
new
IdCardOCRVerificationRequest
();
String
url
=
"https://test-nft.oss-cn-hangzhou.aliyuncs.com/20210913/ff8e541497d1482895be1f038bb0430e/微信图片_20210913144401.jpg"
;
req
.
setImageUrl
(
url
);
// 返回的resp是一个IdCardOCRVerificationResponse的实例,与请求对象对应
IdCardOCRVerificationResponse
resp
=
client
.
IdCardOCRVerification
(
req
);
// 输出json格式的字符串回包
System
.
out
.
println
(
IdCardOCRVerificationResponse
.
toJsonString
(
resp
));
}
catch
(
TencentCloudSDKException
e
)
{
System
.
out
.
println
(
e
.
toString
());
}
}
}
joying-portal/src/main/java/com/fzm/portal/controller/CollectionController.java
View file @
f1c433de
...
...
@@ -24,10 +24,11 @@ public class CollectionController {
@Resource
private
NftService
nftService
;
@Authentication
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"收藏 | 取消收藏"
,
notes
=
"用户如果已经收藏了当前作品的话就是取消收藏,反之就是收藏"
)
public
ResponseModel
add
(
@ApiParam
(
value
=
"nft的主键"
)
@RequestParam
Integer
id
)
{
@ApiOperation
(
value
=
"
添加
收藏 | 取消收藏"
,
notes
=
"用户如果已经收藏了当前作品的话就是取消收藏,反之就是收藏"
)
public
ResponseModel
<
Boolean
>
add
(
@ApiParam
(
value
=
"nft的主键"
)
@RequestParam
Integer
id
)
{
Boolean
result
=
nftService
.
collection
(
id
);
return
ResponseModel
.
success
(
result
);
}
...
...
@@ -35,7 +36,7 @@ public class CollectionController {
@Authentication
@GetMapping
(
"/list"
)
@ApiOperation
(
value
=
"获取用户的收藏列表"
)
p
rivate
ResponseModel
<
List
<
CollectionNftVo
>>
list
(
@RequestHeader
(
value
=
"Authorization"
)
String
token
)
{
p
ublic
ResponseModel
<
List
<
CollectionNftVo
>>
list
(
)
{
List
<
CollectionNftVo
>
list
=
nftService
.
getCollectionList
();
return
ResponseModel
.
success
(
list
);
}
...
...
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