Employment Information Statistics Network (interface document)

Employment Information Statistics Network (interface document)

basic configuration

Base address:

1. API authentication uses token authentication uniformly, and data returns uniformly uses json. The server opens cors to solve cross-domain problems. 2. Request method

  • GET (SELECT): Retrieve resources (one or more items) from the server.
  • POST (CREATE): Create a new resource on the server.
  • PUT (UPDATE): Update the resource on the server (the client provides the complete resource after the change).
  • DELETE (DELETE): Delete resources from the server.
  1. Interface failed to return data, unified return
{ "data" : { }, "meta" : { "msg" : "error" , "status" : 0 } } Copy code

Interface details

1.1 login interface

  • Request path: login
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusernameCan t be empty, user name is student ID
passworduser passwordCannot be empty, the default is the student ID
  • Response data
{ "data" : { "id" : 1 , "username" : "201719044120" , "first_name" : "Zhang San" , "roles" : "student" , //can only be student or manager "token" : " cdscij" }, "meta" : { "msg" : "Login successful" , "status" : 200 } } Copy code

1.2 Personal information (student personal information, not required by the administrator)

1.2.1 Upload personal information

  • Request path: user/complete_userInfo
  • Request method: post
  • Student request parameters (name, class, and major are imported by the administrator, and students cannot modify it)
parameter nameParameter DescriptionRemarks
usernameusername
ageage
emailmailbox
avatarAvatarurl address
phone_numphone number
sexgenderCan only be male or female
study_year"2017-09-01,2021-06-01"String type, convenient for back-end storage, array type when returning to front-end
is_workWhether to be employed0,1,2,3,4,-1 Looking for a job, 0 internship, 1 job, 2 successful postgraduate entrance examination, 3 continue to study, 4 other
study_statusLearning situationStudent's summary of individual learning status and situation (not required)
  • Response data
{ "data" : { "username" : "201719044120" , "first_name" : "Zhang San" , "created_time" : "March 28, 2020" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.2.2 Obtaining personal information

  • Request path: user/complete_userInfo
  • Request method: get
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
  • Student: Response data
{ "data" : { "username" : "201719044120" , "first_name" : "Zhang San" , "age" : 22 , "email" : "2036241878@qq.com" , "avatar" : "http://123456" , "phone_num" : "1328371" , "stu_class" : "Network 171" , "sex" : "Male" , "magor": "Software Engineering" , "study_year" :[ "2017-09-01", "2021-06-01" ], "is_work" : 0 , //-1 looking for a job, 0 internship, 1 job, 2 successful postgraduate entrance examination, 3 continue to study, 4 other "study_status" : "learning front-end" , "created_time" : "March 28, 2020" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.2.3 Modify personal information

  • Request path: user/complete_userInfo
  • Request method: put
  • Student request parameters
parameter nameParameter DescriptionRemarks
usernameusername
ageage
emailmailbox
avatarAvatarurl address
phone_numphone number
sexgenderCan only be male or female
study_yearSchool timeArray type
is_workWhether to be employed-1 Looking for a job, 0 internship, 1 job, 2 successful postgraduate entrance examination, 3 continue to study, 4 others
study_statusLearning situationStudent's summary of individual learning status and situation (not required)
  • Response data
{ "data" : { "username" : "201719044120" , "first_name" : "Zhang San" , "updated_time" : "2020-3-28" , }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.3 Student employment registration

1.3.1 Students upload employment information

  • Request path: user/employ_register
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
company_idCompany Name
adress"Beijing/City District/Dongcheng District/"String type
code_adress["100010","120000","10000"]Array type, address code
company_phonework phoneString type
entry_timeEntry TimeThe date is 2020-3-28 this type of string
pos_nameposition Name
is_trainWhether to train0 no, 1 training
agreement_idTripartite agreementurl address
salarysalaryCan be empty
  • Response data
{ "data" : { "username" : "201719044120" , "first_name" : "Zhang Zhi" , "created_time" : "2020-3-28" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.3.2 Students obtain employment information

  • Request path: user/employ_register
  • Request method: get
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
  • Response data (If there is no value, the corresponding data will return empty. Example
    is_train:""
    )
{ "data" : { "username" : "201719044120" , "company_id" : "Hikvision" , "adress" : "Beijing/City District,/Dongcheng District/" , //Address Chinese name "code_adress" :[ "100010" , "120000" , "10000" ], //Address code "company_phone" : "1232831" , "entry_time" : "2020-3-28" , "pos_name" : "web front end" , "is_train" : 0 , //Have you participated in training, 0 not, 1 trained "is_work" : 0 , //Current employment status "agreement_id" : "http://123456" , "salary" : 13000 , "first_name" : "Zhang Zhi" , }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.3.3 Students modify employment registration information

  • Request path: user/employ_register
  • Request method: put
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
company_idCompany Name
adress"Beijing/City District/Dongcheng District/"String type
code_adress["100010","120000","10000"]Array type, address code
entry_timeEntry Time
company_phonework phoneString type
pos_nameposition Name
is_trainWhether to train0 no, 1 training
agreement_idTripartite agreementStore url address
salarysalary
  • Response data
{ "data" : { "username" : "201719044120" , "first_name" : "Zhang Zhi" , "updated_time" : "March 28, 2020" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.3.4 Modify login password

  • Request path: user/modify_password
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
passwordpassword
  • Response data
{ "data" : { "username" : "201719044120" , "updated_time" : "March 28, 2020" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.4 The administrator uploads student information

1.4.1 Import student information through excel

  • Request address manager/upload_user_info
  • Request method post
  • Request parameter
parameter nameParameter DescriptionRemarks
userInfoObject type
userInfo:[ { username : "201719044120" , first_name : "Zhang Zhi" , stu_class : " RBsoft Industrial Network" , magor : "Network Software Development" }, { username : "201719044121" , first_name : "Zhang Zhi" , stu_class : " RBsoft Industrial Network" , magor : "Network Software Development" }, { username : "201719044122" , first_name : "Zhang Zhi" , stu_class : " RBsoft Industrial Network" , magor : "Network Software Development" }, { username : "201719044123" , first_name : "Zhang Zhi" , stu_class : " RBsoft Industrial Network" , magor : "Network Software Development" }, ] Copy code
  • Response data
{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.5 Information Center

1.5.1 Admin upload news

  • Request path: manager/upload_news
  • Request method: post, the backend adds a unique id for each news
  • Request parameter
parameter nameParameter DescriptionRemarks
news_titleHeadlinesCan not be empty
news_contentnews contentCan not be empty
news_pictureNews PicturesCan be empty
  • Response data
{ "data" : { news_id : 10 , //The backend must generate a unique id for each news item news_title : "Learn hard " , news_content : " Go up every day" , news_picture : "" , created_time; "" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.5.2 Administrator modify news

  • Request path: manager/upload_news
  • Request method: put
  • Request parameter
parameter nameParameter DescriptionRemarks
news_idNews number
news_titleHeadlinesCan not be empty
news_contentnews contentCan not be empty
news_pictureNews PicturesCan be empty
  • Response data
{ "data" : { news_id : 10 //The backend will generate a unique id for each news item news_title : "" , news_content : "" , news_picture : "" , created_time: "" }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.5.3 Delete news

  • Request path: manager/upload_news
  • Request method: delete
  • Request parameter
parameter nameParameter DescriptionRemarks
news_idNews number
  • Response data
{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.5.4 Get all news

  • Request path: manager/upload_news

  • Request method: get

  • Request parameter

  • Response data

{ "data" : { all_news :[ { news_id : 10 //The backend will generate a unique id for each news news_title : "" , news_content : "" , news_picture : "" , created_time: "" }, { news_id : 10 //The backend will generate a unique id for each news item news_title : "" , news_content : "" , news_picture : "" , created_time: "" },] }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.6 Students get news (the student has one more field has_collect)

1.6.1 Students click on favorites

  • Request path: user/to_collect_news
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
news_idNews number
usernameusername
  • Response data
{ "data" : { "collect_num" : 9 //Number of news items that have been collected }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.6.2 Students click to unfavorite

  • Request path: user/to_collect_news
  • Request method: put
  • Request parameter
parameter nameParameter DescriptionRemarks
news_idNews number
usernameusername
  • Response data
{ "data" : { "collect_num" : 8 //Number of news items that have been collected }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.6.3 Students get a list of all news

  • Request path: user/all_news
  • Request method: get
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
  • Response data
{ "data" : { all_news :[ { news_id : 10 //The backend will generate a unique id for each news item news_title : "" , news_content : "" , news_picture : "" , has_collect : true , created_time: "" }, { news_id : 10 //The backend will generate a unique id for each news news_title : "" , news_content : "" , news_picture : "" , has_collect : false , created_time: "" },], "collect_num" : 10 //Number of collected news }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.6.4 Students get a list of favorite news

  • Request path: user/collect_news
  • Request method: get
  • Request parameter
parameter nameParameter DescriptionRemarks
usernameusername
  • Response data
{ "data" : { all_news :[ { news_id : 10 //The backend will generate a unique id for each news item news_title : "" , news_content : "" , news_picture : "" , has_collect : true , created_time: "" }, { news_id : 10 //The backend needs to generate a unique id for each news news_title : "" , news_content : "" , news_picture : "" , has_collect : true , created_time: "" },] }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.7 The administrator obtains employment information submitted by students

1.7.1 The administrator obtains the employment information of unchecked students (only returns the employment information that has been submitted, and all of them are unchecked)

  • Request path: manager/auditInfo
  • Request method: get
  • Request parameters (parameters can be empty)
parameter nameParameter DescriptionRemarks
keyKeywordSupport fuzzy query, you can enter your name or student ID, it can be empty
stu_classclassIf it is empty, it will return all unreviewed employment information, you can also select the class, support multiple selection
  • Response data
{ "data" : { "allAuditInfo" :[{ "auditInfo" : 0 , //Audit status 0 means unaudited , 1 means approved "username" : "201719044120" , //user name "company_id" : "Haikang Weishi" , //Company name "adress" : "Beijing/Municipality/Dongcheng District/" , //Company address "company_phone" : "1232831" , //Company phone number "entry_time" : "2020-3- 28" , //Entry time "pos_name" : "web front end" ,//Position "is_train" : 0 , //Whether to train "is_work" : 0 , //Employment status, the current internship "agreement_id" : "http://123456" , //Employment contract pdf, url address "salary" : 13000 , //Salary "first_name" : "Zhang Zhi " , "age" : 22 , "email" : "2036241878@qq.com" , "phone_num" : "1328371" , "stu_class" : "Network 171" , "sex" : "Male" , "magor" : "Software Engineering" , "study_status" :"Learning the front-end" , },{...},{...}... ]}, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.7.2 The administrator submits the student employment information that has passed the verification

  • Request path: manager/submit_auditInfo
  • Request method: post
  • Request parameters (parameters are arrays)
parameter nameParameter DescriptionRemarks
allUserNameStudent ID (username) that has been verified
  • Request parameter example

allUserName: ["201719044120","201719044121"...]

  • Response data
{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.7.3 The administrator submits the employment information of the students who have not passed the inspection

  • Request path: manager/submit_unauditInfo
  • Request method: post
  • Request parameters (parameters are arrays)
parameter nameParameter DescriptionRemarks
allUserNameStudent ID (username) that has been verified but failed
  • Request parameter example

allUserName: ["201719044120","201719044121"...]

  • Response data
{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.7.4 The administrator obtains employment information of all students

  • Request path: manager/all_employInfo
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
stu_classclassArray type
statusThere are five optionsString type
  • Request parameter status value

    : All means to obtain all student information (including students who have not submitted employment information), empInfo means to obtain all student information that has submitted employment information, hasAudit means to obtain information on students who have submitted employment information and passed the review, hasErrorAudit means to obtain employment information that has been submitted But the information of the students who have not passed the audit, noAudit means to obtain the information of the students who have submitted employment information but have not passed the audit

  • Response data

  • Response data

{ "data" : { "allAuditInfo" :[{ "auditInfo" : 0 , //The audit status is 0 for unaudited , 1 for approved, -1 for failed audit, empty and no employment information has been submitted. "username" : "201719044120 " , //User name "company_id" : "Hikvision" , //Company name "adress" : "Beijing/City District/Dongcheng District/" , //Company Address "company_phone" : "1232831" , //Company mobile number "entry_time" : "2020-3-28" , //Entry time "pos_name" : "web frontend" , //post "is_train" : 0 ,//Whether to train "is_work" : 0 , //Employment status, the current internship "agreement_id" : "http://123456" , //Employment contract pdf, url address "salary" : 13000 , //Salary "first_name" : " " , "age" : 22 , "email" : "2036241878@qq.com" , "phone_num" : "1328371" , "stu_class" : "Network 171" , "sex" : "Male", "magor" : "Software Engineering" , "study_status" : "Learning front-end" , },{...},{...}... ]}, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.7.5 The administrator filters and exports student employment information according to conditions

  • Request path: manager/export_auditInfo
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
stu_classThe parameter is an array, which supports multiple class queriesDo not check if it is empty
statusThere are five optionsString type
  • Request parameter example

stu_class:

["RBsoft industrial network 171","RB soft industrial network 172"]

status value:
all means to obtain all student information (including students who have not submitted employment information), empInfo means to obtain all student information that has submitted employment information, hasAudit means to obtain information about students who have submitted employment information and passed the review, hasErrorAudit means to obtain employment information that has been submitted but Student information that has not passed the audit, noAudit means to obtain the information of students who have submitted employment information but have not passed the audit

  • Response data
{ "data" : { "json_fields" :{ "name" : "first_name" , "student ID" : "username" , "class" : "stu_class" , "employment status" : "is_work" , "training or not" : " is_train" , "personal phone number" : "phone_num" , "company name" : "company_id" , "company address" : "adress", "Company Phone" : "company_phone" , "Employment Position": "pos_name" }, "json_data" :[ { "first_name" : "Zhang Zhi" , "username" : "201719044120" , "stu_class" : "RBsoft industrial network 171" , "is_work" : "Internship" , //Here returns to Chinese based on the number stored in the database, Cannot return numbers "is_train" : "No," //Here returns Chinese based on the numbers stored in the database, and cannot return numbers "phone_num" : "13283719964" , "company_id" : "Daoyuan Group" , "adress" : "Beijing " , "company_phone": "Company Phone" , "pos_name" : "Employment Position" }, { "first_name" : "Zhang Zhi" , "username" : "'201719044120'" , //The string must be added with a small quotation mark "stu_class" : " RBsoft industrial network 171" , "is_work" : "Internship Medium" , //Returns to Chinese based on the number stored in the database. "is_train" : "No," //Returns to Chinese based on the number stored in the database. "phone_num" : "13283719964" , " company_id" : "Daoyuan Group" , "adress" : "Beijing" , "company_phone" : "1321123" , "pos_name" :"Front-end development" }... ] }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.8 Statistics on student employment status

1.8.1 Obtain the employment status data of all students, such as employed, internship, successful postgraduate entrance examination...

  • Request path: manager/workStatus
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
stu_classThe parameter is an array, which supports multiple class queriesIf it is empty or not passed, the employment status of all students will be obtained
  • Parameter example

stu_class:

["RBsoft industrial network 171","RB soft industrial network 172"]

  • Response data
{ "data" : { "emp_num" : [ { "value" : 1048 , "name" : 'looking for a job' }, //value represents the number of people, such as the number of people looking for a job is 1084 { "value" : 735 , "name" : 'internship' }, { "value" : 580 , "name" : 'Employed' }, { "value" : 484 , "name" : 'Successful in postgraduate entrance examination' }, { "value" : 300 , "name" : 'Continue learning' }, { "value" : 300 , "name" : 'other' } ], "detail_num" : 200 //The number of people participating in information statistics is the sum of the value in emp_num, and a value is written here. }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9 Trained and untrained data analysis

  • Request path: manager/is_train
  • Request method: post
  • Request parameter
parameter nameParameter DescriptionRemarks
stu_classThe parameter is an array, which supports multiple class queriesIf it is empty or not passed, the employment status of all students will be obtained
  • Parameter example

stu_class:

["RBsoft industrial network 171","RB soft industrial network 172"]

  • Response data
{ "data" : { "train_status" : { "Average salary" : { "has_train" : 10000 , //Average salary after training "no_train" : 5000 , //Average salary without training }, "Number" : { "has_train" : 100 , //Number of people who are employed and have participated in training "no_train" : 600 , //Number of people who are employed and have not participated in training }, "Front-end development" : { "has_train" : 100 , //People who are engaged in front-end after training "no_train" : 600 , //People who are not trained in front-end }, "Back-end development" : { "has_train" : 100 , // "no_train" : 600 , // }, "UI designer" : { "has_train" : 100 , // "no_train" : 600 , // }, "Product Manager" : { "has_train" : 100 , // "no_train" : 600 , // }, "Software Test Engineer" : { "has_train" : 100 , // "no_train" : 600 , // }, "Other" : { "has_train" : 100 , // "no_train" : 600 , // }, }, "detail_num" : 200 //Number of people participating in information statistics, just write a value here }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9 Students obtain recruitment information

1.9.1 Students get a list of recruitment information names

  • Request path: user/emp_name_list

  • Request method: get

  • Request parameters: none

  • Response data

{ "data" : { "empList" : [ { id : 1 , name : "Beijing Ocean Company Recruitment Information-Front-end Development" , empTime : "2021-4-25" },{ id : 2 , name : "Byte Beat Job Fair" , empTime : "2021-5-3" } ], }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9.2 Students obtain recruitment information details according to the recruitment information id and username

  • Request path: user/detail_emp_list
  • Request method: get
  • Request parameters:
parameter nameParameter DescriptionRemarks
idRecruitment information id numberMust pass, do not pass return empty data
usernameStudent IDMust pass
  • Response data

There must be a field has_collect (collection or not)

{ "data" : { id : 1 , //The id number of the news, uniquely labeled the news has_collect : 0 , //Not yet collected, when it is 1, it means that it has been collected collect_num : 10 , //The number of collected recruitment information title : " ByteDance Company Recruitment" , //Title of the recruitment information empTime : "2021-4-25" ,// content:" ..."// empPosition:[{ empName:" ", empRequire:[" vue"," js"," ..."] },{ empName : "Front-end development engineer" , empRequire :[ "Proficient in vue" , "Proficient in js" , "Proficient in..." ] } ], empContact :{ empNetWork : "www.bytedance.com" , //Official website empAdress : "Beijing Haidian District" , empPhone : "13283719964" //Phone } }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9.3 Students click to bookmark recruitment information

  • Request path: user/collect_employment
  • Request method: post
  • Request parameters:
parameter nameParameter DescriptionRemarks
job_idRecruitment information id number
usernamestudent ID
  • Response data

There must be a field collect_num (collection number)

{ "data" : { collect_num : 10 //Number of collections of recruitment information }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9.4 Students click to uncollect recruitment information

  • Request path: user/collect_employment
  • Request method: put
  • Request parameters:
parameter nameParameter DescriptionRemarks
job_idRecruitment information id number
usernamestudent ID
  • Response data

There must be a field collect_num (collection number)

{ "data" : { collect_num : 10 //Number of collections of recruitment information }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

1.9.5 Students get a list of favorite recruitment information

  • Request path: user/collect_employment
  • Request method: get
  • Request parameters:
parameter nameParameter DescriptionRemarks
usernamestudent ID
  • Response data
{ "data" : { "empList" : [ { id : 1 , name : "Beijing Ocean Company Recruitment Information-Front-end Development" , empTime : "2021-4-25" },{ id : 2 , name : "Byte Beat Job Fair" , empTime : "2021-5-3" } ], }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

2.0 Employment report

2.0.1 Publish employment report

  • Request path: manager/release_report
  • Request method: post
  • Request parameters:
parameter nameParameter DescriptionRemarks
reportUrlThe url address of the employment reportSuch as www.baidupdf.com
  • Response data
{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

2.0.2 Obtaining Employment Report

  • Request path: manager/release_report

  • Request method: get

  • Request parameters:

  • Response data

{ "data" : { reportUrl : "www.baidupdf.com" //Url address of employment report }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

2.0.1 Delete employment report

  • Request path: manager/release_report

  • Request method: delete

  • Request parameters:

  • Response data

{ "data" : { }, "meta" : { "msg" : "Success" , "status" : 200 } } Copy code

3.0 Administrator-Recruitment Information

3.0.1 Post recruitment information