|
|
@@ -26,14 +26,14 @@ class StaffService extends BaseService
|
|
|
$staff->save();
|
|
|
|
|
|
// 检查管理员是否有自己的门店
|
|
|
- $shops = ShopClass::getAllByCondition(['adminId' => $admin->id], null, '*', 'id');
|
|
|
+ $shops = ShopClass::getAllByCondition(['adminId' => $admin->id], null, 'id', 'id');
|
|
|
if (empty($shops)) {
|
|
|
// 情况1:自己没有店,在别人那边当员工
|
|
|
$admin->currentShopId = 0;
|
|
|
} else {
|
|
|
// 情况2:自己有店,也在其他店当员工
|
|
|
$ptStyle = dict::getDict('ptStyle', 'hd');
|
|
|
- $shop = ShopClass::getByCondition(['adminId' => $admin->id, 'ptStyle' => $ptStyle]);
|
|
|
+ $shop = ShopClass::getByCondition(['adminId' => $admin->id, 'ptStyle' => $ptStyle], 'id');
|
|
|
if (empty($shop)) {
|
|
|
util::fail('没有找到有效的门店信息');
|
|
|
}
|