no message
This commit is contained in:
parent
2837f37d8c
commit
48b3544483
@ -452,6 +452,45 @@ class Dog extends Mod\Base {
|
|||||||
return $this->find($aParam);
|
return $this->find($aParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hitRaw($aParam)
|
||||||
|
{
|
||||||
|
$xId = $aParam["aArg"][1] ?? false;
|
||||||
|
$sField = $aParam["aOption"][1] ?? false;
|
||||||
|
|
||||||
|
if (!$xId) {
|
||||||
|
return "需要id";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sField) {
|
||||||
|
return "需要field";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($xId == "?") {
|
||||||
|
return "#hitRaw__[field] [id]";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sContent = $this->oModelSelf->where("id", $xId)->first()?->{$sField};
|
||||||
|
|
||||||
|
return $sContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function findRaw($aParam)
|
||||||
|
{
|
||||||
|
$xId = $aParam["aArg"][1] ?? false;
|
||||||
|
|
||||||
|
if (!$xId) {
|
||||||
|
return "需要id";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($xId == "?") {
|
||||||
|
return "#findRaw [id]";
|
||||||
|
}
|
||||||
|
|
||||||
|
$aData = $this->oModelSelf->where("id", $xId)->first()->toArray();
|
||||||
|
|
||||||
|
return $this->toJson($aData);
|
||||||
|
}
|
||||||
|
|
||||||
public function find($aParam)
|
public function find($aParam)
|
||||||
{
|
{
|
||||||
$sField = $aParam["aOption"][1] ?? $this->sPrimaryKey;
|
$sField = $aParam["aOption"][1] ?? $this->sPrimaryKey;
|
||||||
|
|||||||
@ -25,6 +25,31 @@ class FreenodePool extends Base {
|
|||||||
return $this->oDog->$sName($aArg[0]);
|
return $this->oDog->$sName($aArg[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function findRaw($aParam)
|
||||||
|
// {
|
||||||
|
// $xId = $aParam["aArg"][1] ?? false;
|
||||||
|
//
|
||||||
|
// if (!$xId) {
|
||||||
|
// return "需要id";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if ($xId == "?") {
|
||||||
|
// return "#findRaw [id]";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// $oDog = $this->oDog->oModelSelf->where("id", $xId)->first();
|
||||||
|
//
|
||||||
|
// if (!$oDog) {
|
||||||
|
// return "没有这个id数据";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// $aDog = $oDog->toArray();
|
||||||
|
//
|
||||||
|
// $aDog["content"] = json_decode($aDog["content"], true);
|
||||||
|
//
|
||||||
|
// return $this->toJson($aDog);
|
||||||
|
// }
|
||||||
|
|
||||||
public function testF()
|
public function testF()
|
||||||
{
|
{
|
||||||
$a = [
|
$a = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user