Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
dc4691da
Commit
dc4691da
authored
Apr 14, 2021
by
小刘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
底层路径修改
parent
6470c516
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
121 additions
and
197 deletions
+121
-197
workspace.xml
.idea/workspace.xml
+0
-0
run_method.py
common/run_method.py
+2
-2
run.py
run.py
+2
-2
test_auth_classes.py
...atriarch_app/test_xin_students_class/test_auth_classes.py
+10
-10
test_auth_students_classes.py
...app/test_xin_students_class/test_auth_students_classes.py
+0
-2
test_auth_students.py
...triarch_app/test_xin_students_login/test_auth_students.py
+3
-4
xin_choose_classes.py
...in_patriach_static/xin_choose_class/xin_choose_classes.py
+5
-3
xin_auth_class.py
...app/xin_patriach_static/xin_query_class/xin_auth_class.py
+3
-2
xin_query_students_class.py
...triach_static/xin_query_class/xin_query_students_class.py
+4
-3
xin_query_students_message.py
...static/xin_students_message/xin_query_students_message.py
+4
-2
xin_pay_order.py
...triarch_app/xin_static/xin_crm/xin_apply/xin_pay_order.py
+2
-2
xin_place_order.py
...iarch_app/xin_static/xin_crm/xin_apply/xin_place_order.py
+5
-2
xin_save_order.py
...riarch_app/xin_static/xin_crm/xin_apply/xin_save_order.py
+4
-2
xin_student.py
...n_project_patriarch_app/xin_static/xin_crm/xin_student.py
+16
-12
xin_add_class.py
..._static/xin_educational/xin_class_handle/xin_add_class.py
+13
-9
xin_delete_class.py
...atic/xin_educational/xin_class_handle/xin_delete_class.py
+4
-2
xin_update_class.py
...atic/xin_educational/xin_class_handle/xin_update_class.py
+16
-15
xin_course.py
...in_static/xin_educational/xin_course_handle/xin_course.py
+10
-9
xin_update_course.py
...ic/xin_educational/xin_course_handle/xin_update_course.py
+8
-9
xin_network.py
...t_patriarch_app/xin_static/xin_educational/xin_network.py
+6
-6
__init__.py
...n_project_patriarch_app/xin_static/xin_global/__init__.py
+0
-0
global.yaml
...n_project_patriarch_app/xin_static/xin_global/global.yaml
+0
-71
xin_global.py
...project_patriarch_app/xin_static/xin_global/xin_global.py
+0
-24
xin_judge.py
script/xin_project_patriarch_app/xin_static/xin_judge.py
+0
-1
xin_school.py
...roject_patriarch_app/xin_static/xin_setting/xin_school.py
+3
-2
jky_user.yaml
...n_project_patriarch_app/xin_static/xin_user/jky_user.yaml
+1
-1
patriarch_user
..._project_patriarch_app/xin_static/xin_user/patriarch_user
+0
-0
No files found.
.idea/workspace.xml
View file @
dc4691da
This diff is collapsed.
Click to expand it.
common/run_method.py
View file @
dc4691da
...
@@ -11,7 +11,7 @@ urllib3.disable_warnings(InsecureRequestWarning)
...
@@ -11,7 +11,7 @@ urllib3.disable_warnings(InsecureRequestWarning)
class
RunMethod
:
class
RunMethod
:
@staticmethod
@staticmethod
def
run_request
(
run_method
,
url
,
params
=
None
,
body
=
None
,
header
=
None
,
r
u
n_json
=
True
,
**
kwargs
):
def
run_request
(
run_method
,
url
,
params
=
None
,
body
=
None
,
header
=
None
,
r
etur
n_json
=
True
,
**
kwargs
):
try
:
try
:
host
=
kwargs
.
get
(
"host"
)
host
=
kwargs
.
get
(
"host"
)
config_host
=
common_config
.
get
(
"host"
)
config_host
=
common_config
.
get
(
"host"
)
...
@@ -36,7 +36,7 @@ class RunMethod:
...
@@ -36,7 +36,7 @@ class RunMethod:
res
=
requests
.
patch
(
url
,
data
=
body
,
params
=
params
,
headers
=
header
,
timeout
=
time_out
,
verify
=
False
)
res
=
requests
.
patch
(
url
,
data
=
body
,
params
=
params
,
headers
=
header
,
timeout
=
time_out
,
verify
=
False
)
else
:
else
:
res
=
requests
.
request
(
method
=
run_method
,
url
=
url
,
data
=
body
,
params
=
params
,
headers
=
header
,
timeout
=
time_out
,
verify
=
False
)
res
=
requests
.
request
(
method
=
run_method
,
url
=
url
,
data
=
body
,
params
=
params
,
headers
=
header
,
timeout
=
time_out
,
verify
=
False
)
if
r
u
n_json
:
if
r
etur
n_json
:
try
:
try
:
res
=
res
.
json
()
res
=
res
.
json
()
except
JSONDecodeError
as
e
:
except
JSONDecodeError
as
e
:
...
...
run.py
View file @
dc4691da
...
@@ -4,7 +4,7 @@ import os
...
@@ -4,7 +4,7 @@ import os
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
run_config
=
[
run_config
=
[
"-s"
,
"
./script/ji_yun_ying_pc/statistical_report/test_receipt_detail.py
"
,
"-s"
,
"
script/xin_project_patriarch_app
"
,
"--alluredir"
,
"./report/xml"
,
"--alluredir"
,
"./report/xml"
,
"--host"
,
"http://172.10.62.94"
,
"--host"
,
"http://172.10.62.94"
,
"--account"
,
"b"
,
"--account"
,
"b"
,
...
@@ -12,4 +12,4 @@ if __name__ == '__main__':
...
@@ -12,4 +12,4 @@ if __name__ == '__main__':
]
]
x
=
pytest
.
main
(
run_config
)
x
=
pytest
.
main
(
run_config
)
# os模块运行allure命令,来生成html格式的报告(根据刚刚生成的配置信息)
# os模块运行allure命令,来生成html格式的报告(根据刚刚生成的配置信息)
os
.
system
(
"
/Users/huangqiang/WorkPlace/allure-2.13.8/bin/
allure generate ./report/xml -o ./report/html --clean"
)
os
.
system
(
"allure generate ./report/xml -o ./report/html --clean"
)
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_class/test_auth_classes.py
View file @
dc4691da
...
@@ -32,7 +32,7 @@ class TestAuthNotBuyClasses:
...
@@ -32,7 +32,7 @@ class TestAuthNotBuyClasses:
"""
"""
def
test_query_new_students
(
self
):
def
test_query_new_students
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
)
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
)
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
...
@@ -83,7 +83,7 @@ class TestAuthHaveClasses:
...
@@ -83,7 +83,7 @@ class TestAuthHaveClasses:
time
.
sleep
(
2
)
time
.
sleep
(
2
)
def
test_query_all
(
self
):
def
test_query_all
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
)
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
)
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
...
@@ -91,46 +91,46 @@ class TestAuthHaveClasses:
...
@@ -91,46 +91,46 @@ class TestAuthHaveClasses:
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classId'
)[
0
]
==
self
.
details
[
0
][
'classId'
]
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classId'
)[
0
]
==
self
.
details
[
0
][
'classId'
]
def
test_query_have_subject
(
self
):
def
test_query_have_subject
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'数学'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'数学'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...subject'
)[
0
]
==
'数学'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...subject'
)[
0
]
==
'数学'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...subject'
)[
0
]
!=
'语文'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...subject'
)[
0
]
!=
'语文'
def
test_query_not_subject
(
self
):
def
test_query_not_subject
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'语文'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'语文'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
def
test_query_classType
(
self
):
def
test_query_classType
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
courseTypes
=
[
'常规班课'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
courseTypes
=
[
'常规班课'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)[
0
]
==
'常规班课'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)[
0
]
==
'常规班课'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)[
0
]
!=
'精品定制课'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)[
0
]
!=
'精品定制课'
def
test_query_not_classType
(
self
):
def
test_query_not_classType
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
courseTypes
=
[
'集训班课'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
courseTypes
=
[
'集训班课'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
!=
[]
def
test_query_classTerm
(
self
):
def
test_query_classTerm
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classTerms
=
[
'春'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classTerms
=
[
'春'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)[
0
]
==
'春'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)[
0
]
==
'春'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)[
0
]
!=
'秋'
with
assume
:
assert
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)[
0
]
!=
'秋'
def
test_query_not_classTerm
(
self
):
def
test_query_not_classTerm
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classTerms
=
[
'寒'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classTerms
=
[
'寒'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
def
test_query_all_option
(
self
):
def
test_query_all_option
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'数学'
],
classTerms
=
[
'春'
],
courseTypes
=
[
'常规班课'
])
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
subjects
=
[
'数学'
],
classTerms
=
[
'春'
],
courseTypes
=
[
'常规班课'
])
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
'春'
in
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)
with
assume
:
assert
'春'
in
jsonpath
.
jsonpath
(
query_data
,
'$...classTerm'
)
...
@@ -141,7 +141,7 @@ class TestAuthHaveClasses:
...
@@ -141,7 +141,7 @@ class TestAuthHaveClasses:
with
assume
:
assert
'副线班课'
not
in
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)
with
assume
:
assert
'副线班课'
not
in
jsonpath
.
jsonpath
(
query_data
,
'$...courseType'
)
def
test_query_graduate
(
self
):
def
test_query_graduate
(
self
):
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classStatus
=
1
)
.
query_class_list
()
.
json
()
query_data
=
QueryClass
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
studentId
=
self
.
userId
,
classStatus
=
1
)
.
query_class_list
()
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'code'
]
==
0
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'msg'
]
==
'成功'
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
with
assume
:
assert
query_data
[
'data'
][
'studentClassInfoDtoList'
]
==
[]
...
...
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_class/test_auth_students_classes.py
View file @
dc4691da
...
@@ -82,7 +82,6 @@ class TestAuthStudentsClassMessage:
...
@@ -82,7 +82,6 @@ class TestAuthStudentsClassMessage:
"name"
:
"刘黄鑫"
"name"
:
"刘黄鑫"
})
})
class_data
=
QueryStudentsClass
(
server
=
self
.
server
,
classId
=
self
.
class_id
,
studentId
=
self
.
userId
,
username
=
self
.
studentPho
)
.
query_student_class
()
class_data
=
QueryStudentsClass
(
server
=
self
.
server
,
classId
=
self
.
class_id
,
studentId
=
self
.
userId
,
username
=
self
.
studentPho
)
.
query_student_class
()
print
(
class_data
)
with
assume
:
assert
class_data
[
'code'
]
==
0
with
assume
:
assert
class_data
[
'code'
]
==
0
with
assume
:
assert
class_data
[
'msg'
]
==
'成功'
with
assume
:
assert
class_data
[
'msg'
]
==
'成功'
with
assume
:
assert
class_data
[
'data'
][
'teacherId'
]
==
9384
with
assume
:
assert
class_data
[
'data'
][
'teacherId'
]
==
9384
...
@@ -92,7 +91,6 @@ class TestAuthStudentsClassMessage:
...
@@ -92,7 +91,6 @@ class TestAuthStudentsClassMessage:
# 断言学科
# 断言学科
def
test_query_students_subject
(
self
):
def
test_query_students_subject
(
self
):
class_data
=
QueryStudentsClass
(
server
=
self
.
server
,
classId
=
self
.
class_id
,
studentId
=
self
.
userId
,
username
=
self
.
studentPho
)
.
query_student_class
()
class_data
=
QueryStudentsClass
(
server
=
self
.
server
,
classId
=
self
.
class_id
,
studentId
=
self
.
userId
,
username
=
self
.
studentPho
)
.
query_student_class
()
print
(
class_data
)
with
assume
:
assert
class_data
[
'code'
]
==
0
with
assume
:
assert
class_data
[
'code'
]
==
0
with
assume
:
assert
class_data
[
'msg'
]
==
'成功'
with
assume
:
assert
class_data
[
'msg'
]
==
'成功'
with
assume
:
assert
class_data
[
'data'
][
'subject'
]
==
'数学'
with
assume
:
assert
class_data
[
'data'
][
'subject'
]
==
'数学'
...
...
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_login/test_auth_students.py
View file @
dc4691da
...
@@ -3,6 +3,7 @@ import pytest
...
@@ -3,6 +3,7 @@ import pytest
import
requests
import
requests
from
pytest_assume.plugin
import
assume
from
pytest_assume.plugin
import
assume
from
script.base_api
import
app_students_phoneNumber_mobilePhoneNumberBounding_get
,
app_pushRelationship_post
from
script.xin_project_patriarch_app.xin_patriarch_app.xin_patriach_static.xin_public_class.xin_global_static
import
StaticGlobal
from
script.xin_project_patriarch_app.xin_patriarch_app.xin_patriach_static.xin_public_class.xin_global_static
import
StaticGlobal
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
...
@@ -10,12 +11,10 @@ from script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login im
...
@@ -10,12 +11,10 @@ from script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login im
class
TestAuthStudents
:
class
TestAuthStudents
:
def
setup_class
(
self
):
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
server
=
StaticGlobal
.
SERVER
self
.
students_url
=
'/service-profile/app/students/13364004418/mobilePhoneNumberBounding'
self
.
pushRelation_url
=
'/service-profile/app/pushRelationship'
self
.
header
=
AuthHeaders
(
server
=
self
.
server
,
username
=
'13364004418'
,
password
=
'geek1234'
)
.
get_auth_headers
()
self
.
header
=
AuthHeaders
(
server
=
self
.
server
,
username
=
'13364004418'
,
password
=
'geek1234'
)
.
get_auth_headers
()
def
test_students
(
self
):
def
test_students
(
self
):
students_data
=
requests
.
get
(
url
=
self
.
server
+
self
.
students_url
,
headers
=
self
.
header
,
verify
=
False
)
.
json
(
)
students_data
=
app_students_phoneNumber_mobilePhoneNumberBounding_get
(
phoneNumber
=
'13364004418'
,
header
=
self
.
header
,
default_assert
=
False
)
with
assume
:
assert
students_data
[
'code'
]
==
0
with
assume
:
assert
students_data
[
'code'
]
==
0
with
assume
:
assert
'小黄测试学生三年级'
in
jsonpath
.
jsonpath
(
students_data
,
'$..name'
)
with
assume
:
assert
'小黄测试学生三年级'
in
jsonpath
.
jsonpath
(
students_data
,
'$..name'
)
with
assume
:
assert
students_data
[
'data'
][
0
][
'student'
][
'phones'
][
0
]
==
'13364004418'
with
assume
:
assert
students_data
[
'data'
][
0
][
'student'
][
'phones'
][
0
]
==
'13364004418'
...
@@ -26,7 +25,7 @@ class TestAuthStudents:
...
@@ -26,7 +25,7 @@ class TestAuthStudents:
"studentPhoneNum"
:
"13364004418"
,
"studentPhoneNum"
:
"13364004418"
,
"clientIdentify"
:
""
"clientIdentify"
:
""
}
}
push_data
=
requests
.
post
(
url
=
self
.
server
+
self
.
pushRelation_url
,
json
=
push_data
,
headers
=
self
.
header
,
verify
=
False
)
.
json
(
)
push_data
=
app_pushRelationship_post
(
body
=
push_data
,
header
=
self
.
header
,
default_assert
=
False
)
with
assume
:
assert
push_data
[
'code'
]
==
0
with
assume
:
assert
push_data
[
'code'
]
==
0
...
...
script/xin_project_patriarch_app/xin_patriarch_app/xin_patriach_static/xin_choose_class/xin_choose_classes.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
app_class_studentId_student_allowable_get
,
app_class_classId_alternative_studentId_student_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -24,14 +25,14 @@ class ChooseClasses:
...
@@ -24,14 +25,14 @@ class ChooseClasses:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
choose_url
=
f
'/service-profile/app/class/{self.studentId}/student/allowable'
#
self.choose_url = f'/service-profile/app/class/{self.studentId}/student/allowable'
self
.
choose_body
=
{
self
.
choose_body
=
{
'schoolAreaId'
:
self
.
schoolAreaId
'schoolAreaId'
:
self
.
schoolAreaId
}
}
def
choose_class
(
self
):
def
choose_class
(
self
):
return
requests
.
get
(
url
=
self
.
server
+
self
.
choose_url
,
params
=
self
.
choose_body
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
app_class_studentId_student_allowable_get
(
studentId
=
self
.
studentId
,
params
=
self
.
choose_body
,
header
=
self
.
headers
,
default_assert
=
False
)
class
courseDetails
:
class
courseDetails
:
...
@@ -58,7 +59,8 @@ class courseDetails:
...
@@ -58,7 +59,8 @@ class courseDetails:
self
.
course_details_url
=
f
'/service-profile/app/class/{self.classId}/alternative/{self.studentId}/student'
self
.
course_details_url
=
f
'/service-profile/app/class/{self.classId}/alternative/{self.studentId}/student'
def
query_course_details
(
self
):
def
query_course_details
(
self
):
return
requests
.
get
(
url
=
self
.
server
+
self
.
course_details_url
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
()
response_data
=
app_class_classId_alternative_studentId_student_get
(
classId
=
self
.
classId
,
studentId
=
self
.
studentId
,
header
=
self
.
headers
,
default_assert
=
False
)
return
response_data
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_patriarch_app/xin_patriach_static/xin_query_class/xin_auth_class.py
View file @
dc4691da
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
"""
"""
import
requests
import
requests
from
script.base_api
import
app_course_newListStudentClasses_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
...
@@ -32,11 +33,11 @@ class QueryClass:
...
@@ -32,11 +33,11 @@ class QueryClass:
"classTerms"
:
self
.
classTerms
,
"classTerms"
:
self
.
classTerms
,
"studentId"
:
self
.
studentId
"studentId"
:
self
.
studentId
}
}
self
.
query_url
=
'/service-profile/app/course/newListStudentClasses'
#
self.query_url = '/service-profile/app/course/newListStudentClasses'
self
.
auth_headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
self
.
username
)
.
get_auth_headers
()
self
.
auth_headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
self
.
username
)
.
get_auth_headers
()
def
query_class_list
(
self
):
def
query_class_list
(
self
):
query_data
=
requests
.
post
(
url
=
self
.
server
+
self
.
query_url
,
json
=
self
.
query_body
,
headers
=
self
.
auth_headers
,
verify
=
False
)
query_data
=
app_course_newListStudentClasses_post
(
body
=
self
.
query_body
,
header
=
self
.
auth_headers
,
default_assert
=
False
)
return
query_data
return
query_data
...
...
script/xin_project_patriarch_app/xin_patriarch_app/xin_patriach_static/xin_query_class/xin_query_students_class.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
app_course_getStudentClassDetail_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
"""
"""
...
@@ -26,7 +27,7 @@ class QueryStudentsClass:
...
@@ -26,7 +27,7 @@ class QueryStudentsClass:
self
.
username
=
username
self
.
username
=
username
self
.
password
=
password
self
.
password
=
password
self
.
url
=
'/service-profile/app/course/getStudentClassDetail'
#
self.url = '/service-profile/app/course/getStudentClassDetail'
self
.
headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_auth_headers
()
self
.
headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_auth_headers
()
...
@@ -36,8 +37,8 @@ class QueryStudentsClass:
...
@@ -36,8 +37,8 @@ class QueryStudentsClass:
}
}
def
query_student_class
(
self
):
def
query_student_class
(
self
):
class_data
=
requests
.
get
(
url
=
self
.
server
+
self
.
url
,
params
=
self
.
body
,
headers
=
self
.
headers
,
verify
=
False
)
class_data
=
app_course_getStudentClassDetail_get
(
params
=
self
.
body
,
header
=
self
.
headers
,
default_assert
=
False
)
return
class_data
.
json
()
return
class_data
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_patriarch_app/xin_patriach_static/xin_students_message/xin_query_students_message.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
students_phoneNumber_mobilePhoneNumberBounding_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
...
@@ -16,10 +17,11 @@ class QueryStudentsMessage:
...
@@ -16,10 +17,11 @@ class QueryStudentsMessage:
self
.
studentPno
=
studentPno
self
.
studentPno
=
studentPno
self
.
password
=
password
self
.
password
=
password
self
.
headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
studentPno
,
password
=
password
)
.
get_auth_headers
()
self
.
headers
=
AuthHeaders
(
server
=
self
.
server
,
username
=
studentPno
,
password
=
password
)
.
get_auth_headers
()
self
.
query_url
=
f
'/service-profile/app/students/{self.studentPno}/mobilePhoneNumberBounding'
#
self.query_url = f'/service-profile/app/students/{self.studentPno}/mobilePhoneNumberBounding'
def
query_students_message
(
self
):
def
query_students_message
(
self
):
return
requests
.
get
(
url
=
self
.
server
+
self
.
query_url
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
()
students_data
=
students_phoneNumber_mobilePhoneNumberBounding_get
(
phoneNumber
=
self
.
studentPno
,
header
=
self
.
headers
,
default_assert
=
False
)
return
students_data
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_static/xin_crm/xin_apply/xin_pay_order.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
pay_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -46,5 +47,4 @@ class PayOrder:
...
@@ -46,5 +47,4 @@ class PayOrder:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
def
pay_order
(
self
):
def
pay_order
(
self
):
pay_data
=
requests
.
post
(
url
=
self
.
server
+
self
.
pay_url
,
json
=
self
.
pay_body
,
headers
=
self
.
headers
,
verify
=
False
)
return
pay_post
(
header
=
self
.
headers
,
body
=
self
.
pay_body
,
default_assert
=
False
)
return
pay_data
script/xin_project_patriarch_app/xin_static/xin_crm/xin_apply/xin_place_order.py
View file @
dc4691da
import
requests
import
requests
import
datetime
import
datetime
from
script.base_api.api_operation_web.order
import
order_saveOrder_post
from
script.xin_project_patriarch_app.xin_static.xin_crm.xin_student
import
CreateStudent
from
script.xin_project_patriarch_app.xin_static.xin_crm.xin_student
import
CreateStudent
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -11,7 +13,7 @@ class PlaceOrder:
...
@@ -11,7 +13,7 @@ class PlaceOrder:
password
=
None
,
password
=
None
,
studentId
=
None
):
studentId
=
None
):
self
.
server
=
server
self
.
server
=
server
self
.
sava_order_url
=
'/api-operation-web/order/saveOrder?
recommit-ticket=undefined
'
self
.
sava_order_url
=
'/api-operation-web/order/saveOrder?'
self
.
pay_url
=
'/api-operation-web/pay'
self
.
pay_url
=
'/api-operation-web/pay'
self
.
username
=
username
self
.
username
=
username
self
.
password
=
password
self
.
password
=
password
...
@@ -42,7 +44,8 @@ class PlaceOrder:
...
@@ -42,7 +44,8 @@ class PlaceOrder:
}
}
def
price_order
(
self
):
def
price_order
(
self
):
sava_data
=
requests
.
post
(
url
=
self
.
server
+
self
.
sava_order_url
,
json
=
self
.
sava_body
,
headers
=
self
.
header
,
verify
=
False
)
.
json
()[
'data'
]
# sava_data = requests.post(url=self.server + self.sava_order_url, json=self.sava_body, headers=self.header, verify=False).json()['data']
sava_data
=
order_saveOrder_post
(
header
=
self
.
header
,
body
=
self
.
sava_body
,
params
=
'recommit-ticket=undefined'
,
default_assert
=
False
)[
'data'
]
pay_body
=
{
pay_body
=
{
"orderId"
:
str
(
sava_data
),
"orderId"
:
str
(
sava_data
),
"operatorId"
:
9384
,
"operatorId"
:
9384
,
...
...
script/xin_project_patriarch_app/xin_static/xin_crm/xin_apply/xin_save_order.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
order_saveOrder_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -55,7 +56,7 @@ class SaveOrder:
...
@@ -55,7 +56,7 @@ class SaveOrder:
"""
"""
self
.
couponItemIds
=
couponItemIds
or
[]
self
.
couponItemIds
=
couponItemIds
or
[]
self
.
save_url
=
'/api-operation-web/order/saveOrder?recommit-ticket=undefined'
#
self.save_url = '/api-operation-web/order/saveOrder?recommit-ticket=undefined'
self
.
body
=
{
self
.
body
=
{
"studentId"
:
self
.
studentId
,
"studentId"
:
self
.
studentId
,
"schoolArea"
:
self
.
schoolArea
,
"schoolArea"
:
self
.
schoolArea
,
...
@@ -69,5 +70,6 @@ class SaveOrder:
...
@@ -69,5 +70,6 @@ class SaveOrder:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
def
save_order
(
self
):
def
save_order
(
self
):
order_data
=
requests
.
post
(
url
=
self
.
server
+
self
.
save_url
,
json
=
self
.
body
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
()
order_data
=
order_saveOrder_post
(
header
=
self
.
headers
,
body
=
self
.
body
,
params
=
'recommit-ticket=undefined'
,
default_assert
=
False
)
# order_data = requests.post(url=self.server + self.save_url, json=self.body, headers=self.headers, verify=False).json()
return
order_data
return
order_data
script/xin_project_patriarch_app/xin_static/xin_crm/xin_student.py
View file @
dc4691da
import
requests
import
requests
import
urllib3
import
urllib3
from
script.base_api
import
clue_manualInputAdd_post
,
clue_queryAll_post
,
clue_delete_delete
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -99,7 +101,7 @@ class CreateStudent:
...
@@ -99,7 +101,7 @@ class CreateStudent:
super
()
.
__init__
()
super
()
.
__init__
()
def
create_student
(
self
):
def
create_student
(
self
):
create_url
=
'/service-crm/clue/manualInputAdd'
#
create_url = '/service-crm/clue/manualInputAdd'
create_body
=
{
create_body
=
{
"belong"
:
self
.
belong
,
"belong"
:
self
.
belong
,
"studentName"
:
self
.
studentName
+
self
.
publicGrade
,
"studentName"
:
self
.
studentName
+
self
.
publicGrade
,
...
@@ -144,9 +146,14 @@ class CreateStudent:
...
@@ -144,9 +146,14 @@ class CreateStudent:
"schoolCityName"
:
self
.
schoolCityName
"schoolCityName"
:
self
.
schoolCityName
}
}
urllib3
.
disable_warnings
(
urllib3
.
exceptions
.
InsecureRequestWarning
)
urllib3
.
disable_warnings
(
urllib3
.
exceptions
.
InsecureRequestWarning
)
json_data
=
requests
.
post
(
url
=
self
.
server
+
create_url
,
json
=
create_body
,
headers
=
self
.
header
,
verify
=
False
)
json_data
=
clue_manualInputAdd_post
(
body
=
create_body
,
header
=
self
.
header
,
default_assert
=
False
)
if
json_data
.
json
()[
'code'
]
==
0
and
json_data
.
json
()[
'msg'
]
==
'成功'
:
# json_data = requests.post(url=self.server + create_url, json=create_body, headers=self.header, verify=False)
query_url
=
'/service-crm/clue/queryAll'
if
json_data
[
'code'
]
==
0
and
json_data
[
'msg'
]
==
'成功'
:
return
self
.
query_student
()
else
:
return
json_data
def
query_student
(
self
):
query_body
=
{
query_body
=
{
"belong"
:
"PUBLIC"
,
"belong"
:
"PUBLIC"
,
"status"
:
"UNASSIGNED"
,
"status"
:
"UNASSIGNED"
,
...
@@ -160,11 +167,8 @@ class CreateStudent:
...
@@ -160,11 +167,8 @@ class CreateStudent:
"orderField"
:
"id"
,
"orderField"
:
"id"
,
"schoolAreas"
:
[
self
.
createSchoolAreaId
or
3052
]
"schoolAreas"
:
[
self
.
createSchoolAreaId
or
3052
]
}
}
urllib3
.
disable_warnings
(
urllib3
.
exceptions
.
InsecureRequestWarning
)
student_data
=
clue_queryAll_post
(
body
=
query_body
,
header
=
self
.
header
,
default_assert
=
False
)
student_data
=
requests
.
post
(
url
=
self
.
server
+
query_url
,
json
=
query_body
,
headers
=
self
.
header
,
verify
=
False
)
return
student_data
return
student_data
.
json
()
else
:
return
json_data
.
json
()
class
DeleteStudent
:
class
DeleteStudent
:
...
@@ -176,9 +180,9 @@ class DeleteStudent:
...
@@ -176,9 +180,9 @@ class DeleteStudent:
self
.
header
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
password
)
.
get_headers
()
self
.
header
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
password
)
.
get_headers
()
def
delete_student
(
self
):
def
delete_student
(
self
):
delete_url
=
'/service-crm/clue/delete'
#
delete_url = '/service-crm/clue/delete'
urllib3
.
disable_warnings
(
urllib3
.
exceptions
.
InsecureRequestWarning
)
delete_data
=
clue_delete_delete
(
body
=
self
.
student
,
header
=
self
.
header
,
default_assert
=
False
)
delete_data
=
requests
.
delete
(
url
=
self
.
server
+
delete_url
,
json
=
self
.
student
,
headers
=
self
.
header
,
verify
=
False
)
#
delete_data = requests.delete(url=self.server + delete_url, json=self.student, headers=self.header, verify=False)
return
delete_data
.
json
()
return
delete_data
.
json
()
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_class_handle/xin_add_class.py
View file @
dc4691da
import
jsonpath
import
jsonpath
import
requests
import
requests
from
script.base_api
import
education_classes_add_post
,
education_courses_query_post
,
education_classes_query_post
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_course_handle.xin_course
import
CreateCourse
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_course_handle.xin_course
import
CreateCourse
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_time
import
Time_get
from
script.xin_project_patriarch_app.xin_static.xin_time
import
Time_get
...
@@ -47,15 +48,16 @@ class CreateClass:
...
@@ -47,15 +48,16 @@ class CreateClass:
self
.
header
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
self
.
header
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
def
create_class
(
self
):
def
create_class
(
self
):
class_url
=
'/service-education/education/classes/add?recommit-ticket=temp-ticket'
#
class_url = '/service-education/education/classes/add?recommit-ticket=temp-ticket'
course_url
=
'/service-education/education/courses/query?pageNum=1&pageSize=10'
#
course_url = '/service-education/education/courses/query?pageNum=1&pageSize=10'
course_data
=
{
course_data
=
{
"courseName"
:
self
.
courseId
,
"courseName"
:
self
.
courseId
,
"type"
:
"click"
,
"type"
:
"click"
,
"schoolAreas"
:
[
self
.
schoolArea
]
"schoolAreas"
:
[
self
.
schoolArea
]
}
}
courseId
=
requests
.
post
(
url
=
self
.
server
+
course_url
,
json
=
course_data
,
headers
=
self
.
header
,
verify
=
False
)
.
json
()
courseId
=
education_courses_query_post
(
params
=
'pageNum=1&pageSize=10'
,
body
=
course_data
,
header
=
self
.
header
,
default_assert
=
False
)
# courseId = requests.post(url=self.server + course_url, json=course_data, headers=self.header, verify=False).json()
if
courseId
[
'code'
]
!=
0
:
if
courseId
[
'code'
]
!=
0
:
return
courseId
return
courseId
year
=
jsonpath
.
jsonpath
(
courseId
,
'$...year'
)[
0
]
year
=
jsonpath
.
jsonpath
(
courseId
,
'$...year'
)[
0
]
...
@@ -101,9 +103,10 @@ class CreateClass:
...
@@ -101,9 +103,10 @@ class CreateClass:
class_data
.
pop
(
'classroomId'
)
class_data
.
pop
(
'classroomId'
)
if
self
.
teacherId
is
None
:
if
self
.
teacherId
is
None
:
class_data
.
pop
(
'teacherId'
)
class_data
.
pop
(
'teacherId'
)
add_class_data
=
requests
.
post
(
url
=
self
.
server
+
class_url
,
json
=
class_data
,
headers
=
self
.
header
,
verify
=
False
)
add_class_data
=
education_classes_add_post
(
params
=
'recommit-ticket=temp-ticket'
,
body
=
class_data
,
header
=
self
.
header
,
default_assert
=
False
)
if
add_class_data
.
json
()[
'code'
]
==
0
:
# add_class_data = requests.post(url=self.server + class_url, json=class_data, headers=self.header, verify=False)
query_url
=
'/service-education/education/classes/query'
if
add_class_data
[
'code'
]
==
0
:
# query_url = '/service-education/education/classes/query'
query_data
=
{
query_data
=
{
"pageSize"
:
30
,
"pageSize"
:
30
,
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -119,10 +122,11 @@ class CreateClass:
...
@@ -119,10 +122,11 @@ class CreateClass:
self
.
schoolArea
or
3052
self
.
schoolArea
or
3052
]
]
}
}
query_class
=
requests
.
post
(
url
=
self
.
server
+
query_url
,
json
=
query_data
,
headers
=
self
.
header
,
verify
=
False
)
# query_class = requests.post(url=self.server + query_url, json=query_data, headers=self.header, verify=False)
return
query_class
.
json
()[
'data'
][
'list'
][
0
]
query_class
=
education_classes_query_post
(
body
=
query_data
,
header
=
self
.
header
,
default_assert
=
False
)
return
query_class
[
'data'
][
'list'
][
0
]
else
:
else
:
return
add_class_data
.
json
()
return
add_class_data
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_class_handle/xin_delete_class.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
education_classes_delete_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -15,10 +16,11 @@ class DeleteClass:
...
@@ -15,10 +16,11 @@ class DeleteClass:
self
.
classes
=
classes
self
.
classes
=
classes
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
url
=
'/service-education/education/classes/delete'
#
self.url = '/service-education/education/classes/delete'
def
delete_class
(
self
):
def
delete_class
(
self
):
return
requests
.
post
(
url
=
self
.
server
+
self
.
url
,
json
=
self
.
classes
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
()
delete_msg
=
education_classes_delete_post
(
body
=
self
.
classes
,
header
=
self
.
headers
,
default_assert
=
False
)
return
delete_msg
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_class_handle/xin_update_class.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
education_classes_optionalUpdate_post
,
education_classes_update_limit_post
,
education_classes_update_targetNum_post
,
classDirector_update_post
,
education_classes_update_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -16,7 +17,7 @@ class UpdateClass:
...
@@ -16,7 +17,7 @@ class UpdateClass:
self
.
body
=
{
self
.
body
=
{
"classId"
:
self
.
classId
"classId"
:
self
.
classId
}
}
self
.
update_url
=
'/service-education/education/classes/optionalUpdate'
#
self.update_url = '/service-education/education/classes/optionalUpdate'
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
...
@@ -29,7 +30,7 @@ class UpdateClass:
...
@@ -29,7 +30,7 @@ class UpdateClass:
"name"
:
"className"
"name"
:
"className"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改班级简称
# 修改班级简称
def
update_class_abbreviation
(
self
,
value
):
def
update_class_abbreviation
(
self
,
value
):
...
@@ -40,7 +41,7 @@ class UpdateClass:
...
@@ -40,7 +41,7 @@ class UpdateClass:
"name"
:
"classAbbreviation"
"name"
:
"classAbbreviation"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改期数
# 修改期数
def
update_class_phase
(
self
,
value
):
def
update_class_phase
(
self
,
value
):
...
@@ -51,7 +52,7 @@ class UpdateClass:
...
@@ -51,7 +52,7 @@ class UpdateClass:
"name"
:
"phase"
"name"
:
"phase"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改老师
# 修改老师
def
update_class_teacher
(
self
,
value
:
dict
):
def
update_class_teacher
(
self
,
value
:
dict
):
...
@@ -69,7 +70,7 @@ class UpdateClass:
...
@@ -69,7 +70,7 @@ class UpdateClass:
"name"
:
"teacher"
"name"
:
"teacher"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改教室
# 修改教室
def
update_class_classroom
(
self
,
value
:
dict
):
def
update_class_classroom
(
self
,
value
:
dict
):
...
@@ -87,11 +88,11 @@ class UpdateClass:
...
@@ -87,11 +88,11 @@ class UpdateClass:
"name"
:
"classroom"
"name"
:
"classroom"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改预招收人数
# 修改预招收人数
def
update_class_studentNum
(
self
,
value
):
def
update_class_studentNum
(
self
,
value
):
studentNum_url
=
'/service-education/education/classes/update/limit'
#
studentNum_url = '/service-education/education/classes/update/limit'
fields
=
{
fields
=
{
'fields'
:
[
'fields'
:
[
{
{
...
@@ -99,11 +100,11 @@ class UpdateClass:
...
@@ -99,11 +100,11 @@ class UpdateClass:
"name"
:
"studentNum"
"name"
:
"studentNum"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
studentNum_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_update_limit_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改满班目标
# 修改满班目标
def
update_class_targetNum
(
self
,
value
):
def
update_class_targetNum
(
self
,
value
):
targetNum_url
=
'/service-education/education/classes/update/targetNum'
#
targetNum_url = '/service-education/education/classes/update/targetNum'
fields
=
{
fields
=
{
'fields'
:
[
'fields'
:
[
{
{
...
@@ -111,15 +112,15 @@ class UpdateClass:
...
@@ -111,15 +112,15 @@ class UpdateClass:
"name"
:
"targetNum"
"name"
:
"targetNum"
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
targetNum_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_update_targetNum_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改班主任
# 修改班主任
def
update_class_employee
(
self
,
value
):
def
update_class_employee
(
self
,
value
):
employee_url
=
'/service-education/classDirector/update'
#
employee_url = '/service-education/classDirector/update'
fields
=
{
fields
=
{
"employeeId"
:
value
"employeeId"
:
value
}
}
return
requests
.
post
(
url
=
self
.
server
+
employee_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
classDirector_update_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改是否属于外地生班
# 修改是否属于外地生班
def
update_class_outLandClass
(
self
,
value
:
bool
):
def
update_class_outLandClass
(
self
,
value
:
bool
):
...
@@ -131,7 +132,7 @@ class UpdateClass:
...
@@ -131,7 +132,7 @@ class UpdateClass:
"value"
:
value
"value"
:
value
}
}
]}
]}
return
requests
.
post
(
url
=
self
.
server
+
outLandClass_url
,
json
=
dict
(
fields
,
**
self
.
body
),
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_optionalUpdate_post
(
body
=
dict
(
fields
,
**
self
.
body
),
header
=
self
.
headers
,
default_assert
=
False
)
# 修改排课
# 修改排课
def
update_class_schedule
(
self
,
classSchedule
):
def
update_class_schedule
(
self
,
classSchedule
):
...
@@ -154,11 +155,11 @@ class UpdateClass:
...
@@ -154,11 +155,11 @@ class UpdateClass:
}
}
]
]
"""
"""
schedule_url
=
'/service-education/education/classes/update'
#
schedule_url = '/service-education/education/classes/update'
data
=
{
data
=
{
"classSchedule"
:
classSchedule
"classSchedule"
:
classSchedule
}
}
return
requests
.
post
(
url
=
self
.
server
+
schedule_url
,
json
=
data
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_classes_update_post
(
body
=
data
,
header
=
self
.
headers
,
default_assert
=
False
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_course_handle/xin_course.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
education_courses_add_post
,
education_courses_query_post
,
education_courses_delete_post
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -81,7 +83,7 @@ class CreateCourse:
...
@@ -81,7 +83,7 @@ class CreateCourse:
"""
"""
def
create_course
(
self
):
def
create_course
(
self
):
course_url
=
'/service-education/education/courses/add?recommit-ticket=temp-ticket'
#
course_url = '/service-education/education/courses/add?recommit-ticket=temp-ticket'
course_body
=
[
course_body
=
[
{
{
"courseName"
:
self
.
courseName
+
self
.
classType
+
self
.
courseType
,
"courseName"
:
self
.
courseName
+
self
.
classType
+
self
.
courseType
,
...
@@ -118,9 +120,9 @@ class CreateCourse:
...
@@ -118,9 +120,9 @@ class CreateCourse:
course_body
[
0
][
'sectionSetting'
]
=
self
.
sectionSetting
course_body
[
0
][
'sectionSetting'
]
=
self
.
sectionSetting
course_body
[
0
][
'uphalfCoursePeriod'
]
=
self
.
uphalfCoursePeriod
course_body
[
0
][
'uphalfCoursePeriod'
]
=
self
.
uphalfCoursePeriod
course_body
[
0
][
'downhalfCoursePeriod'
]
=
self
.
downhalfCoursePeriod
course_body
[
0
][
'downhalfCoursePeriod'
]
=
self
.
downhalfCoursePeriod
course_data
=
requests
.
post
(
url
=
self
.
server
+
course_url
,
json
=
course_body
,
headers
=
self
.
header
,
verify
=
False
)
course_data
=
education_courses_add_post
(
body
=
course_body
,
header
=
self
.
header
,
default_assert
=
False
)
if
course_data
.
json
()[
'code'
]
==
0
and
course_data
.
json
()
[
'msg'
]
==
'成功'
:
if
course_data
[
'code'
]
==
0
and
course_data
[
'msg'
]
==
'成功'
:
query_url
=
'/service-education/education/courses/query?pageNum=1&pageSize=10'
#
query_url = '/service-education/education/courses/query?pageNum=1&pageSize=10'
schoolAreas
=
list
()
schoolAreas
=
list
()
if
self
.
schools
is
None
:
if
self
.
schools
is
None
:
schoolAreas
.
append
(
3052
)
schoolAreas
.
append
(
3052
)
...
@@ -139,10 +141,10 @@ class CreateCourse:
...
@@ -139,10 +141,10 @@ class CreateCourse:
"type"
:
"click"
,
"type"
:
"click"
,
"schoolAreas"
:
schoolAreas
"schoolAreas"
:
schoolAreas
}
}
query_content
=
requests
.
post
(
url
=
self
.
server
+
query_url
,
json
=
query_data
,
headers
=
self
.
header
,
verify
=
False
)
query_content
=
education_courses_query_post
(
params
=
'pageNum=1&pageSize=10'
,
body
=
query_data
,
header
=
self
.
header
,
default_assert
=
False
)
return
query_content
.
json
()
return
query_content
else
:
else
:
return
course_data
.
json
()
return
course_data
class
DeleteCourse
:
class
DeleteCourse
:
...
@@ -156,8 +158,7 @@ class DeleteCourse:
...
@@ -156,8 +158,7 @@ class DeleteCourse:
"""
"""
def
delete_course
(
self
):
def
delete_course
(
self
):
delete_url
=
'/service-education/education/courses/delete'
delete_data
=
education_courses_delete_post
(
body
=
self
.
course
,
header
=
self
,
default_assert
=
False
,
return_json
=
False
)
delete_data
=
requests
.
delete
(
url
=
self
.
server
+
delete_url
,
json
=
self
.
course
,
headers
=
self
.
header
,
verify
=
False
)
return
delete_data
.
json
()
return
delete_data
.
json
()
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_course_handle/xin_update_course.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
education_courses_modifyPrice_post
from
script.base_api
import
education_courses_modifyPrice_post
,
education_courses_queryById_get
,
education_update_course_class_post
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
def
query_course
(
server
,
courseId
,
headers
):
def
query_course
(
courseId
,
headers
):
"""
"""
:param server: 服务
:param headers: 请求头
:param headers: 请求头
:param courseId: 课程ID
:param courseId: 课程ID
:return:
:return:
"""
"""
query_url
=
'/service-education/education/courses/queryById'
#
query_url = '/service-education/education/courses/queryById'
query_data
=
{
query_data
=
{
"courseId"
:
courseId
,
"courseId"
:
courseId
,
"judgeUsed"
:
True
,
"judgeUsed"
:
True
,
}
}
return
requests
.
get
(
url
=
server
+
query_url
,
params
=
query_data
,
headers
=
headers
,
verify
=
False
)
.
json
(
)
return
education_courses_queryById_get
(
params
=
query_data
,
headers
=
headers
,
default_assert
=
False
)
"""
"""
...
@@ -78,7 +77,7 @@ class UpdateCourse:
...
@@ -78,7 +77,7 @@ class UpdateCourse:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
username
,
password
=
password
)
.
get_headers
()
def
update_course
(
self
):
def
update_course
(
self
):
course_data
=
query_course
(
server
=
self
.
server
,
courseId
=
self
.
courseId
,
headers
=
self
.
headers
)
course_data
=
query_course
(
courseId
=
self
.
courseId
,
headers
=
self
.
headers
)
update_data
=
{
update_data
=
{
"courseId"
:
self
.
courseId
,
"courseId"
:
self
.
courseId
,
"courseName"
:
self
.
courseName
or
course_data
[
'data'
][
'course'
][
'courseName'
],
"courseName"
:
self
.
courseName
or
course_data
[
'data'
][
'course'
][
'courseName'
],
...
@@ -93,7 +92,7 @@ class UpdateCourse:
...
@@ -93,7 +92,7 @@ class UpdateCourse:
"uphalfCoursePeriod"
:
self
.
uphalfCoursePeriod
or
course_data
[
'data'
][
'course'
][
'uphalfCoursePeriod'
],
"uphalfCoursePeriod"
:
self
.
uphalfCoursePeriod
or
course_data
[
'data'
][
'course'
][
'uphalfCoursePeriod'
],
"downhalfCoursePeriod"
:
self
.
downhalfCoursePeriod
or
course_data
[
'data'
][
'course'
][
'downhalfCoursePeriod'
]
"downhalfCoursePeriod"
:
self
.
downhalfCoursePeriod
or
course_data
[
'data'
][
'course'
][
'downhalfCoursePeriod'
]
}
}
return
requests
.
post
(
url
=
self
.
server
+
self
.
update_url
,
json
=
update_data
,
headers
=
self
.
headers
,
verify
=
False
)
.
json
(
)
return
education_update_course_class_post
(
body
=
update_data
,
header
=
self
.
headers
,
default_assert
=
False
)
"""
"""
...
@@ -128,10 +127,10 @@ class UpdateCoursePrice:
...
@@ -128,10 +127,10 @@ class UpdateCoursePrice:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
self
.
update_price_url
=
'/service-education/education/courses/modifyPrice'
#
self.update_price_url = '/service-education/education/courses/modifyPrice'
def
update_course_price
(
self
):
def
update_course_price
(
self
):
course_data
=
query_course
(
server
=
self
.
server
,
courseId
=
self
.
courseId
,
headers
=
self
.
headers
)
course_data
=
query_course
(
courseId
=
self
.
courseId
,
headers
=
self
.
headers
)
update_price_data
=
{
update_price_data
=
{
"courseId"
:
self
.
courseId
,
"courseId"
:
self
.
courseId
,
"normalPrice"
:
self
.
normalPrice
or
course_data
[
'data'
][
'course'
][
'normalPrice'
],
"normalPrice"
:
self
.
normalPrice
or
course_data
[
'data'
][
'course'
][
'normalPrice'
],
...
...
script/xin_project_patriarch_app/xin_static/xin_educational/xin_network.py
View file @
dc4691da
import
requests
from
script.base_api
import
education_classes_update_resignClassInfo_post
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_class_handle.xin_add_class
import
CreateClass
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_class_handle.xin_add_class
import
CreateClass
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_course_handle.xin_course
import
CreateCourse
from
script.xin_project_patriarch_app.xin_static.xin_educational.xin_course_handle.xin_course
import
CreateCourse
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
...
@@ -55,12 +54,13 @@ class NetWork:
...
@@ -55,12 +54,13 @@ class NetWork:
"classSignEndDate"
:
self
.
classSignEndDate
,
"classSignEndDate"
:
self
.
classSignEndDate
,
"classResignBeginDate"
:
self
.
classResignBeginDate
,
"classResignBeginDate"
:
self
.
classResignBeginDate
,
"classResignEndDate"
:
self
.
classResignEndDate
}
"classResignEndDate"
:
self
.
classResignEndDate
}
network_url
=
'/service-education/education/classes/update/resignClassInfo'
#
network_url = '/service-education/education/classes/update/resignClassInfo'
network_data
=
requests
.
post
(
url
=
self
.
server
+
network_url
,
json
=
data
,
headers
=
self
.
headers
,
verify
=
False
)
network_data
=
education_classes_update_resignClassInfo_post
(
body
=
data
,
header
=
self
.
headers
,
default_assert
=
False
)
return
network_data
.
json
()
return
network_data
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
course_id
=
CreateCourse
(
server
=
Service_get
.
service_content
(
'31'
),
classType
=
'新生'
,
courseType
=
'常规班课'
,
productType
=
'主线班课'
,
schools
=
[{
"area"
:
2382
,
"schoolArea"
:
2389
}])
.
create_course
()[
'data'
][
'content'
][
0
][
'courseId'
]
course_id
=
CreateCourse
(
server
=
Service_get
.
service_content
(
'31'
),
classType
=
'新生'
,
courseType
=
'常规班课'
,
productType
=
'主线班课'
,
schools
=
[{
"area"
:
2382
,
"schoolArea"
:
2389
}])
.
create_course
()[
'data'
][
'content'
][
0
][
'courseId'
]
class_id
=
CreateClass
(
server
=
Service_get
.
service_content
(
'31'
),
courseId
=
course_id
,
schoolArea
=
2389
)
.
create_class
()[
'classId'
]
class_id
=
CreateClass
(
server
=
Service_get
.
service_content
(
'31'
),
courseId
=
course_id
,
schoolArea
=
2389
)
.
create_class
()[
'classId'
]
print
(
NetWork
(
server
=
Service_get
.
service_content
(
'31'
),
resignClassIds
=
[
class_id
])
.
network_set
())
print
(
NetWork
(
server
=
Service_get
.
service_content
(
'31'
),
resignClassIds
=
[
class_id
])
.
network_set
())
script/xin_project_patriarch_app/xin_static/xin_global/__init__.py
deleted
100644 → 0
View file @
6470c516
script/xin_project_patriarch_app/xin_static/xin_global/global.yaml
deleted
100644 → 0
View file @
6470c516
-
global_name
:
"
测试校区ID"
use_name
:
"
$test_schools"
globals_type
:
"
list"
use_type
:
"
使用类型"
argumnets
:
-
3095
-
2383
-
3015
-
3052
-
3074
-
3076
-
3345
-
3047
-
3049
-
global_name
:
"
科目类型"
use_name
:
"
$subjects"
globals_type
:
"
list"
use_type
:
"
使用类型"
argumnets
:
-
"
语文"
-
"
英语"
-
"
物理"
-
"
数学"
-
global_name
:
"
年级"
use_name
:
"
$grades"
globals_type
:
"
list"
use_type
:
"
使用类型"
argumnets
:
-
"
零年级"
-
"
一年级"
-
"
二年级"
-
"
三年级"
-
"
四年级"
-
"
五年级"
-
"
六年级"
-
"
七年级"
-
"
八年级"
-
"
九年级"
-
"
高一"
-
"
高二"
-
"
高三"
-
global_name
:
"
班型"
use_name
:
"
$classTypes"
globals_type
:
"
list"
use_type
:
"
使用类型"
argumnets
:
-
"
极趣班"
-
"
极思班"
-
"
极智班"
-
"
极客班"
-
"
极客A班"
-
"
极客蓝队班"
-
"
五四极趣班"
-
"
五四极思班"
-
"
五四极智班"
-
"
新生"
-
"
人教班"
-
"
八人精品"
-
"
定制班"
-
global_name
:
"
班型"
use_name
:
"
$platform"
globals_type
:
"
list"
use_type
:
"
使用类型"
argumnets
:
-
"
pc"
-
"
app"
-
"
applet"
script/xin_project_patriarch_app/xin_static/xin_global/xin_global.py
deleted
100644 → 0
View file @
6470c516
import
os
import
yaml
from
script.xin_project_patriarch_app.xin_static.xin_yaml.xin_read_yaml
import
ReadYaml
class
GlobalData
:
def
__init__
(
self
):
super
()
.
__init__
()
@classmethod
def
global_content
(
cls
):
curPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
print
(
curPath
)
yamlPath
=
os
.
path
.
join
(
curPath
,
"global.yaml"
)
f
=
open
(
yamlPath
,
'r'
,
encoding
=
'utf-8'
)
data
=
f
.
read
()
yaml_reader
=
yaml
.
load
(
data
,
Loader
=
yaml
.
FullLoader
)
f
.
close
()
print
(
yaml_reader
)
if
__name__
==
'__main__'
:
print
(
ReadYaml
.
read_yaml_data
(
path
=
r'\xin_static\xin_global\global.yaml'
))
script/xin_project_patriarch_app/xin_static/xin_judge.py
View file @
dc4691da
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static
import
xin_setting
from
script.xin_project_patriarch_app.xin_static
import
xin_setting
from
script.xin_project_patriarch_app.xin_static.xin_global.xin_global
import
GlobalData
class
Judge
:
class
Judge
:
...
...
script/xin_project_patriarch_app/xin_static/xin_setting/xin_school.py
View file @
dc4691da
import
requests
import
requests
from
script.base_api
import
departments_school_post
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_service.xin_service
import
Service_get
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_jky_pc_login
import
Headers
...
@@ -16,8 +17,8 @@ class School:
...
@@ -16,8 +17,8 @@ class School:
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
self
.
headers
=
Headers
(
server
=
self
.
server
,
username
=
self
.
username
,
password
=
self
.
password
)
.
get_headers
()
def
school_update
(
self
):
def
school_update
(
self
):
school_url
=
'/service.yaml
-user/departments/school'
# school_url = '/service
-user/departments/school'
school_data
=
requests
.
post
(
url
=
self
.
server
+
school_url
,
json
=
self
.
body
,
headers
=
self
.
headers
,
verify
=
False
)
school_data
=
departments_school_post
(
body
=
self
.
body
,
header
=
self
.
headers
,
default_assert
=
False
)
return
school_data
.
json
()
return
school_data
.
json
()
@classmethod
@classmethod
...
...
script/xin_project_patriarch_app/xin_static/xin_user/jky_user.yaml
View file @
dc4691da
-
headers
:
-
headers
:
Authorization
:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIyMTc1IiwidGVybWluYWwiOiJwYyIsInV1aWQiOiJ
lZDNlN2FjMTdiZjA0ZGU3YmQ5MGZjNzE5ZDEzZjdmNCIsInRpbWVzdGFtcCI6MTYxODMxMjQxNzAzMH0.VqAFwmhsxo6aq9_eJ8wc57a5wFV8aDnvruqH-y4Rt1
k
Authorization
:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIyMTc1IiwidGVybWluYWwiOiJwYyIsInV1aWQiOiJ
iOTcwNzMzN2VlZjU0NzZlYTVhNTg5ODU0YTk5ZDQxMiIsInRpbWVzdGFtcCI6MTYxODM2OTc5Nzg5N30.d9Wkb6ovkbbOvOO8R71tgdMXWCy1sDwzFHaxAQSnaQ
k
Content-Type
:
application/json;charset=UTF-8
Content-Type
:
application/json;charset=UTF-8
server
:
http://172.10.62.94
server
:
http://172.10.62.94
user
:
13555555555
user
:
13555555555
script/xin_project_patriarch_app/xin_static/xin_user/patriarch_user
View file @
dc4691da
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment