|
|
@@ -51,11 +51,17 @@ class ShopAdminService extends BaseService
|
|
|
}
|
|
|
$merchantId = isset($shop['merchantId']) ? $shop['merchantId'] : 0;
|
|
|
if (empty($bindData)) {
|
|
|
- util::fail('小程序码已经失效,请重新创建员工');
|
|
|
+ util::fail('小程序码已失效,请重新创建员工');
|
|
|
}
|
|
|
$shopAdmin = ShopAdminClass::getByCondition(['adminId' => $adminId, 'shopId' => $shopId]);
|
|
|
if (!empty($shopAdmin)) {
|
|
|
- util::fail('您已经是管理员了');
|
|
|
+ //员工已经删除的补回
|
|
|
+ if (isset($shopAdmin->delStatus) && $shopAdmin->delStatus == 1) {
|
|
|
+ $shopAdmin->delStatus = 0;
|
|
|
+ $shopAdmin->save();
|
|
|
+ return $shopAdmin->attributes;
|
|
|
+ }
|
|
|
+ util::fail('您已经是员工');
|
|
|
}
|
|
|
$name = isset($bindData['name']) ? $bindData['name'] : '';
|
|
|
if (isset($bindData['roleId']) == false || empty($bindData['roleId'])) {
|
|
|
@@ -66,7 +72,7 @@ class ShopAdminService extends BaseService
|
|
|
util::fail('没有找到管理员信息');
|
|
|
}
|
|
|
if (isset($admin['subscribe']) == false || $admin['subscribe'] != 1) {
|
|
|
- util::fail("请关注公众号({$admin['id']})");
|
|
|
+ //util::fail("请关注公众号");
|
|
|
}
|
|
|
$roleId = $bindData['roleId'];
|
|
|
$remind = isset($bindData['remind']) ? $bindData['remind'] : 0;
|