|
@@ -313,6 +313,7 @@ class EmployeeService extends Service
|
|
|
if(empty($data['state'])) return [false,'状态不能为空'];
|
|
if(empty($data['state'])) return [false,'状态不能为空'];
|
|
|
if(! isset(Employee::State_Type[$data['state']])) return [false,'状态不存在'];
|
|
if(! isset(Employee::State_Type[$data['state']])) return [false,'状态不存在'];
|
|
|
if(! empty($data['is_admin'])){
|
|
if(! empty($data['is_admin'])){
|
|
|
|
|
+ if(! isset(Employee::IS_ADMIN_TITLE_SIMPLE[$data['is_admin']])) return [false, 'is_admin类型不存在'];
|
|
|
if(empty($data['password'])) return [false, '密码不能为空'];
|
|
if(empty($data['password'])) return [false, '密码不能为空'];
|
|
|
if(mb_strlen($data['password']) < 6) return [false, '密码长度不得小于6位长度'];
|
|
if(mb_strlen($data['password']) < 6) return [false, '密码长度不得小于6位长度'];
|
|
|
if(empty($data['role'])) return [false, '角色不能为空'];
|
|
if(empty($data['role'])) return [false, '角色不能为空'];
|