|
|
@@ -39,6 +39,7 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM408238177' => '反馈进度通知',
|
|
|
'OPENTM203447669' => '新客户加入通知',
|
|
|
'ZHH202308150025' => '退款申请处理通知',
|
|
|
+ 'ZHH202311282308' => '采购申请处理通知',
|
|
|
],
|
|
|
//供货商
|
|
|
dict::getDict('ptStyle', 'ghs') => [
|
|
|
@@ -59,6 +60,7 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM411530050' => '充值成功提醒',
|
|
|
'OPENTM408238177' => '反馈进度通知',
|
|
|
'ZHH202308150025' => '退款申请处理通知',
|
|
|
+ 'ZHH202311282308' => '采购申请处理通知',
|
|
|
],
|
|
|
//商城
|
|
|
dict::getDict('ptStyle', 'mall') => [
|
|
|
@@ -227,6 +229,48 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //花店新采购单通知 ssh 20231128
|
|
|
+ public static function hdNewCgOrderInform($shop, $cg)
|
|
|
+ {
|
|
|
+ $ptStyle = $shop->ptStyle;
|
|
|
+ $wxBase = WxOpenClass::getWxBase();
|
|
|
+ $wx = $wxBase[$ptStyle] ?? [];
|
|
|
+ $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
+ $shortTempId = 'OPENTM417875155';//新订单通知
|
|
|
+ $tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
|
|
|
+ if (empty($tempId)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $id = $cg->id;
|
|
|
+ $orderId = $cg->id;
|
|
|
+ $actPrice = $cg->actPrice;
|
|
|
+ $goods = $cg->book == 1 ? '花材【预订单】' : '花材';
|
|
|
+ $adminList = ShopAdminClass::getRemainAdmin($shop);
|
|
|
+ if (empty($adminList)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ foreach ($adminList as $admin) {
|
|
|
+ $openId = isset($admin['openId']) ? $admin['openId'] : '';
|
|
|
+ if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
+ $openId = isset($admin['ghsOpenId']) ? $admin['ghsOpenId'] : '';
|
|
|
+ }
|
|
|
+ $data = [
|
|
|
+ "touser" => $openId,
|
|
|
+ "template_id" => $tempId,
|
|
|
+ "url" => Yii::$app->params['ghsDomain'],
|
|
|
+ "data" => [
|
|
|
+ "thing12" => ["value" => '花大芾'],
|
|
|
+ "thing7" => ["value" => $goods],
|
|
|
+ "amount10" => ["value" => 600],
|
|
|
+ "phrase4" => ["value" => '待发货'],
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data['miniprogram']['appid'] = $wx['miniAppId'];
|
|
|
+ $data['miniprogram']['pagepath'] = 'pagesPurchase/purDetails?id=' . $id;
|
|
|
+ wxUtil::sendTaskInform($data, $wx, $ptStyle);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//花店新订单通知 ssh 20210529
|
|
|
public static function hdNewOrderInform($shop, $order)
|
|
|
{
|
|
|
@@ -234,7 +278,8 @@ class WxMessageClass extends BaseClass
|
|
|
$wxBase = WxOpenClass::getWxBase();
|
|
|
$wx = $wxBase[$ptStyle] ?? [];
|
|
|
$message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
- $shortTempId = 'OPENTM417875155';//新订单通知
|
|
|
+ //采购申请处理通知
|
|
|
+ $shortTempId = 'ZHH202311282308';
|
|
|
$tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
|
|
|
if (empty($tempId)) {
|
|
|
return false;
|