Employment information statistics network (interface document)

Zhang Zhihua 2021-05-03 13:22:08
employment information statistics network interface


Basic configuration

Base address :

1.api Unified use of Authentication token authentication , Data return for unified use json. The server is turned on cors, Solving cross domain problems . 2. Request method

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

Interface details

1.1 Login interface

  • Request path :login
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
username user name Can't be empty , The user name is student number
password User password Can't be empty , The default is student number
  • The response data
{
"data": {
"id":1,
"username": "201719044120",
"first_name": " Zhang San ",
"roles": "student",// Can only be student perhaps manager
"token": "cdscij"
},
"meta": {
"msg": " Login successful ",
"status": 200
}
}
 Copy code 

1.2 Personal information ( Student personal information , The administrator side does not need )

1.2.1 Upload personal information

  • Request path :user/complete_userInfo
  • Request method :post
  • Students request parameters ( Name and class 、 Professional import for administrator , Students can't modify )
Parameter name Parameter description remarks
username user name
age Age
email mailbox
avatar Head portrait url Address
phone_num cell-phone number
sex Gender Only for men or women
study_year "2017-09-01,2021-06-01" String type , Easy back-end storage , Returns the front end as an array type
is_work Employment or not 0,1,2,3,4,-1 Looking for a job ,0 Internship ,1 employment ,2 The postgraduate entrance examination was successful ,3 Continue to learn ,4 other
study_status Learning situation Students' summary of their individual learning state and situation ( Not required )
  • The response data
{
"data": {
"username":"201719044120",
"first_name": " Zhang San ",
"created_time":"2020 year 3 month 28 Japan "
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.2.2 Get personal information

  • Request path :user/complete_userInfo
  • Request method :get
  • Request parameters
Parameter name Parameter description remarks
username user name
  • Student : The response data
{
"data": {
"username":"201719044120",
"first_name": " Zhang San ",
"age": 22,
"email":"2036241878@qq.com",
"avatar":"http://123456",
"phone_num":"1328371",
"stu_class":" The Internet 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 employment ,2 The postgraduate entrance examination was successful ,3 Continue to learn ,4 other 
"study_status":" Learning front end ",
"created_time":"2020 year 3 month 28 Japan "
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.2.3 Modify personal information

  • Request path :user/complete_userInfo
  • Request method :put
  • Students request parameters
Parameter name Parameter description remarks
username user name
age Age
email mailbox
avatar Head portrait url Address
phone_num cell-phone number
sex Gender Only for men or women
study_year School time An array type
is_work Employment or not -1 Looking for a job ,0 Internship ,1 employment ,2 The postgraduate entrance examination was successful ,3 Continue to learn ,4 other
study_status Learning situation Students' summary of their individual learning state and situation ( Not required )
  • The response data
{
"data": {
"username":"201719044120",
"first_name": " Zhang San ",
"updated_time":"2020 year 3 month 28 Japan ",
},
"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 parameters
Parameter name Parameter description remarks
username user name
company_id Company name
adress " The Beijing municipal / Municipal district / Dongcheng District /" String type
code_adress ["100010","120000","10000"] An array type , The code of the address
company_phone Company phone String type
entry_time Entry time The dates are 2020-3-28 This type of string
pos_name Job title
is_train Whether to train 0 No, ,1 train
agreement_id Tripartite agreement url Address
salary salary Can be null
  • The 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 get employment information

  • Request path :user/employ_register
  • Request method :get
  • Request parameters
Parameter name Parameter description remarks
username user name
  • The response data ( If there is no value, the corresponding data will return null , Example is_train:"" )
{
"data": {
"username":"201719044120",
"company_id":" Comview ",
"adress":" The Beijing municipal / Municipal 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 attended any training ,0 No, ,1 Trained 
"is_work":0,// The current employment situation 
"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 parameters
Parameter name Parameter description remarks
username user name
company_id Company name
adress " The Beijing municipal / Municipal district / Dongcheng District /" String type
code_adress ["100010","120000","10000"] An array type , The code of the address
entry_time Entry time
company_phone Company phone String type
pos_name Job title
is_train Whether to train 0 No, ,1 train
agreement_id Tripartite agreement Storage url Address
salary salary
  • The response data
{
"data": {
"username":"201719044120",
"first_name":" Zhang Zhi ",
"updated_time":"2020 year 3 month 28 Japan "
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.3.4 Change login password

  • Request path :user/modify_password
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
username user name
password password
  • The response data
{
"data": {
"username":"201719044120",
"updated_time":"2020 year 3 month 28 Japan "
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.4 The administrator uploads the student information

1.4.1 adopt excel Import student information

  • Request address manager/upload_user_info
  • Request method post
  • Request parameters
Parameter name Parameter description remarks
userInfo object type
userInfo:[
{username:"201719044120",first_name:" Zhang Zhi ",stu_class:"RB Softnet ",magor:" Network software development "},
{username:"201719044121",first_name:" Zhang Zhi ",stu_class:"RB Softnet ",magor:" Network software development "},
{username:"201719044122",first_name:" Zhang Zhi ",stu_class:"RB Softnet ",magor:" Network software development "},
{username:"201719044123",first_name:" Zhang Zhi ",stu_class:"RB Softnet ",magor:" Network software development "},
]
 Copy code 
  • The response data
{
"data": {
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.5 The information center

1.5.1 Administrators upload news

  • Request path :manager/upload_news
  • Request method :post, The back end adds a unique id
  • Request parameters
Parameter name Parameter description remarks
news_title News headlines Can't be empty
news_content News content Can't be empty
news_picture News pictures Can be null
  • The response data
{
"data": {
news_id:10 ,// The back end needs to generate a unique one for each piece of news id 
news_title:" study hard ",
news_content:" Day day up ",
news_picture:"",
created_time;""
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.5.2 The administrator changes the news

  • Request path :manager/upload_news
  • Request method :put
  • Request parameters
Parameter name Parameter description remarks
news_id News number
news_title News headlines Can't be empty
news_content News content Can't be empty
news_picture News pictures Can be null
  • The response data
{
"data": {
news_id:10 // The back end needs to generate a unique one for each piece of news id 
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 parameters
Parameter name Parameter description remarks
news_id News number
  • The response data
{
"data": {
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.5.4 Get all the news

  • Request path :manager/upload_news

  • Request method :get

  • Request parameters

  • The response data


{
"data": {
all_news:[ {
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
created_time:""
},
{
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
created_time:""
},]
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.6 Students get news ( Students have one more field has_collect)

1.6.1 Students click collect

  • Request path :user/to_collect_news
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
news_id News number
username user name
  • The response data

{
"data": {
"collect_num":9// The amount of news that has been collected 
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.6.2 Students click Cancel collection

  • Request path :user/to_collect_news
  • Request method :put
  • Request parameters
Parameter name Parameter description remarks
news_id News number
username user name
  • The response data

{
"data": {
"collect_num":9// The amount of news that has been collected 
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.6.3 Students get a list of all the news

  • Request path :user/all_news
  • Request method :get
  • Request parameters
Parameter name Parameter description remarks
username user name
  • The response data

{
"data": {
all_news:[ {
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
has_collect: true,
created_time:""
},
{
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
has_collect: false,
created_time:""
},]
},
"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 parameters
Parameter name Parameter description remarks
username user name
  • The response data

{
"data": {
all_news:[ {
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
has_collect: true,
created_time:""
},
{
news_id:10 // The back end needs to generate a unique one for each piece of news id 
news_title:"",
news_content:"",
news_picture:"",
has_collect: true,
created_time:""
},]
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.7 The administrator obtains the employment information submitted by the students

1.7.1 The administrator gets all the students' employment information ( Including audited and not audited )

  • Request path :manager/auitInfo
  • Request method :get
  • Request parameters ( You can add parameters , Get all parameters are empty )
Parameter name Parameter description remarks
  • The response data
{
"data": [{
"auditInfo": 0, // Audit status 0 It is not approved ,1 In order to pass the audit 
"username":"201719044120",// user name 
"company_id":" Comview ",// Corporate name 
"adress":" The Beijing municipal / Municipal district ,/ Dongcheng District /",// The company address 
"company_phone":"1232831",// Company mobile number 
"entry_time":"2020 year 3 month 28 Japan ",// Entry time 
"pos_name":"web front end ",// Position 
"is_train":0,// Whether to train 
"status":0,// Employment status 
"agreement_id":"http://123456",// Employment contracts pdf,url Address 
"salary":13000,// Salary 
"first_name":" Zhang Zhi ",
"age": 22,
"email":"2036241878@qq.com",
"phone_num":"1328371",
"stu_class":" The Internet 171",
"sex":" male ",
"magor":" Software Engineering ",
"is_work": 0,
"study_status":" Learning front end ",
},{...},{...}...
],
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.7.2 The administrator obtains all the employment information that has not passed the audit

  • Request path :manager/auitInfo
  • Request method :get
  • Request parameters
Parameter name Parameter description remarks
auditInfo 0 The audit failed
  • The response data

Return all the employment information of the class that failed to pass the examination , The data type is the same as returning all

1.7.3 The administrator obtains the employment information according to the conditions

  • Request path :manager/auitInfo
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
stu_class Parameters are arrays , Support multiple class query If it is empty, it will not be checked
auditInfo 0 perhaps 1 If it is blank, the information that has not been approved or approved will be returned
username full name Support fuzzy query , Enter a , You can select all the employment information with a sheet , If it is empty, it will not be checked
  • Sample request parameters

stu_class: ["RB Softnet 171","RB Softnet 172"]

  • The response data

Return all the employment information of the class , The data type is the same as returning all

1.7.4 The administrator submits the approved students

  • Request path :manager/upAuitInfo
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
auditUsers A list of all the students who have passed the examination An array of student numbers
  • Parameter example
 ["201719044120","201719044123"...]
 Copy code 
  • The response data
{
"data": {
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.8 Student employment status statistics

1.8.1 Get employment status data for all students , If employed 、 During the internship 、 The postgraduate entrance examination was successful ...

  • Request path :manager/workStatus

  • Request method :get

  • Request parameters

  • The response data

{
"data": {
"emp_num": [
{"value": 1048, "name": ' Looking for a job '},//value Number of Representatives , For example, the number of people looking for a job is 1084
{"value": 735, "name": ' During the internship '},
{"value": 580, "name": ' Already employed '},
{"value": 484, "name": ' The postgraduate entrance examination was successful '},
{"value": 300, "name": ' Continue to learn '},
{"value": 300, "name": ' other '}
],
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.8.2 According to the class conditions to obtain employment status

  • Request path :manager/workStatus
  • Request method :post
  • Request parameters
Parameter name Parameter description remarks
stu_class Parameters are arrays , Support multiple class query If it is empty or not, it will not be checked
  • Parameter example

stu_class: ["RB Softnet 171","RB Softnet 172"]

  • The response data
{
"data": {
"emp_num": [
{"value": 1048, "name": ' Looking for a job '},//value Number of Representatives , For example, the number of people looking for a job is 1084
{"value": 735, "name": ' During the internship '},
{"value": 580, "name": ' Already employed '},
{"value": 484, "name": ' The postgraduate entrance examination was successful '},
{"value": 300, "name": ' Continue to learn '},
{"value": 300, "name": ' other '}
],
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 

1.9 Training and untrained data analysis

  • Request path :manager/is_train

  • Request method :get

  • Request parameters

  • The response data

{
"data": {
"train_status": {
" Average salary ": {
"has_train":10000,// Average salary after training 
"no_train":5000,// Average salary without training 
},
" The number of ": {
"has_train":100,// The number of people who are employed and trained 
"no_train":600,// The number of people who are employed and not trained 
},
" The front-end development ": {
"has_train":100,// People who are engaged in the front end after training 
"no_train":600,// Untrained front-end people 
},
" The backend development ": {
"has_train":100,//
"no_train":600,//
},
"UI The designer ": {
"has_train":100,//
"no_train":600,//
},
" The product manager ": {
"has_train":100,//
"no_train":600,//
},
" Software test engineer ": {
"has_train":100,//
"no_train":600,//
},
" other ": {
"has_train":100,//
"no_train":600,//
},
}
},
"meta": {
"msg": " success ",
"status": 200
}
}
 Copy code 
版权声明
本文为[Zhang Zhihua]所创,转载请带上原文链接,感谢
https://qdmana.com/2021/05/20210503131222095w.html

  1. css单位
  2. CSS unit
  3. 前端验证集合
  4. Front end validation collection
  5. Front end learning (4) -- response line, response head, response body
  6. Lesson 27: using time measuring tools to explore available spare time
  7. CSS 单位
  8. CSS unit
  9. 前端工具集合
  10. Front end Tools Collection
  11. Introduction to HTTP message format
  12. Introduction to new features of HTML5
  13. Common instructions for Vue
  14. Introduction of bootstrap Blazer component library
  15. HTML5 速览
  16. HTML5 quick view
  17. HTML表格自动排序
  18. For less than $1700, create a private cloud with openstack
  19. Basic learning of JavaScript (1)
  20. 前端编程之路一一HTML标签分类
  21. Front end Programming: HTML tag classification
  22. ColSpan and rowspan merging cells of HTML form elements
  23. JavaScript 日期时间格式化
  24. JavaScript date time formatting
  25. Classification of front end interview questions - html2
  26. CSS block elements
  27. HTML5 form detailed tutorial
  28. HTML5 form detailed tutorial
  29. HTML5新增的元素表
  30. New element table in HTML5
  31. 3D轮播插件vue-carousel-3d非官方最全文档
  32. 3D carousel plug-in vue-carousel-3d
  33. Uniapp (Vue general) integrates Tencent location service SDK -- multi platform small program general
  34. Slowhttptest slow attack tool use details
  35. HTML summary (2)
  36. Overview of CSS3
  37. Front end abnormal monitoring system
  38. 免费网站部署和免费数据库Serverless云存储资源汇总整理
  39. Free website deployment and collection of free database serverless cloud storage resources
  40. Vux form -- a form solution of base vux
  41. 可以直接用于HTML中的特殊字符表 unicode字符集
  42. Can be directly used in HTML special character table Unicode character set
  43. Detailed explanation of HTTP protocol
  44. HTTP request header and request response header
  45. CSS background深度解析
  46. Python web/HTML GUI
  47. Front end standard 2: HTML you know and don't know
  48. Some HTML tags
  49. HTML标签之table
  50. Table of HTML tag
  51. DataTables of jQuery plug-in
  52. Unity calls Google's free translation API (HTTPS interface). Young people don't speak martial arts. How can they speak in multiple languages
  53. Linux entry most commonly used commands, do not learn a bunch of useless commands
  54. Piziheng embedded: a list of common short-range wireless communication protocols (Wi Fi / Bluetooth / ZigBee / thread...)
  55. Naming rules for the front end team of ladder
  56. HTML logo related symbols
  57. Node . JS: development resources and technology stack arrangement
  58. Unity calls Google's free translation API (HTTPS interface). Young people don't speak martial arts. How can they speak in multiple languages
  59. Straighten out JavaScript (18) - statements and operators
  60. css selector