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