no message

This commit is contained in:
hellcat 2025-04-21 20:12:44 +08:00
parent b51c34494d
commit b363a80624
2 changed files with 14 additions and 28 deletions

View File

@ -68,7 +68,7 @@ final class HookController
$aArg = [];
$aOption = [];
@$aArg = explode(" ", $sText);
@$aArg = explode(" ", $sText, 2);
@$aOption = explode("__", $aArg[0]);
$sCmd = $this->cleanCmd($aOption[0]);

View File

@ -36,32 +36,18 @@ final class Tk extends Base
}
// public function Find($aParam)
// {
//
//// list(, $iUserId) = explode(" ", $sText, 2);
//
// $iUserId = $aParam['aArg'][1];
//
// $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']);
// $v['product_content'] = json_decode($v['product_content']);
// $aOrderNew[] = $v;
// }
// } else {
// $aOrderNew = ["not have id" => $iUserId];
// }
//
// $sMsg = json_encode($aOrderNew, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
//
// return $sMsg;
//
// }
public function close($aParam)
{
$iTicketId = @$aParam['aArg'][1];
$oTicket = Ticket::find($iTicketId);
$oTicket->status = "closed";
$r = $oTicket->save();
return $r;
}
public function List($aParam)
{
@ -69,7 +55,7 @@ final class Tk extends Base
$iLimit = @$aParam['aArg'][0];
if (!$iLimit) {
$iLimit = 10; //默认10
$iLimit = 5; //默认n
}
$aTk = Ticket::where("status", "open_wait_admin")->orderBy("id", "desc")->limit($iLimit)->get()->toArray();