Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
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
chenchuanwen
my-yaf-project
Commits
2f62343d
Commit
2f62343d
authored
Jan 02, 2019
by
testshenbd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'linqing' of git.shenbd.com:qm-develop/shenbd into linqing
parents
296ac8de
912c13c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
182 additions
and
32 deletions
+182
-32
OrderConfirmUtil.php
application/library/Order/OrderConfirmUtil.php
+1
-28
OrderService.php
application/models/Business/Order/OrderService.php
+181
-4
No files found.
application/library/Order/OrderConfirmUtil.php
View file @
2f62343d
...
...
@@ -709,34 +709,7 @@ class OrderConfirmUtil {
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
failedUpdateFavoritesStoreForOrder
);
}
$orderModel
->
db
->
doCommit
();
//订单通过小程序表单提交过来
if
(
$formId
&&
(
$access_token
=
$this
->
getLitAccesstoken
()))
{
$settingDAO
=
\DAO\SettingModel
::
getInstance
();
$msg_tpl
=
$settingDAO
->
getListCache
(
array
(
'wxapp_order_create_tpl'
))[
'wxapp_order_create_tpl'
];
$goods_str
=
''
;
if
(
count
(
$goods_datas
)
>
1
)
{
$goods_str
.=
$goods_datas
[
0
]
.
'等'
.
count
(
$goods_datas
)
.
'件商品'
;
}
else
{
$goods_str
.=
$goods_datas
[
0
];
}
$sess
=
\Yaf\Session
::
getInstance
();
$authInfo
=
$sess
->
get
(
'wxAuthInfo'
);
$openid
=
$authInfo
[
'openid'
];
$req_data
=
array
(
'touser'
=>
$openid
,
'template_id'
=>
$msg_tpl
,
'form_id'
=>
$formId
,
'page'
=>
'pages/orders/detail/index?id='
.
$orderId
,
'data'
=>
array
(
'keyword1'
=>
array
(
'value'
=>
'下单成功'
),
'keyword2'
=>
array
(
'value'
=>
$order
[
'order_sn'
]),
'keyword3'
=>
array
(
'value'
=>
number_format
(
$order
[
'order_amount'
]
/
100
,
2
)
.
'元'
),
'keyword4'
=>
array
(
'value'
=>
$order
[
'store_name'
]),
'keyword5'
=>
array
(
'value'
=>
$goods_str
),
));
// \Our\Log::getInstance()->write(json_encode($req_data), '/data/log/apptest');
$url
=
'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token='
;
$result
=
$this
->
sendurl
(
$url
,
$access_token
,
json_encode
(
$req_data
),
'post'
);
\Our\Log
::
getInstance
()
->
write
(
var_export
(
$result
,
true
),
'/data/log/apptest'
);
}
$this
->
opCacheInfo
();
$this
->
pushMessage
();
return
array
(
'needPayFlag'
=>
$needPayFlag
,
'paySn'
=>
$paySn
);
...
...
application/models/Business/Order/OrderService.php
View file @
2f62343d
This diff is collapsed.
Click to expand it.
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