no message

This commit is contained in:
hellcat 2025-07-17 20:46:20 +08:00
parent 37bdda605a
commit 61328ce2b6

View File

@ -384,7 +384,34 @@ class DOG extends Base {
return $this->set($aParam);
}
public function setJson($aParam)
public function jsonAdd($aParam)
{
if (($aParam["aArg"][1] ?? false) == "?") {
return "#jsonAdd {json}";
}
$aJson = $aParam["aArg"] ?? false;
$sJson = implode(" ", $aJson);
if (!$sJson) {
return "需要json";
}
$aJson = json_decode($sJson, true);
foreach ($aJson as $k => $v) {
$this->oModelSelf->$k = $v;
}
$this->oModelSelf->save();
$aParam = [];
$aParam["aArg"][1] = $this->oModelSelf->{$this->sPrimaryKey};
return $this->find($aParam);
}
public function jsonSet($aParam)
{
$sWhereValue = $aParam["aOption"][1] ?? false;
$aJson = $aParam["aArg"] ?? false;