setter
parent
25f63a84ba
commit
ffbc6897de
|
@ -359,15 +359,15 @@ class Business extends Base
|
|||
$business = BusinessRepository::getInstance()->findOneByWhere(["code" => $businessCode]);
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$anent_code = input("agency_code/s", "");
|
||||
$anentCode = input("agency_code/s", "");
|
||||
if (empty($business)) {
|
||||
return $this->json(4001, "商家不存在");
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
$business->save([
|
||||
"agency_code" => $anent_code,
|
||||
"is_assign" => empty($businessCode) ? BusinessModel::COMMON_OFF : BusinessModel::COMMON_ON
|
||||
"agency_code" => $anentCode,
|
||||
"is_assign" => empty($anentCode) ? BusinessModel::COMMON_OFF : BusinessModel::COMMON_ON
|
||||
]);
|
||||
Db::commit();
|
||||
return $this->json();
|
||||
|
|
Loading…
Reference in New Issue