记得上下班打卡 | 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
d67dbfeb
Commit
d67dbfeb
authored
Nov 11, 2021
by
zhouhuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_20111115' into dev_20111115
parents
77ecf657
f243c714
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
1 deletion
+21
-1
ChimeConstant.java
...a/com/liquidnet/service/chime/constant/ChimeConstant.java
+3
-0
ChimeUserInfoVo.java
...com/liquidnet/service/chime/vo/mongo/ChimeUserInfoVo.java
+4
-0
ChimeUserServiceImpl.java
...dnet/service/chime/service/impl/ChimeUserServiceImpl.java
+4
-0
ChimeDataUtils.java
.../liquidnet/service/consumer/adam/util/ChimeDataUtils.java
+10
-1
No files found.
liquidnet-bus-api/liquidnet-service-chime-api/src/main/java/com/liquidnet/service/chime/constant/ChimeConstant.java
View file @
d67dbfeb
...
...
@@ -30,4 +30,7 @@ public class ChimeConstant {
public
static
final
String
LOG_USER_OPERATION_LIKE
=
"1"
;
public
static
final
String
LOG_USER_OPERATION_DISLIKE
=
"2"
;
public
static
final
String
LOG_USER_OPERATION_LIKE_MYSELF_CLICK
=
"3"
;
public
static
final
String
LOG_USER_OPERATION_DISLIKE_MYSELF_CLICK
=
"4"
;
}
liquidnet-bus-api/liquidnet-service-chime-api/src/main/java/com/liquidnet/service/chime/vo/mongo/ChimeUserInfoVo.java
View file @
d67dbfeb
...
...
@@ -38,6 +38,10 @@ public class ChimeUserInfoVo {
private
long
likeCount
;
@ApiModelProperty
(
position
=
11
,
value
=
"不喜欢操作"
)
private
long
disLikeCount
;
@ApiModelProperty
(
position
=
10
,
value
=
"点击喜欢操作"
)
private
long
ClickLikeCount
;
@ApiModelProperty
(
position
=
11
,
value
=
"点击不喜欢操作"
)
private
long
ClickDisLikeCount
;
private
static
final
ChimeUserInfoVo
obj
=
new
ChimeUserInfoVo
();
public
static
ChimeUserInfoVo
getNew
()
{
...
...
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/main/java/com/liquidnet/service/chime/service/impl/ChimeUserServiceImpl.java
View file @
d67dbfeb
...
...
@@ -151,6 +151,8 @@ public class ChimeUserServiceImpl implements IChimeUserService {
chimeUserOperLogVo
.
setOpType
(
ChimeConstant
.
LOG_USER_OPERATION_LIKE
);
chimeUserOperLogVo
.
setCreatedAt
(
LocalDateTime
.
now
().
toString
());
queueUtils
.
sendMsgByRedis
(
MQConst
.
ChimeQueue
.
USER_OPERATION_LIKE
.
getKey
(),
JsonUtils
.
toJson
(
chimeUserOperLogVo
));
chimeUserOperLogVo
.
setOpType
(
ChimeConstant
.
LOG_USER_OPERATION_LIKE_MYSELF_CLICK
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
ChimeQueue
.
USER_OPERATION_LIKE
.
getKey
(),
JsonUtils
.
toJson
(
chimeUserOperLogVo
));
return
true
;
}
...
...
@@ -163,6 +165,8 @@ public class ChimeUserServiceImpl implements IChimeUserService {
chimeUserOperLogVo
.
setOpType
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE
);
chimeUserOperLogVo
.
setCreatedAt
(
LocalDateTime
.
now
().
toString
());
queueUtils
.
sendMsgByRedis
(
MQConst
.
ChimeQueue
.
USER_OPERATION_DISLIKE
.
getKey
(),
JsonUtils
.
toJson
(
chimeUserOperLogVo
));
chimeUserOperLogVo
.
setOpType
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE_MYSELF_CLICK
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
ChimeQueue
.
USER_OPERATION_DISLIKE
.
getKey
(),
JsonUtils
.
toJson
(
chimeUserOperLogVo
));
return
true
;
}
}
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-adam/src/main/java/com/liquidnet/service/consumer/adam/util/ChimeDataUtils.java
View file @
d67dbfeb
...
...
@@ -32,7 +32,12 @@ public class ChimeDataUtils {
* @param chimeUserOperLogVo
*/
public
void
updateChimeUser
(
ChimeUserOperLogVo
chimeUserOperLogVo
)
{
ChimeUserInfoVo
chimeUserInfoVo
=
this
.
getUserByUserId
(
chimeUserOperLogVo
.
getTargetUserId
());
ChimeUserInfoVo
chimeUserInfoVo
=
null
;
if
(
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_LIKE
)||
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE
)){
chimeUserInfoVo
=
this
.
getUserByUserId
(
chimeUserOperLogVo
.
getTargetUserId
());
}
else
if
(
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_LIKE_MYSELF_CLICK
)||
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE_MYSELF_CLICK
)){
chimeUserInfoVo
=
this
.
getUserByUserId
(
chimeUserOperLogVo
.
getCurrentUserId
());
}
if
(
chimeUserInfoVo
==
null
){
log
.
error
(
"chimeUserInfoVo is null userId is not exist:"
);
return
;
...
...
@@ -43,6 +48,10 @@ public class ChimeDataUtils {
update
.
set
(
"likeCount"
,
chimeUserInfoVo
.
getLikeCount
()
+
1
);
}
else
if
(
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE
)){
update
.
set
(
"disLikeCount"
,
chimeUserInfoVo
.
getDisLikeCount
()
+
1
);
}
else
if
(
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_LIKE_MYSELF_CLICK
)){
update
.
set
(
"clickLikeCount"
,
chimeUserInfoVo
.
getClickLikeCount
()
+
1
);
}
else
if
(
chimeUserOperLogVo
.
getOpType
().
equalsIgnoreCase
(
ChimeConstant
.
LOG_USER_OPERATION_DISLIKE_MYSELF_CLICK
)){
update
.
set
(
"clickDisLikeCount"
,
chimeUserInfoVo
.
getClickDisLikeCount
()
+
1
);
}
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
query
,
update
,
ChimeUserInfoVo
.
class
,
ChimeUserInfoVo
.
class
.
getSimpleName
());
...
...
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