|
|
@@ -77,6 +77,8 @@ class ShopAdminService extends BaseService
|
|
|
|
|
|
$update = ['name' => $name, 'mobile' => $mobile, 'password' => $password, 'remark' => $remark, 'currentShopId' => $shopId];
|
|
|
AdminClass::updateById($adminId, $update);
|
|
|
+ // 员工数+1
|
|
|
+ AdminRoleClass::counters(['num' => 1], ['id' => $roleId]);
|
|
|
|
|
|
return $shopAdmin->attributes;
|
|
|
}
|
|
|
@@ -105,7 +107,11 @@ class ShopAdminService extends BaseService
|
|
|
'name' => $name,
|
|
|
];
|
|
|
ShopAdminClass::delBindAdminData($shopId, $recommendAdminId);
|
|
|
- return ShopAdminClass::add($addData);
|
|
|
+ $result = ShopAdminClass::add($addData);
|
|
|
+ // 员工数+1
|
|
|
+ AdminRoleClass::counters(['num' => 1], ['id' => $roleId]);
|
|
|
+
|
|
|
+ return $result;
|
|
|
}
|
|
|
|
|
|
//获取管理员 ssh 2020.4.21
|