Merge branch 'master' into develop
# Conflicts: # app/common/utils/WsEvents.php # app/controller/IndexController.php
This commit is contained in:
@@ -291,7 +291,7 @@ class WsEvents
|
|||||||
{
|
{
|
||||||
$ly = [
|
$ly = [
|
||||||
1 => 186,
|
1 => 186,
|
||||||
3 => 226,
|
3 => 224,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($num === 0) {
|
if ($num === 0) {
|
||||||
|
|||||||
@@ -99,18 +99,32 @@ class IndexController
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单迁移
|
||||||
|
*/
|
||||||
|
public function doMenu()
|
||||||
|
{
|
||||||
|
// 菜单迁移 (部分)
|
||||||
|
$where[] = ['id', '>', 239];
|
||||||
|
(new \app\common\utils\MigrationResources())->do('resources', 'resources_20251012_bak', $where);
|
||||||
|
|
||||||
|
// 整体
|
||||||
|
// $list = (new \app\common\utils\MigrationResources())->getFullResourceTreeOptimized('resources_20250916_bak', []);
|
||||||
|
// var_dump($list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function test(Request $request)
|
public function test(Request $request)
|
||||||
{
|
{
|
||||||
// $chain = \app\common\service\MenuBadgeService::buildBadgeChain(menuId: 226, leafCount: rand(1, 10));
|
// $chain = \app\common\service\MenuBadgeService::buildBadgeChain(menuId: 226, leafCount: rand(1, 10));
|
||||||
// (new \app\common\utils\WsEvents())->pushWebsocket('approval.todo.counts', 74, $chain);
|
// (new \app\common\utils\WsEvents())->pushWebsocket('approval.todo.counts', 74, $chain);
|
||||||
|
|
||||||
$data = [
|
// $data = [
|
||||||
'event' => 'approval.todo.counts',
|
// 'event' => 'approval.todo.counts',
|
||||||
'user_id' => 74,
|
// 'user_id' => 74,
|
||||||
'num' => rand(1, 10),
|
// 'num' => rand(1, 10),
|
||||||
];
|
// ];
|
||||||
\Webman\RedisQueue\Redis::send('ws-msg', $data);
|
// \Webman\RedisQueue\Redis::send('ws-msg', $data);
|
||||||
|
|
||||||
return json(['code' => 0, 'msg' => 'success']);
|
return json(['code' => 0, 'msg' => 'success']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ class CustomerService
|
|||||||
$customer = $query->orderBy('id', 'desc')->paginate($perPage, ['*'], 'page', $page);
|
$customer = $query->orderBy('id', 'desc')->paginate($perPage, ['*'], 'page', $page);
|
||||||
} else {
|
} else {
|
||||||
$customer = $query->orderBy('id', 'desc')->get();
|
$customer = $query->orderBy('id', 'desc')->get();
|
||||||
|
|
||||||
return $customer;
|
return $customer;
|
||||||
}
|
}
|
||||||
if (!$export) {
|
if (!$export) {
|
||||||
@@ -176,7 +177,7 @@ class CustomerService
|
|||||||
|
|
||||||
public function export($params)
|
public function export($params)
|
||||||
{
|
{
|
||||||
if(empty($params['user_id']) && empty($params['tag_id'])){
|
if(empty($params['user_id']) && empty($params['tag_id']) && empty($params['channel_id'])){
|
||||||
$params['user_id'] = 0;
|
$params['user_id'] = 0;
|
||||||
}
|
}
|
||||||
$customers = $this->search($params, true);
|
$customers = $this->search($params, true);
|
||||||
@@ -198,6 +199,8 @@ class CustomerService
|
|||||||
'I1' => '描述',
|
'I1' => '描述',
|
||||||
'J1' => '所属人',
|
'J1' => '所属人',
|
||||||
'K1' => '录入人',
|
'K1' => '录入人',
|
||||||
|
'L1' => '详情',
|
||||||
|
'M1' => '录入时间',
|
||||||
];
|
];
|
||||||
|
|
||||||
// 设置表头样式
|
// 设置表头样式
|
||||||
@@ -227,7 +230,7 @@ class CustomerService
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$sheet->getStyle('A1:K1')->applyFromArray($headerStyle);
|
$sheet->getStyle('A1:M1')->applyFromArray($headerStyle);
|
||||||
|
|
||||||
// 填充数据
|
// 填充数据
|
||||||
$row = 2;
|
$row = 2;
|
||||||
@@ -247,6 +250,8 @@ class CustomerService
|
|||||||
$sheet->setCellValue('I' . $row, $customerData['describe']);
|
$sheet->setCellValue('I' . $row, $customerData['describe']);
|
||||||
$sheet->setCellValue('J' . $row, $customerData['user_name']); // 所属人姓名
|
$sheet->setCellValue('J' . $row, $customerData['user_name']); // 所属人姓名
|
||||||
$sheet->setCellValue('K' . $row, $customerData['enter_user_name']);
|
$sheet->setCellValue('K' . $row, $customerData['enter_user_name']);
|
||||||
|
$sheet->setCellValue('L' . $row, strip_tags($customerData['desc_collect']));
|
||||||
|
$sheet->setCellValue('M' . $row, $customerData['created_at']->toDateTimeString());
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user