更新
This commit is contained in:
parent
8ff21f94d2
commit
0d7497ebd3
@ -6,6 +6,7 @@ use app\admin\logic\operation\OpurchaseclassLogic;
|
||||
use app\admin\validate\tools\GenerateTableValidate;
|
||||
use app\admin\logic\tools\GeneratorLogic;
|
||||
use app\common\service\pay\PayService;
|
||||
use app\common\service\PushService;
|
||||
use app\common\service\wechat\WeChatMnpService;
|
||||
use app\common\service\wechat\WeChatOaService;
|
||||
use DateTime;
|
||||
@ -20,11 +21,12 @@ class IndexController extends BaseApiController
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
// PushService::push('store_merchant_502', 502, '支付超时,订单已被取消,请重新提交订单');
|
||||
// d(1);
|
||||
// $extra=$this->request->post();
|
||||
// Redis::send('push-supplier-products', ['order_id'=>11]);
|
||||
// createSupplierGoods
|
||||
d(OpurchaseclassLogic::createSupplierGoods(['goods'=>99]));
|
||||
// d(OpurchaseclassLogic::createSupplierGoods(['goods'=>99]));
|
||||
$queue = 'send-mail';
|
||||
// 数据,可以直接传数组,无需序列化
|
||||
$data = ['to' => 'tom@gmail.com', 'content' => 'hello'];
|
||||
|
@ -107,9 +107,9 @@ class PayNotifyLogic extends BaseLogic
|
||||
}
|
||||
|
||||
if ($order->pay_type == 9) {
|
||||
PushService::push('cash_register_' . $order['user_id'], $order['user_id'], '您有一笔订单已支付');
|
||||
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'cash_register','msg'=>'您有一笔订单已支付']);
|
||||
} else {
|
||||
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], '您有一笔新的订单');
|
||||
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'store_merchant','msg'=>'您有一笔新的订单']);
|
||||
}
|
||||
if (!empty($extra['payer']['openid']) && $order->pay_type != 9) {
|
||||
Redis::send('push-delivery', ['order_id' => $orderSn, 'openid' => $extra['payer']['openid']], 5);
|
||||
|
@ -47,7 +47,7 @@ class CodePaySend implements Consumer
|
||||
if($find){
|
||||
$order = Cashierclass::update($data);
|
||||
if($order){
|
||||
PushService::push('cash_register_'.$package['data']['user_id'], $package['data']['user_id'], '支付超时,订单已被取消,请重新提交订单');
|
||||
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type'=>'cash_register','msg'=>'支付超时,订单已被取消,请重新提交订单']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\queue\redis;
|
||||
|
||||
use app\common\service\PushService;
|
||||
use Webman\RedisQueue\Consumer;
|
||||
use Webman\Push\Api;
|
||||
use support\exception\BusinessException;
|
||||
@ -46,9 +47,6 @@ class MyMailSend implements Consumer
|
||||
*/
|
||||
public function onConsumeFailure(\Throwable $e, $package)
|
||||
{
|
||||
echo "consume failure\n";
|
||||
echo $e->getMessage() . "\n";
|
||||
// 无需反序列化
|
||||
var_export($package);
|
||||
PushService::push('user-1', 1, '支付超时,订单已被取消,请重新提2222交订单');
|
||||
}
|
||||
}
|
@ -106,7 +106,7 @@ class MonologExtendHandler extends StreamHandler
|
||||
// archive latest file
|
||||
clearstatcache(true, $fullLogFilename);
|
||||
if (file_exists($fullLogFilename)) {
|
||||
$target = $logBasePath. time() . '_' . $filename;
|
||||
$target = $logBasePath. date('Y-m') . '_' . $filename;
|
||||
rename($fullLogFilename, $target);
|
||||
}else{
|
||||
if (!is_dir($logBasePath))
|
||||
|
Loading…
x
Reference in New Issue
Block a user