更新
This commit is contained in:
parent
7d4a6cd990
commit
8554595cfa
@ -154,7 +154,7 @@ class StoreOrderOther extends BaseModel
|
|||||||
|
|
||||||
public function getOrderExtendAttr($val)
|
public function getOrderExtendAttr($val)
|
||||||
{
|
{
|
||||||
return $val ? json_decode($val, true) : null;
|
return $val ? json_decode($val, true) : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRefundExtensionOneAttr()
|
public function getRefundExtensionOneAttr()
|
||||||
|
@ -1084,7 +1084,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_CREATE', 'id' => $group->group_order_id]);
|
// Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_CREATE', 'id' => $group->group_order_id,
|
||||||
|
// 'activity_type'=>$group->activity_type,'order_id'=>$group->order_id]);
|
||||||
return $group;
|
return $group;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,6 +462,23 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
if (count($groupOrder['give_coupon_ids']) > 0)
|
if (count($groupOrder['give_coupon_ids']) > 0)
|
||||||
$groupOrder['give_coupon_ids'] = app()->make(StoreCouponRepository::class)->getGiveCoupon($groupOrder['give_coupon_ids'])->column('coupon_id');
|
$groupOrder['give_coupon_ids'] = app()->make(StoreCouponRepository::class)->getGiveCoupon($groupOrder['give_coupon_ids'])->column('coupon_id');
|
||||||
$groupOrder->save();
|
$groupOrder->save();
|
||||||
|
$group_id=0;
|
||||||
|
if($order->activity_type==98){
|
||||||
|
$group_id=Db::name('system_group')->where('group_key','city_operations')->value('group_id');
|
||||||
|
}else{
|
||||||
|
$group_id=Db::name('system_group')->where('group_key','town_operation')->value('group_id');
|
||||||
|
}
|
||||||
|
if($group_id){
|
||||||
|
$group_value=Db::name('system_group_data')->where('group_id',$group_id)->column('value');
|
||||||
|
if($group_value){
|
||||||
|
foreach($group_value as $k=>$v){
|
||||||
|
$phone=json_decode($v,true);
|
||||||
|
Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_CREATE', 'phone' => $phone['phone'],'orderId'=>$order->order_id]);//短信通知
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count($groupOrder['give_coupon_ids']) > 0) {
|
if (count($groupOrder['give_coupon_ids']) > 0) {
|
||||||
@ -470,7 +487,6 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_PAY_SUCCESS', 'id' => $groupOrder->group_order_id]);
|
Queue::push(SendSmsJob::class, ['tempId' => 'ORDER_PAY_SUCCESS', 'id' => $groupOrder->group_order_id]);
|
||||||
Queue::push(SendSmsJob::class, ['tempId' => 'ADMIN_PAY_SUCCESS_CODE', 'id' => $groupOrder->group_order_id]);
|
Queue::push(SendSmsJob::class, ['tempId' => 'ADMIN_PAY_SUCCESS_CODE', 'id' => $groupOrder->group_order_id]);
|
||||||
Queue::push(UserBrokerageLevelJob::class, ['uid' => $groupOrder->uid, 'type' => 'pay_money', 'inc' => $groupOrder->pay_price]);
|
Queue::push(UserBrokerageLevelJob::class, ['uid' => $groupOrder->uid, 'type' => 'pay_money', 'inc' => $groupOrder->pay_price]);
|
||||||
|
@ -1259,7 +1259,7 @@ class StoreOtherOrderRepository extends BaseRepository
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
$list = $query->page($page, $limit)->select()->append(['refund_extension_one', 'refund_extension_two']);
|
$list = $query->page($page, $limit)->select();
|
||||||
return compact('count', 'list');
|
return compact('count', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@ class SendSmsJob implements JobInterface
|
|||||||
|
|
||||||
public function fire($job, $data)
|
public function fire($job, $data)
|
||||||
{
|
{
|
||||||
$backtrace = debug_backtrace();
|
|
||||||
Log::info("函数SendSmsJob被". $backtrace[1]['function'] . "调用\n");
|
|
||||||
$status = app()->make(SystemNoticeConfigRepository::class)->getNoticeStatusByConstKey($data['tempId']);
|
$status = app()->make(SystemNoticeConfigRepository::class)->getNoticeStatusByConstKey($data['tempId']);
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
$job->delete();
|
$job->delete();
|
||||||
@ -40,7 +38,7 @@ class SendSmsJob implements JobInterface
|
|||||||
$client->send($data['tempId'], $data);
|
$client->send($data['tempId'], $data);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Log::info('JgPush推送消息发送失败' . json_encode($data) . ' - ' . $e->getMessage());
|
Log::info('JgPush推送消息发送失败' . json_encode($data) . ' - ' . $e->getMessage());
|
||||||
DingTalk::exception($e, 'JgPush推送消息发送失败' . var_export($data, 1));
|
// DingTalk::exception($e, 'JgPush推送消息发送失败' . var_export($data, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($status['notice_sms'] == 1) {
|
if ($status['notice_sms'] == 1) {
|
||||||
|
@ -55,7 +55,7 @@ class SmsService
|
|||||||
*/
|
*/
|
||||||
public function checkSmsCode($phone, $code, $type)
|
public function checkSmsCode($phone, $code, $type)
|
||||||
{
|
{
|
||||||
if (!env('DEVELOPMENT',false)) {
|
if (!env('DEVELOPMENT', false)) {
|
||||||
$sms_key = $this->sendSmsKey($phone, $type);
|
$sms_key = $this->sendSmsKey($phone, $type);
|
||||||
if (!$cache_code = Cache::get($sms_key)) return false;
|
if (!$cache_code = Cache::get($sms_key)) return false;
|
||||||
if ($code != $cache_code) return false;
|
if ($code != $cache_code) return false;
|
||||||
@ -233,7 +233,7 @@ class SmsService
|
|||||||
//到货提醒通知 2.1
|
//到货提醒通知 2.1
|
||||||
case 'PRODUCT_INCREASE':
|
case 'PRODUCT_INCREASE':
|
||||||
$product = app()->make(ProductRepository::class)->getWhere(['product_id' => $id], '*', ['attrValue']);
|
$product = app()->make(ProductRepository::class)->getWhere(['product_id' => $id], '*', ['attrValue']);
|
||||||
if (!$product) return ;
|
if (!$product) return;
|
||||||
$unique[] = 1;
|
$unique[] = 1;
|
||||||
foreach ($product['attrValue'] as $item) {
|
foreach ($product['attrValue'] as $item) {
|
||||||
if ($item['stock'] > 0) $unique[] = $item['unique'];
|
if ($item['stock'] > 0) $unique[] = $item['unique'];
|
||||||
@ -241,7 +241,7 @@ class SmsService
|
|||||||
$make = app()->make(ProductTakeRepository::class);
|
$make = app()->make(ProductTakeRepository::class);
|
||||||
$query = $make->getSearch(['product_id' => $id, 'status' => 0, 'type' => 1])->where('unique', 'in', $unique);
|
$query = $make->getSearch(['product_id' => $id, 'status' => 0, 'type' => 1])->where('unique', 'in', $unique);
|
||||||
$ret = $query->select();
|
$ret = $query->select();
|
||||||
if (!$ret) return ;
|
if (!$ret) return;
|
||||||
foreach ($ret as $item) {
|
foreach ($ret as $item) {
|
||||||
if ($item->user->phone) {
|
if ($item->user->phone) {
|
||||||
self::create()->send($item->user->phone, $tempId, [
|
self::create()->send($item->user->phone, $tempId, [
|
||||||
@ -280,11 +280,14 @@ class SmsService
|
|||||||
break;
|
break;
|
||||||
//付费会员支付成功
|
//付费会员支付成功
|
||||||
case 'SVIP_PAY_SUCCESS':
|
case 'SVIP_PAY_SUCCESS':
|
||||||
self::create()->send($id['phone'], $tempId, ['store_name' => systemConfig('site_name'),'date' => $id['date']]);
|
self::create()->send($id['phone'], $tempId, ['store_name' => systemConfig('site_name'), 'date' => $id['date']]);
|
||||||
break;
|
break;
|
||||||
case 'MERCHANT_CREDIT_BUY_NOTICE':
|
case 'MERCHANT_CREDIT_BUY_NOTICE':
|
||||||
self::sendMerMessage($id, $tempId, ['order_id' => $data['orderId']]);
|
self::sendMerMessage($id, $tempId, ['order_id' => $data['orderId']]);
|
||||||
break;
|
break;
|
||||||
|
case 'ORDER_CREATE':
|
||||||
|
self::create()->send($data['phone'], $tempId, ['name' => $data['orderId']]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,6 +300,4 @@ class SmsService
|
|||||||
$yunxinSmsService->send($service['phone'], $tempId, array_merge(['admin_name' => $service['nickname']], $data));
|
$yunxinSmsService->send($service['phone'], $tempId, array_merge(['admin_name' => $service['nickname']], $data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user