no message
This commit is contained in:
parent
8d125c9fe8
commit
6b95fffa70
@ -35,7 +35,7 @@ $oHttp->aData = [
|
|||||||
'type' => 'private'
|
'type' => 'private'
|
||||||
],
|
],
|
||||||
'date' => 1610000000,
|
'date' => 1610000000,
|
||||||
"text" => "\/userFind 11111",
|
"text" => "\/orderFind 2",
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use App\Models\TgStep;
|
|||||||
use App\Models\Ticket;
|
use App\Models\Ticket;
|
||||||
use App\Models\Node;
|
use App\Models\Node;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\Order;
|
||||||
use App\Services\Tg\ReportUser as ServiceTgReportUser;
|
use App\Services\Tg\ReportUser as ServiceTgReportUser;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
use Psr\Http\Client\ClientExceptionInterface;
|
use Psr\Http\Client\ClientExceptionInterface;
|
||||||
@ -129,6 +130,30 @@ final class HookController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查找订单
|
||||||
|
if (strpos($sText, '/orderFind') === 0 || strpos($sText, '\/orderFind') === 0) {
|
||||||
|
|
||||||
|
list(, $iUserId) = explode(" ", $sText, 2);
|
||||||
|
|
||||||
|
$aOrder = Order::where("user_id", $iUserId)->get()->toArray();
|
||||||
|
|
||||||
|
if ($aOrder) {
|
||||||
|
$aOrderNew = [];
|
||||||
|
foreach ($aOrder as $k => $v) {
|
||||||
|
$v['create_time'] = date("Y-m-d H:i:m", $v['create_time']);
|
||||||
|
$v['update_time'] = date("Y-m-d H:i:m", $v['update_time']);
|
||||||
|
$aOrderNew[] = $v;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$aOrderNew = ["not have id" => $iUserId];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->sendMessage(json_encode($aOrderNew, JSON_PRETTY_PRINT));
|
||||||
|
|
||||||
|
Http::response(200, 'ok');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 回复工单
|
// 回复工单
|
||||||
if (strpos($sText, '/reply') === 0) {
|
if (strpos($sText, '/reply') === 0) {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user