-
Notifications
You must be signed in to change notification settings - Fork 0
Employee management
Insane edited this page Sep 9, 2015
·
1 revision
query all employee under specific school
json response:
[{"id":"3_93740362_1122","name":"王豫","phone":"13258249821","gender":0,"workgroup":"教师组","workduty":"教师","portrait":"","birthday":"1986-06-04","school_id":93740362,"login_name":"e0001","timestamp":1394639512253, "privilege_group":"principal"},
{"id":"3_93740362_3344","name":"何忍","phone":"13708089040","gender":0,"workgroup":"教师组","workduty":"教师","portrait":"","birthday":"1987-06-04","school_id":93740362,"login_name":"e0002","timestamp":1394639512253}]privilege_group can be 'operator', 'principal', ''
delete employee
create or update specific employee,
the id, phone, login_name should be unique in the whole system
request payload:
{
"id":"3_93740362_1122",
"name":"刘老师",
"phone":"13338249821",
"gender":0,
"workgroup":"教师组",
"workduty":"教师",
"birthday":"1986-06-04",
"school_id":93740362,
"login_name":"e0001"
}update if id exists, otherwise create a new employee.
the default password equals to the phone number.
the id should follow the rule of employee_id
json response:
{
"id":"3_93740362_1122",
"name":"刘老师",
"phone":"13338249821",
"gender":0,
"workgroup":"教师组",
"workduty":"教师",
"portrait":"",
"birthday":"1986-06-04",
"school_id":93740362,
"login_name":"e0001",
"timestamp":1394639512253,
"privilege_group": "principal"
}change password of specific employee
request payload:
{
"employee_id": "3_93740362_1122",
"school_id": 93740362,
"phone": "31213121312",
"login_name": "wangdachui",
"old_password": "123456",
"new_password": "654321"
}json response:
nullget all principals of specific school
create a new principals of specific school