|
|
@@ -32,7 +32,7 @@ class InformAdminService extends BaseService
|
|
|
InformAdminClass::addInform($params, $admin, $type, $TMList);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//消费通知队列 shish 2020.1.1
|
|
|
public static function consumeInformQueue($data)
|
|
|
{
|
|
|
@@ -43,17 +43,45 @@ class InformAdminService extends BaseService
|
|
|
$merchantId = $admin['merchantId'];
|
|
|
$mobile = $data['mobile'];
|
|
|
$merchant = MerchantService::getMerchantById($merchantId);
|
|
|
+ $hasSend = false;
|
|
|
+ $noticeWay = 0;
|
|
|
if ($informWay == 'wx') {
|
|
|
$tMessage = json_decode($data['tMessage'], true);
|
|
|
weixinUtil::sendTaskInform($tMessage, $merchant);
|
|
|
Yii::info('tm:' . json_encode($respond));
|
|
|
+ $hasSend = true;
|
|
|
+ $noticeWay = 0;
|
|
|
}
|
|
|
if ($informWay == 'sms') {
|
|
|
$msg = $data['content'];
|
|
|
sms::merchantSend($mobile, $msg, $merchant);
|
|
|
+ $hasSend = true;
|
|
|
+ $noticeWay = 1;
|
|
|
}
|
|
|
+
|
|
|
//存入数据库
|
|
|
- //InformAdminService::addData();
|
|
|
+ if ($hasSend) {
|
|
|
+ $informData = [
|
|
|
+ 'userId' => $admin['userId'],
|
|
|
+ 'adminId' => $id,
|
|
|
+ 'merchantId' => $merchantId,
|
|
|
+ 'noticeType' => 0,
|
|
|
+ 'content' => $data['briefContent'],
|
|
|
+ 'noticeWay' => $noticeWay,
|
|
|
+ 'status' => 1,
|
|
|
+ 'sourceType' => 0,
|
|
|
+ 'sourceId' => 0,
|
|
|
+ 'addTime' => time(),
|
|
|
+ 'createTime' => date("Y-m-d H:i:s"),
|
|
|
+ ];
|
|
|
+ InformAdminService::addData($informData);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ //添加记录 shish 2020.1.8
|
|
|
+ public static function addData($data)
|
|
|
+ {
|
|
|
+ return InformAdminClass::addData($data);
|
|
|
+ }
|
|
|
+
|
|
|
}
|