|
@@ -36,6 +36,22 @@ class Company extends Save
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function setFactory()
|
|
|
|
+ {
|
|
|
|
+ $factory_id = Dever::input('factory_id');
|
|
|
|
+ $auth = $this->getAuth();
|
|
|
|
+ if($auth){
|
|
|
|
+ if (is_string($auth)) {
|
|
|
|
+ $auth = explode(',', $auth);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (in_array($factory_id, $auth)) {
|
|
|
|
+ return $this->_add('factory', $factory_id, 3600 * 24 * 365);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
# 获取公司权限
|
|
# 获取公司权限
|
|
public function get()
|
|
public function get()
|
|
{
|
|
{
|