Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
026399d8
Commit
026399d8
authored
Sep 05, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预估价模板消息4
parent
a5522abd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+1
-0
ch-core/src/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
...c/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
+6
-5
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
026399d8
...
...
@@ -490,6 +490,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
exchangeNoticeMsg
.
setItemName
(
item
.
getName
());
exchangeNoticeMsg
.
setOpenId
(
buyerOpenId
);
exchangeNoticeMsg
.
setOfficialEstimatedPrice
(
PriceUtil
.
convertPriceFenToYuan
(
item
.
getOfficialEstimatedPrice
()));
logger
.
info
(
"ExchangeNoticeMsg :{}"
,
JsonUtils
.
from
(
exchangeNoticeMsg
));
sendMsgService
.
sendOfficialEstimatedPriceMsg
(
exchangeNoticeMsg
);
}
else
{
logger
.
info
(
">>>>> 买家openid为空, 发送消息失败 <<<<<"
);
...
...
ch-core/src/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
View file @
026399d8
...
...
@@ -978,6 +978,7 @@ public class SendMsgServiceImpl implements SendMsgService {
public
Result
sendOfficialEstimatedPriceMsg
(
ExchangeNoticeMsg
exchangeNoticeMsg
)
{
try
{
String
openId
=
exchangeNoticeMsg
.
getOpenId
();
logger
.
info
(
"sendOfficialEstimatedPriceMsg openid:{}"
,
openId
);
String
token
=
officialAccountApi
.
getAccessToken
();
String
url
=
SEND_MSG_URL
+
"?access_token="
+
token
;
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
...
...
@@ -999,21 +1000,21 @@ public class SendMsgServiceImpl implements SendMsgService {
put
(
"value"
,
exchangeNoticeMsg
.
getOfficialEstimatedPrice
()+
"元"
);
}});
map
.
put
(
"data"
,
paramMap
);
logger
.
info
(
"============ 发送官方估
计
完成通知模板消息内容 : {}"
,
JsonUtils
.
fromMap
(
map
));
logger
.
info
(
"============ 发送官方估
价
完成通知模板消息内容 : {}"
,
JsonUtils
.
fromMap
(
map
));
okHttpUtil
.
addParams
(
map
);
okHttpUtil
.
post
(
true
);
String
responseStr
=
okHttpUtil
.
async
();
logger
.
info
(
"openid : {}, 发送官方估
计
完成通知模板消息 response :{}"
,
openId
,
responseStr
);
logger
.
info
(
"openid : {}, 发送官方估
价
完成通知模板消息 response :{}"
,
openId
,
responseStr
);
String
errorCode
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errcode"
);
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
if
(!
"0"
.
equals
(
errorCode
))
{
logger
.
error
(
"openid : {}, 发送官方估
计
完成通知模板消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
logger
.
error
(
"openid : {}, 发送官方估
价
完成通知模板消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
return
Result
.
failed
();
}
logger
.
info
(
"=============发送官方估
计
完成通知模板消息成功 ==========="
);
logger
.
info
(
"=============发送官方估
价
完成通知模板消息成功 ==========="
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"发送官方估
计
完成通知模板消息 error :{}"
,
e
);
logger
.
error
(
"发送官方估
价
完成通知模板消息 error :{}"
,
e
);
}
return
Result
.
failed
();
}
...
...
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