消息推送增加邮箱&&增加终版保存功能
This commit is contained in:
@@ -273,4 +273,14 @@ class MessageNotificationsService
|
||||
{
|
||||
return User::where('status', 1)->pluck('id')->toArray();
|
||||
}
|
||||
|
||||
|
||||
public function getUserEmailsById(array $con = []): array
|
||||
{
|
||||
$user = User::where('status', 1);
|
||||
if (count($con) > 0) {
|
||||
return $user->whereIn('id', $con)->where('email', '!=', '')->pluck('email')->toArray();
|
||||
}
|
||||
return $user->where('email', '!=', '')->pluck('email')->toArray();
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class StockOrdersService
|
||||
{
|
||||
// 启动审批
|
||||
$appro = new \app\common\utils\approval\service\ApprovalFlowService();
|
||||
$appro->start('stock_order_flow', 'stock_orders', $item->id, $item->toArray(), $item->salesperson_id);
|
||||
$appro->start('stock_orders', 'stock_orders', $item->id, $item->toArray(), $item->salesperson_id);
|
||||
// 异步生成pdf文件
|
||||
\Webman\RedisQueue\Redis::send('stock-order-pdf', ['id'=>$item->id]);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ class StockOrdersService_bak
|
||||
}
|
||||
// 启动审批
|
||||
$appro = new \app\common\utils\approval\service\ApprovalFlowService();
|
||||
$result = $appro->start('stock_order_flow', 'stock_orders', $res->id, $res->toArray(), $res->salesperson_id);
|
||||
$result = $appro->start('stock_orders', 'stock_orders', $res->id, $res->toArray(), $res->salesperson_id);
|
||||
var_dump($result);
|
||||
|
||||
// 异步生成pdf文件
|
||||
|
||||
@@ -25,4 +25,26 @@ class SysDictService
|
||||
{
|
||||
return $this->logic->getList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function pluckValuesByCode(string $dictCode): \Illuminate\Support\Collection
|
||||
{
|
||||
return SysDict::where('dict_code', $dictCode)
|
||||
->where('status', 1)
|
||||
->first()?->items()
|
||||
->where('status', 1)
|
||||
->orderBy('sort')
|
||||
->pluck('item_value') ?? collect();
|
||||
}
|
||||
|
||||
public static function pluckKeyValueByCode(string $dictCode): \Illuminate\Support\Collection
|
||||
{
|
||||
return SysDict::where('dict_code', $dictCode)
|
||||
->where('status', 1)
|
||||
->first()?->items()
|
||||
->where('status', 1)
|
||||
->orderBy('sort')
|
||||
->pluck('item_value', 'item_label') ?? collect();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user