钉钉消息通知

parent bfcb42ff
......@@ -30,7 +30,8 @@ class HomeController extends Controller
// 'name'=>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);
// die();
......
......@@ -226,6 +226,9 @@ class OrderService
$con->commit();
#发送钉钉消息
$saleInfo = $userInfo["sale_id"];
return $order_id;
}catch (\Exception $e){
$con->rollback();
......
......@@ -33,7 +33,7 @@ if (!function_exists('generate_letters')) {
semour_order 深茂订单消息
* @param array $ToUser 指定接收人 [13713025362,13713025363]
*/
function SendMsg($data=[], $key = '', $ToUser = 'INNER_PERSON'){
function SendMsg($data=[], $key = '', $ToUser = 'INNER_PERSON',$is_ignore = 0){
if ($key == ""){
return false;
}
......@@ -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['pf'] = 1;
$check['keyword'] = $key;
$check['is_ignore'] = 1;
$check['is_ignore'] = $is_ignore;
$check['k1']=time();
$check['k2']=MD5(MD5($check['k1'])."fh6y5t4rr351d2c3bryi");
$response = Http::asForm()->post("http://api.ichunt.com/msg/sendMessageByAuto", $check);
print_r($response->body());
die();
# print_r($response->body());
# die();
$res = json_decode($response->body(),true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment