记得上下班打卡 | 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
3e419dfb
Commit
3e419dfb
authored
Dec 09, 2021
by
sunyuntian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
bc85ccca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
SweetWechatMaoDengServiceImpl.java
...ice/sweet/service/impl/SweetWechatMaoDengServiceImpl.java
+24
-23
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetWechatMaoDengServiceImpl.java
View file @
3e419dfb
...
...
@@ -30,30 +30,31 @@ public class SweetWechatMaoDengServiceImpl {
@Autowired
WechatMaConfigure
maConfigure
;
public
ResponseDto
addBuilderImg
(
String
userId
,
String
imgUrl
)
{
public
ResponseDto
addBuilderImg
(
String
userId
,
String
imgUrl
)
{
LocalDateTime
localDateTime
=
DateUtil
.
asLocalDateTime
(
DateUtil
.
now
());
//生成创建时间
try
{
log
.
error
(
"[userId] = {}"
,
userId
);
log
.
error
(
"[imgUrl] = {}"
,
imgUrl
);
String
maoId
=
IDGenerator
.
nextSnowId
();
SweetWechatUsersVo
wechatUsers
=
redisUtils
.
getSweetWechatUsersOfUnionId
(
userId
,
1
);
if
(
null
==
wechatUsers
)
{
return
ResponseDto
.
failure
(
"请求失败"
);
}
SweetMaoDengVo
sweetMaoDeng
=
redisUtils
.
getSweetMaoDeng
(
wechatUsers
.
getOpenId
());
if
(
sweetMaoDeng
!=
null
)
{
if
(
sweetMaoDeng
!=
null
)
{
sweetMaoDeng
.
setImgUrl
(
imgUrl
);
}
String
textMsg
=
sweetMaoDeng
.
getTextMsg
();
String
picUrl
=
sweetMaoDeng
.
getPicUrl
();
sweetMaoDeng
.
setCreatedAt
(
localDateTime
);
redisUtils
.
setSweetMaoDeng
(
sweetMaoDeng
);
if
(
StringUtil
.
isNotEmpty
(
textMsg
)
&&
StringUtil
.
isNotEmpty
(
picUrl
))
{
if
(
StringUtil
.
isNotEmpty
(
textMsg
)
&&
StringUtil
.
isNotEmpty
(
picUrl
))
{
//redis队列入库
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sqlsDataA
=
CollectionUtil
.
linkedListObjectArr
();
sqls
.
add
(
SqlMapping
.
get
(
"sweet_wechat_maodeng.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
maoId
,
userId
,
textMsg
,
picUrl
,
imgUrl
,
localDateTime
});
sqlsDataA
.
add
(
new
Object
[]{
maoId
,
userId
,
textMsg
,
picUrl
,
imgUrl
,
localDateTime
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
SweetQueue
.
SWEET_WECHAT_MAODENG_TEXT_INSERT
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlsDataA
));
return
ResponseDto
.
failure
(
"请求成功"
);
}
...
...
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