Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1c15a612
authored
Dec 23, 2022
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
钉钉消息通知
parent
bfcb42ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
app/Http/Controllers/HomeController.php
app/Http/Services/OrderService.php
app/helpers.php
app/Http/Controllers/HomeController.php
View file @
1c15a612
...
@@ -30,7 +30,8 @@ class HomeController extends Controller
...
@@ -30,7 +30,8 @@ class HomeController extends Controller
// 'name'=>rand(100,100000),
// 'name'=>rand(100,100000),
// 'order_sn'=>rand(100,100000),
// 'order_sn'=>rand(100,100000),
// ];
// ];
// $res = SendMsg($data,'semour_order',['13713025362','578953158@qq.com']);
// $res = SendMsg($data,'semour_order',['13713025362'],0);
// $res = SendMsg($data,'semour_order',['578953158@qq.com'],1);
// print_r($res);
// print_r($res);
// die();
// die();
...
...
app/Http/Services/OrderService.php
View file @
1c15a612
...
@@ -226,6 +226,9 @@ class OrderService
...
@@ -226,6 +226,9 @@ class OrderService
$con
->
commit
();
$con
->
commit
();
#发送钉钉消息
$saleInfo
=
$userInfo
[
"sale_id"
];
return
$order_id
;
return
$order_id
;
}
catch
(
\Exception
$e
){
}
catch
(
\Exception
$e
){
$con
->
rollback
();
$con
->
rollback
();
...
...
app/helpers.php
View file @
1c15a612
...
@@ -33,7 +33,7 @@ if (!function_exists('generate_letters')) {
...
@@ -33,7 +33,7 @@ if (!function_exists('generate_letters')) {
semour_order 深茂订单消息
semour_order 深茂订单消息
* @param array $ToUser 指定接收人 [13713025362,13713025363]
* @param array $ToUser 指定接收人 [13713025362,13713025363]
*/
*/
function
SendMsg
(
$data
=
[],
$key
=
''
,
$ToUser
=
'INNER_PERSON'
){
function
SendMsg
(
$data
=
[],
$key
=
''
,
$ToUser
=
'INNER_PERSON'
,
$is_ignore
=
0
){
if
(
$key
==
""
){
if
(
$key
==
""
){
return
false
;
return
false
;
}
}
...
@@ -43,13 +43,13 @@ function SendMsg($data=[], $key = '', $ToUser = 'INNER_PERSON'){
...
@@ -43,13 +43,13 @@ function SendMsg($data=[], $key = '', $ToUser = 'INNER_PERSON'){
# $check['data'] ="{\"goods_name\":\"MPVZ5004GW7U\",\"brand_name\":\"恩智浦牌\\/NXP牌\",\"goods_title\":\"多元件集成电路\",\"material_sn\":\"WL2021060300070421\",\"tax_rate_low\":\"0.7000\",\"tax_rate_land\":\"0.0000\",\"tax_rate_added\":\"13.0000\",\"supervision_con\":\"\",\"number\":\"8542391000\"}";
# $check['data'] ="{\"goods_name\":\"MPVZ5004GW7U\",\"brand_name\":\"恩智浦牌\\/NXP牌\",\"goods_title\":\"多元件集成电路\",\"material_sn\":\"WL2021060300070421\",\"tax_rate_low\":\"0.7000\",\"tax_rate_land\":\"0.0000\",\"tax_rate_added\":\"13.0000\",\"supervision_con\":\"\",\"number\":\"8542391000\"}";
$check
[
'pf'
]
=
1
;
$check
[
'pf'
]
=
1
;
$check
[
'keyword'
]
=
$key
;
$check
[
'keyword'
]
=
$key
;
$check
[
'is_ignore'
]
=
1
;
$check
[
'is_ignore'
]
=
$is_ignore
;
$check
[
'k1'
]
=
time
();
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
MD5
(
MD5
(
$check
[
'k1'
])
.
"fh6y5t4rr351d2c3bryi"
);
$check
[
'k2'
]
=
MD5
(
MD5
(
$check
[
'k1'
])
.
"fh6y5t4rr351d2c3bryi"
);
$response
=
Http
::
asForm
()
->
post
(
"http://api.ichunt.com/msg/sendMessageByAuto"
,
$check
);
$response
=
Http
::
asForm
()
->
post
(
"http://api.ichunt.com/msg/sendMessageByAuto"
,
$check
);
print_r
(
$response
->
body
());
#
print_r($response->body());
die
();
#
die();
$res
=
json_decode
(
$response
->
body
(),
true
);
$res
=
json_decode
(
$response
->
body
(),
true
);
...
...
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