|
@@ -16,6 +16,7 @@ class YPSMS{
|
16
|
16
|
3 => '3210134', //订单发货提醒销售
|
17
|
17
|
4 => '3210146', //订单审核通过提醒销售
|
18
|
18
|
5 => '3210312', //订单审核驳回提醒销售
|
|
19
|
+ 6 => '3391172', //redis预占库存异常报警
|
19
|
20
|
];
|
20
|
21
|
private static function init(){
|
21
|
22
|
$ch = curl_init();
|
|
@@ -57,6 +58,24 @@ class YPSMS{
|
57
|
58
|
return $array;
|
58
|
59
|
}
|
59
|
60
|
|
|
61
|
+ //预占库存报警
|
|
62
|
+ public static function sendSkuWnum($phone, $note = null){
|
|
63
|
+ $tpl = self::$order_tpl;
|
|
64
|
+ $tpl_id = $tpl[6];
|
|
65
|
+ $ch=self::init();
|
|
66
|
+ $data = [
|
|
67
|
+ 'apikey' => YP_SMS_KEY,
|
|
68
|
+ 'mobile' => $phone,
|
|
69
|
+ 'tpl_id' => $tpl_id,
|
|
70
|
+ ];
|
|
71
|
+
|
|
72
|
+ $data['tpl_value'] = ('#note#').'='.$note;
|
|
73
|
+ $json_data = self::tpl_send($ch,$data);
|
|
74
|
+ $array = json_decode($json_data,true);
|
|
75
|
+ curl_close($ch);
|
|
76
|
+ return $array;
|
|
77
|
+ }
|
|
78
|
+
|
60
|
79
|
public static function sendSMS($phone,$text){
|
61
|
80
|
$ch=self::init();
|
62
|
81
|
|