8) { util::fail('门店名称不能超过8个汉字,2个字母顶一个汉字'); } $exists = self::getByCondition(['sjId' => $data['sjId'], 'shopName' => $shopName]); if (!empty($exists)) { util::fail('门店名称已经存在'); } //补充fullAddress lqh 2021.4.18 $data['fullAddress'] = $data['city'] . $data['address'] . $data['floor']; $data['img'] = isset($data['img']) && !empty($data['img']) ? json_encode($data['img']) : ''; if (isset($data['ptStyle']) == false) { util::fail('请先择平台类型'); } $shop = self::add($data, true); $newShopId = $shop->id; $extData = ['shopId' => $newShopId]; ShopExtClass::add($extData); return $shop; } }