Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
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
hooloo
ms
soss
Commits
771078ff
Commit
771078ff
authored
Jun 22, 2022
by
张新旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码永远在路上
parent
d0b660cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
5 deletions
+18
-5
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
+1
-0
soss-admin/src/main/resources/application.yml
+2
-1
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
+1
-0
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
+1
-3
soss-system/src/main/java/com/soss/system/weixin/util/SendMessageUtils.java
+13
-1
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
View file @
771078ff
...
...
@@ -95,6 +95,7 @@ public class OrderController extends BaseController
int
amount
=
order
.
getAmount
().
movePointRight
(
2
).
intValue
();
Map
payInfo
=
weixinService
.
pay
(
request
,
"hooloo"
,
order
.
getOrderNo
(),
order
.
getUserId
(),
amount
);
if
(
payInfo
!=
null
){
payInfo
.
put
(
"orderId"
,
order
.
getId
());
return
AjaxResult
.
success
(
payInfo
);
}
else
{
throw
new
ServiceException
(
"微信支付发生异常"
);
...
...
soss-admin/src/main/resources/application.yml
View file @
771078ff
...
...
@@ -89,7 +89,8 @@ weixin:
cert-path
:
classpath:apiclient_cert.p12
refund-url
:
https://hooloo-api.gdatac.com/weixin/refundNotify
templateId
:
Fu_CPIXa0cnJ4EDdVKqFQ4T3qTxBqv8vXMU7-sQgerg
pagePath
:
/cs
pagePath
:
orderSubPackage/pages/orderInfo/index?orderId=
program
:
trial
#mqtt:
# url: tcp://iot-06z00dhgql5j8bw.mqtt.iothub.aliyuncs.com:1883
# clientId: h5kgirX6kNQ.XQ_000001A|securemode=2,signmethod=hmacsha256,timestamp=1651746531320|
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
View file @
771078ff
...
...
@@ -246,6 +246,7 @@ public class OrderServiceImpl implements IOrderService
orderOperationLogService
.
insertOrderOperationLog
(
order
);
jiGuangPushService
.
pushOrderState
(
order
);
Customer
customer
=
customerMapper
.
selectCustomerById
(
order
.
getUserId
());
sendMessageUtils
.
sendWxMsg
(
order
);
if
(!
"1"
.
equals
(
customer
.
getAllow
())){
}
...
...
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
View file @
771078ff
...
...
@@ -381,11 +381,9 @@ public class ShopServiceImpl implements IShopService
jsonObject
.
put
(
"state"
,
shopGoodsSku1
.
getState
());
Goods
goods
=
goodsMapper
.
selectGoodsById
(
String
.
valueOf
(
shopGoodsSku1
.
getGoodsId
()));
jsonObject
.
put
(
"goods"
,
getGoodsVo
(
goods
,
shopGoodsSku1
.
getShopId
()));
AjaxResult
.
success
(
jsonObject
);
return
AjaxResult
.
success
(
jsonObject
);
}
return
AjaxResult
.
success
();
}
...
...
soss-system/src/main/java/com/soss/system/weixin/util/SendMessageUtils.java
View file @
771078ff
...
...
@@ -31,6 +31,8 @@ public class SendMessageUtils {
private
String
templateId
;
@Value
(
"${weixin.pagePath}"
)
private
String
pagePath
;
@Value
(
"${weixin.program}"
)
private
String
program
;
@Autowired
private
ShopMapper
shopMapper
;
...
...
@@ -62,6 +64,15 @@ public class SendMessageUtils {
"\"time6\": \"now\","
+
"\"thing11\": \"您的订单制作完成了,现在可以去取餐啦!\""
+
"}"
+
"},{"
+
"\"status\": \"6\","
+
"\"templateId\": \"Oq_zfRWRXijvXenRmfD2PARgpvdYlbkjR4laxKmBqb0\","
+
"\"param\": {"
+
"\"character_string10.DATA\": \"$.orderNum\","
+
"\"thing1.DATA\": \"$.shop.name\","
+
"\"date7.DATA\": \"now\","
+
"\"thing11\": \"您的订单制作完成了,现在可以去取餐啦!\""
+
"}"
+
"}]"
;
/**
* 设置会议订阅消息
...
...
@@ -114,7 +125,8 @@ public class SendMessageUtils {
//消息主体
builder
.
data
((
List
<
WxMaSubscribeMessage
.
MsgData
>)
tempalte
.
get
(
"dataList"
));
//点击订阅消息的跳转链接(默认是正式发布的小程序页面,当然也可以通过参数进行控制)
builder
.
page
(
pagePath
);
builder
.
page
(
pagePath
+
order
.
getId
());
builder
.
miniprogramState
(
program
);
WxMaSubscribeMessage
msg
=
builder
.
build
();
wxMaService
.
getMsgService
().
sendSubscribeMsg
(
msg
);
}
catch
(
WxErrorException
e
)
{
...
...
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